Most recent activity
-
Before I forget, this is a copy of the watch app https://1drv.ms/u/s!AglBpbKyzKIQj-VErqGWfcFj_sjaKA?e=UGAOUY which is just the same date/time app plus the sample BT advertising code and some cleanup to use ES5 constructs. It's possible that the code itself has a problem though I tried to keep the Bluetooth portion intact.
-
-
-
Yes, trying to use as little mechanism as I can to narrow things down. I did install gadgetbridge but, again, too much static friction so haven't connected to it.
I understand why you chose BLE in this case. Indeed, my goal is for IP (4 or 6 don't matter for this purpose) over BLE. I wanted to get some hands-on experience before taking it up with the Bluetooth SIG. This is a full topic in its own right and I write about such issues in my column.
Is the BLE radio in the Bangle very short range? I'm about 2 meters from the particular pi. Is that too far? To test I just replaced the battery in the puck and it shows up (-80 vs the pixel at -87)
It is paired with my PC but I presume there is a difference between connected/disconnected and if I disconnect from the browser it should become available.
IDE -- I sometimes get a connection hang on the PC too and futz (to use the technical term) till somehow it connects. This latest test I brought the BJS to the pi and it immediately adds itself to the list with the puck and pixel but failed to connect. And then, after a refresh, I get no ports found
Not sure how much time I'll have to experiment with this (though, alas, I find myself trying one more thing). I might reach out to the BLE world for a better understanding.
-
I've made progress but not there. I installed to flash and disconnected. I eventually got the Espruin hub running on my pi to see the BangleJS but only if I placed it near the pi. No such problems with my pixl. But I'm not seeing the advertising message (Hello World).
I do urge having a WiFi option in the future. It needn't use much power if it is off much of the time and used to send messages rather than listening all the time. And would have far fewer such issues. The limitations of BLE such as a single connection and the lack of preinstalled support is an issue. This is why I made sure Windows got TCP/IP preinstalled and with DHCP rather than forcing users to do it themselves.
In the interim, it would be great to have a use case of a serial stream to an IP address (via TCP) and/or UDP. If I had that then the rest becomes very easy.
As an FYI, I tried using the IDE on the pi it offered the BangleJS but never finished connecting.
-
I'm making progress.
I took
espruino_node
from https://github.com/gfwilliams/MQTToBLE and added it to the end of my watch code (the date/time sample) and commented out the references to TX and Serial1 and switched it to BTN3.I'm also running the server from https://www.npmjs.com/package/aedes.
I was getting
Can't update BLE services until restart
So I installed EspruinoHub on one of my pi's and it found a lot of Bluetooth devices but I'm still getting the error message.
Is there good reference doc I can use to understand this from scratch since the examples have lots of additional complexity.
-
-
Thanks.
At this point, my main interest is a simple broker/server. I looked and found https://www.npmjs.com/package/aedes and going to see how easy it is. NodeRed seems to be a tool for managing the message flows atop the brokers.
import aedes1 from 'aedes'; const aedes = aedes1(); import net from 'net'; const server = net.createServer(aedes.handle); const port = 1883; server.listen(port, () => console.log(`Server listening on port ${port}`));
Alas, not much headway on the weather part until I get simple connectivity. Working on it.