Most recent activity
-
- 3 comments
- 1,032 views
-
When puck is advertising it is not possible to connect it via bluetooth.
I use the npm espruino package on linux to connect to the puck and to upload code.
After uploading this file
const keys = { temperature: 0x1809, battery: 0x180f, someData: 0xfffe }; function a() { digitalPulse(LED3, 1, 1000); const adData = {}; adData[keys.battery] = [Puck.getBatteryPercentage()]; adData[keys.temperature] = [Math.round(E.getTemperature())]; // adData[keys.someData] = [1, 2, 3, 4, 5]; NRF.setAdvertising(adData); } setWatch((e) => a(), BTN, { repeat: true, edge: 'rising', debounce: 40 });
it is possible to connect to the puck. Pressing the button to start advertisement does not change that.
When slightly modifying the code to
const keys = { temperature: 0x1809, battery: 0x180f, someData: 0xfffe }; function a() { digitalPulse(LED3, 1, 1000); const adData = {}; adData[keys.battery] = [Puck.getBatteryPercentage()]; adData[keys.temperature] = [Math.round(E.getTemperature())]; adData[keys.someData] = [1, 2, 3, 4, 5]; NRF.setAdvertising(adData); } setWatch((e) => a(), BTN, { repeat: true, edge: 'rising', debounce: 40 });
to advertise on an additional service id will change that. Once the advertisement is started by pressing the button I am not able to connect to the puck until it is reset.
The behavior is not specific to this service ID. -
Hi,
When the Puck.js is in bootloader mode EspruinoTools cannot connect to the Puck.js to upload the firmware.
Obviously it does not find it under the name
puck.js xxxx
, but it also does not work with-d 'DfuTarg'
or-p <device address>
or without a port or device option.Uploading the firmware when the Puck.js is not in bootloader mode is also not possible (as expected)
I am running EspruinoTools under Linux Debian buster with bluez 5.50
Any help is appreciated.
Thanks,
LarsPS:
I know there are other ways to upload firmware to the espruino devices. I am looking for a way to automate it without fiddeling around in a GUI tool
I'm using the espruino tools npm package cli tool to connect to the puck.
Connecting with
--port <MAC address
instead of-d <deviceName>
worked fine.Thanks for the hint!