• I have a fork of the EspruinoHub that fixes the problems I have been experiencing. I think this is still related to this thread since mqtt is integral to node-red and being able to initiate and respond to events.

    https://github.com/dklinkman/EspruinoHub­

    I had trouble connecting to the puck reliably, initially, and I was able to figure out over time that this was related to something in noble. But short of it is that I changed the logic in EspruinoHub and it's a lot more reliable now. At least for me.

    I also added logic so the mqtt message text sent to the puck was no longer limited to just 20 bytes.

    So something like this works now on the RPi:

    mosquitto_pub -t /ble/write/c7:6e:71:dd:ee:ff/nus/nus_tx -m $'digitalPulse(LED3, 1, 200);\n'
    

    even while the text is > 20 chars. Note also the RPi /bin/bash $'...' syntax. Required.

    Reading a service now works. There was a bug causing a crash. For example the following now reads the puck name:

    mosquitto_pub -t /ble/read/c7:6e:71:dd:ee:ff/1800/2A00 -n
    

    and outputs the result when appropriately subscribed to mosquitto_sub -v -t /ble/data/#

    /ble/data/c7:6e:71:dd:ee:ff/1800/2a00 Puck.js eeff
    

    I also fixed a problem where the device discovery would stop after an mqtt event resulting in a watchdog timeout and restart but only by the shell script. Now the discovery restart happens more inline.

About

Avatar for dklinkman @dklinkman started