Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Technic Hub not broadcasting when disconnected from computer #1086

Closed
laurensvalk opened this issue May 28, 2023 · 4 comments
Closed

Technic Hub not broadcasting when disconnected from computer #1086

laurensvalk opened this issue May 28, 2023 · 4 comments
Assignees
Labels
bug Something isn't working software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: bluetooth Issues involving bluetooth

Comments

@laurensvalk
Copy link
Member

I tested the new example programs included in the documentation of hub.ble.broadcast / observe functions included in latest 2.2.0-beta.4 release. I'm really happy to see it finally implemented, thank you for that!
While connected to Pybricks API, everything goes well, just as expected. But on Technic Hub there is a consistent problem of not broadcasting any data when the code is run directly from the hub (after disconnecting from pc). The other Techic Hub acting as receiver keeps receiving ble signal when disconnected from pc and code run from directly hub. When code is adapted to Inventor Hub and started directly from Hub everything goes fine. So the problem occurs only on Tecyhnic Hub and only in broadcasting mode. I tested on several Technic Hubs as broadcaster and various hubs as receiver, and the problem is 100% persistent.

Another observation: there is much less latency in receiver Technic Hub motor folowing the broadcaster Hub's motor movements when the broadcaster is Inventor Hub (it is close to 100ms as observed). It seems as Technic Hub has much more than 100ms intervals (rather 800-1000ms as observed) between data transmission session.

Originally posted by @vardayzsolt in pybricks/pybricks-micropython#158 (comment)

@laurensvalk
Copy link
Member Author

When it is connected to the computer, broadcasting with Technic Hub will have some additional latency.

It should go back to normal when the program is run from the hub without a PC connection. But if I understand you correctly it does not work for you at all in that case. Thanks for reporting. We'll want to fix that.

It does sound quite similar to @NStrijbosch's findings.

@dlech dlech added bug Something isn't working topic: bluetooth Issues involving bluetooth software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) labels May 31, 2023
@dlech
Copy link
Member

dlech commented May 31, 2023

@vardayzsolt, I cannot reproduce the problem. Can you please provide the exact code used to reproduce the problem?

@dlech dlech added the blocked: reproducable case needed The issue cannot be reliably reproduced label May 31, 2023
@vardayzsolt
Copy link

hthtest1.zip
Here you have in a .zip file all three codes, adopted for single motor from example scripts in beta.pybricks documentation.
The receiver is always a TechnicHub, the sender is either a TechnicHub (stops working when disconnected from PC) either an InventorHub (works just fine when disconnected from PC). I tried to run the code on 3 different TechnicHubs, all of them flashed with latest beta firmware (I suppose that with older firmware this code cannot run anyway when connected to PC due to inexistent ble.broadcast method)

@dlech dlech removed the blocked: reproducable case needed The issue cannot be reliably reproduced label Jun 1, 2023
@dlech
Copy link
Member

dlech commented Jun 1, 2023

Thanks. I seems to be able to reproduce the problem now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: bluetooth Issues involving bluetooth
Projects
None yet
Development

No branches or pull requests

3 participants