-
-
I'm jumping in without context. Given that the ESP chips have Wi-Fi but it isn't available on some devices. Does this mean I can compile a version for the Bangle.js 2 w/Wi-Fi? There's still a lot of static friction in my coming up to speed. For now I want to just understand what's possible and, perhaps, what's feasible.
-
-
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}`));
-
I tried some of the examples at https://googlechrome.github.io/samples/web-bluetooth/index.html and while I could get some to work it was discouraging since, alas, Bluetooth wants to do me favors and builds in application knowledge. This is why I want more generic connectivity. I will look more into the MQTT approach but I still want to find a simple way to do an app that makes an IP connection, fetches data, and displays it.
-
-
-
I see a lot of mechanisms in GadgetBridge and WebBLE.
I'm looking for the simplest way to do IP over the BLE connection that I can install on any platform and connect to when I'm in range. The apps can then view it through the lens of IP (albeit with limits on the amount of traffic).
If it exists (including via GB/WB) what is the simplest path to getting up to speed? If not, I may prototype it with a browser app but it would be limited to https or as a shim via WebSockets.
-
-
-
-
Same reason you put a use-by date on food packages. If the VSC post hasn't been updated in 2 years I know that it's a dead-end and no one cares. I can't update till it works well enough for me to learn.
In this particular case, it seems to have been an incomplete effort and worth a reboot rather than a fix. I strongly want VSC/TS support but will start a new thread.
-
Please put dates on all documentation pages
https://www.espruino.com/Typescript+and+Visual+Studio+Code+IDE seems to be very out of date.
Being able to use Visual Studio Code makes a huge difference. As nice as the browser IDE may be, it cannot compare to the IDE in capability.
What can be done about making support a priority?
-
[I thought I had posted this earlier]
What's strange is that after I replaced the cell the flashing lights program I left in it sort of worked, though the colors seemed a bit off. But I didn't see it show up in the list of Bluetooth radios in the IDE. No big deal, just an FYI. That's what I get for carrying it around as a demo of what one could do with JavaScript for IoT. (related to the ECMA TC53 effort which Espruino might want to join)
-
-
-
Oh -- I found Bangle.js 2 doesn't have WI-Fi so it's moot. I was thinking of other devices.