support icon indicating copy to clipboard operation
support copied to clipboard

[Bug] Popup stating "GATT Error Unknown." during download

Open laurensvalk opened this issue 1 year ago • 15 comments

(...) with the beta firmware and in the middle of running the program, before it finished downloading to the hub, I got an unexpected error message popup stating "GATT Error Unknown."

Originally posted by @ninoguba in https://github.com/pybricks/support/issues/1467#issuecomment-1958659447

laurensvalk avatar Feb 22 '24 07:02 laurensvalk

This was also reported by:

Originally posted by @Tcm0 in https://github.com/pybricks/support/issues/1462#issuecomment-1954820503

laurensvalk avatar Feb 22 '24 07:02 laurensvalk

I have also seen this while working on @martynboogaarts 's laptop.

Once it did occur, it was deterministic after that. We kept getting that error when we clicked Download again.

Restarting the hub worked around it.

laurensvalk avatar Feb 22 '24 07:02 laurensvalk

So far I only got the issue once and it didn't happen when I tested my code for the app controlled transformation vehicle (I did at least 10 program uploads for sure). It only happened with that Technic Hub Disconnection test code

Tcm0 avatar Feb 22 '24 07:02 Tcm0

Thanks for the additional details. Indeed, it seems to occur only occasionally.

It only happened with that Technic Hub Disconnection test code

I think this is probably a coincidence. It doesn't start running any of the Xbox controller code until after the program starts. Or, depending on what you tried, even after initializing the steering motor.

laurensvalk avatar Feb 22 '24 08:02 laurensvalk

I am trying to install firmware on boost hub, and I get above error or attached error 'something went wrong'. I have tried ten times. I tried to install official firmware twice, and that worked fine. I follow the instructions, setting no specific hub name. Instructions say Select Lego Bootloader and click Connect. But I can see Lego Bootloader - Paired, and then I can press Pair.

For me this does not seem logic, since it is already paired.

The process starts but I get attached error after around 10-12 seconds and the flashing on the hub stops.

Is there any way for me to see additional logging about what could go wrong?

Additional comment: I was able to install firmware on a city hub without problems.

pybricks_bootloader pybricks_something_went_wrong

PeterAmiga avatar Apr 01 '24 20:04 PeterAmiga

Is there any way for me to see additional logging about what could go wrong?

See https://github.com/orgs/pybricks/discussions/270

dlech avatar Apr 01 '24 20:04 dlech

I just fetched bluetooth logging from browser. Will try other debugging tomorrow. pybricks_bluetooth_debug

PeterAmiga avatar Apr 01 '24 20:04 PeterAmiga

For this particular error ("The hub said something went wrong"), I think we will need Bluetooth packet logs.

The console log in the browser may give a slightly better hint as to the cause though (narrows it down to 1 of 5 possibilities).

dlech avatar Apr 01 '24 20:04 dlech

Comment of a simple Pybricks user :

  1. The "pair" in pybricks in fact means to connect to.
  2. I had this type of error sometimes when there were too many devices near the pc and the hub. As example when my phone is between the pc and the hub.

But bluetooth logging might show what is the real problem.

Bert

BertLindeman avatar Apr 01 '24 21:04 BertLindeman

Impressively quick replies :-)

I realised I could run pybricks from my android phone. I also used my android phone to install the original firmware again. I succeded installing pybricks firmware using my phone.

And afterwards I can run a program on the hub from my Windows pc.

Thanks for the suggestions on how to solve the pc problem. For now I will experiment with the code on my hub and not dig further into this problem.

If you would like to have the Bluetooth packet logs, let me know. I will try to provide them.

PeterAmiga avatar Apr 02 '24 06:04 PeterAmiga

If you would like to have the Bluetooth packet logs, let me know. I will try to provide them.

Yes, that wold be helpful to be able to see if this is a bug we can fix or if it is just a bad Bluetooth driver on Windows.

dlech avatar Apr 02 '24 13:04 dlech