Sending message to Gadgetbridge works only once (ish) every few minutes? #6089
Replies: 1 comment
-
Posted at 2023-06-15 by stweedo Hi, I just tried your code and it showed up once in the phone when connected to gadgetbridge like you said. However, when checking the log it does show multiple presses. So it does seem to be receiving them from the bangle, just not showing them in Android every time. I believe you only need the Android app for getting notifications, music control, find my phone, alarm syncing, battery status syncing, or forwarding your phones gps to the bangle. For Bluetooth print line you shouldn't need it, but I could be wrong. Posted at 2023-06-15 by Philip
Thanks for confirming. This is sort of what I suspected. Like maybe android is debouncing them somehow to avoid spamming the end user or something.
Yeah that's what I thought but it doesn't seem to work at all if I uninstall the android integration app from the Bangle. Admittedly I am in a little over my head with this right now, but will probably understand it better after learning a bit more about how everything works. I agree that simple transmission seems to work without the app on the Bangle side, but gadget bridge doesn't seem to acknowledge them (even once, like when the app is installed). I'm guessing there's something in the integration app that might facilitate that. Posted at 2023-06-15 by stweedo Oh, I forgot to mention it also handles the navigation messages from Google maps, which after Gordon's latest fixes works fantastic and is a killer feature to have when traveling around. And I suppose it's possible the android app is required to establish more than just a simple Bluetooth connection with gadgetbridge. Posted at 2023-06-15 by Philip So actually I may have solved my problem entirely, but I'd be happy to hear from people as to why I solved it, because I think I Maxwell Smart'ed / Mr. Magoo'ed my way through it. The code I am running now
with the android integration uninstalled works PERFECTLY. I noticed that in the android integration there was a random looking I get the info popup every time on the phone. I get the simulated notifications from GadgetBridge drawn on the screen. It's magnificently simple. I'm very happy. Edit: okay it's not EVERY time I press the button that I see the toast message, but it's like 80%. Which is good enough. Posted at 2023-06-16 by @gfwilliams Glad you got it sorted! Right, I think I know what the problem was then. Gadgetbridge is looking for lines of data sent to it of the form However by default Bangle.js/Espruino has a REPL on the same Bluetooth UART, so it's got a Normally when you do Sending a newline before like you're doing solves it :)
No, but Gadgetbridge sends messages of the form I'd still recommend the Android Integration stuff though as it does do quite a lot for you, including handling HTTP requests. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2023-06-15 by Philip
Hey folks! Have been fiddling with the integration aspect of my BangleJS and have been struggling a little bit to figure out what's what. I have been following this:
https://www.espruino.com/Gadgetbridge
I installed the bangle version of gadgetbridge on my phone, then installed the android integration on my BangleJS (not 100% sure if this was required for transmit only, but I did it anyway).
Then I loaded this code into ram in the web IDE:
disconnected from the web IDE, then connected to GadgetBridge. I then hit the side button on my watch, and saw the little info toast pop up on my phone. Wohoo! Then I hit the button again... Nothing! Strange.
I hit the button a few more times over the course of about 10 minutes and it seemed to work maybe once or twice more. I proceeded to disconnect from gadgetbridge then reconnect, hit the button again, and it works again - but only once.
Wonder if anyone with a little more familiarity with these things could weigh in.
My interest right now is just getting the most minimalistic possible setup and get a little bit of hello world data to reliably go both ways, even just to log it to the console.
Beta Was this translation helpful? Give feedback.
All reactions