BLE Connect/Disconnect #4064
Replies: 1 comment
-
Posted at 2022-08-16 by @gfwilliams It's hard to tell from the indenting, but it looks like maybe you could be calling One thing that could help as well - you have gattserverdisconnected but it's not being used right now. Try:
Then instead of just
Posted at 2022-08-17 by psc1988 Hi Gordon, thanks for that help. What I found out is, if I delete the part with the accelerometer it works. I can connect and disconnect like it should be all the time. Did I made a mistake in the accelerometer section? I ask for
Posted at 2022-08-17 by psc1988 Ah and one more info, the re-connection works basically but the signals will not be sent to the MDBT42Q. The LED there is not reacting anymore after the reconnection. I get this message now in the console with BLE task 3:
Posted at 2022-08-18 by @gfwilliams Looks like in the You could try sending Newer firmwares (2v15 I think?) will auto-clear the input line when Bluetooth disconnects/connects so it's not needed, but on earlier versions, if a send half-completed and you were left with
Which would fail and not light any lights... Posted at 2022-08-22 by psc1988 Hi Gordon, first of all thank you very much for the information, I didn´t know that. I have two more questions about this. If I delete this lines:
I don´t get any feedback in the console. If I let it in, I get this message, even if it works with the connecting/disconnecting thing:
The other thing is I try to implement now the button and the part of the code for the button works in another program and also if the Accel is not in that one. What is the issue, when I want to use that additional code? Is it that uart.write is busy in some way? Sometimes the signal from the button receives the MDBT but after 2 or 3 times it stops or the LED on the MDBT does not go off again. Here the complete Code:
Posted at 2022-08-24 by @gfwilliams I think the issue you are hitting is that You could chain the promises, but perhaps it makes more sense to do:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2022-08-15 by psc1988
I have a little problem that I'm stuck on.
What I basically want to do is:
When I upload the code it either doesn't work at all or once and then not anymore.
I get following in the Console:
Here the code:
Beta Was this translation helpful? Give feedback.
All reactions