I did what you suggested, and it worked! Could connect to the Puck, and enter "1-2" on the left pane, and it replied "=-1"! Yeah!
Then I disconnected for the moment and had a look at the console log.
This is the log, from starting at "Found UART device":
Noble: Found UART device: Puck.js 3172 ff:cd:8a:a3:31:72
>>> Connecting...
Set Slow Write = true
Noble: Stopping scan (openSerial)
BT> Connecting
BT> Connected
Connected [object Object]
Found a prompt... great!
>>> Sending...
---> "\u0010console.log(\"<\",\"<<\",JSON.stringify(process.env),\">>\",\">\")\n"
BT> Sending "\u0010console.log(\"<"
BT> Sending "\",\"<<\",JSON.str"
BT> Sending "ingify(process."
BT> Sending "env),\">>\",\">\")\n"
>>> Sent
WARNING: Serial port implementation is not returning ArrayBuffers
WARNING: Serial port implementation is not returning ArrayBuffers
WARNING: Serial port implementation is not returning ArrayBuffers
WARNING: Serial port implementation is not returning ArrayBuffers
WARNING: Serial port implementation is not returning ArrayBuffers
WARNING: Serial port implementation is not returning ArrayBuffers
WARNING: Serial port implementation is not returning ArrayBuffers
WARNING: Serial port implementation is not returning ArrayBuffers
WARNING: Serial port implementation is not returning ArrayBuffers
WARNING: Serial port implementation is not returning ArrayBuffers
WARNING: Serial port implementation is not returning ArrayBuffers
WARNING: Serial port implementation is not returning ArrayBuffers
WARNING: Serial port implementation is not returning ArrayBuffers
WARNING: Serial port implementation is not returning ArrayBuffers
Got "< << {\"VERSION\":\"1v95.153\",\"BUILD_DATE\":\"Jan 25 2018\",\"BUILD_TIME\":\"08:53:16\",\"GIT_COMMIT\":\"cef34f5483ea097d2c6362b59b7ba6e11db1317d\",\"BOARD\":\"PUCKJS\",\"CHIP\":\"NRF52832\",\"CHIP_FAMILY\":\"NRF52\",\"FLASH\":524288,\"RAM\":65536,\"SERIAL\":\"587534d5-e58df20b\",\"CONSOLE\":\"Bluetooth\"} >> >\r\n>"
Loading http://www.espruino.com/json/PUCKJS.json
Board JSON loaded
Firmware >1.43 supports faster writes over USB
Set Slow Write = false
FIRMWARE: Current 1v95.153, Available 1v95
Device found (connectionId=undefined)
[success] Connected to port ff:cd:8a:a3:31:72
>>> Connected to port ff:cd:8a:a3:31:72
BT> Sending "\r"
WARNING: Serial port implementation is not returning ArrayBuffers
BT> Sending "\r"
WARNING: Serial port implementation is not returning ArrayBuffers
BT> Sending "1"
WARNING: Serial port implementation is not returning ArrayBuffers
BT> Sending "-"
WARNING: Serial port implementation is not returning ArrayBuffers
BT> Sending "2"
WARNING: Serial port implementation is not returning ArrayBuffers
BT> Sending "\r"
WARNING: Serial port implementation is not returning ArrayBuffers
Disconnect callback...
WARNING: [notify_warn] Disconnected
>>> Disconnected
There still seems to be a little problem with the serial port implementation, but nothing bad.
But then I wanted to connect again, and this time it failed.
And since then, it always failed. I could only connect once, never again.
I restarted the Web IDE, cleared the Puck's data again, reprogrammed the Puck with 1v94 and then with 1v95.153, cleared again, even restarted my PC, but nothing helps.
Connecting always results in
Noble: Starting scan
Noble: Found UART device: Puck.js 3172 ff:cd:8a:a3:31:72
Noble: Found UART device: Puck.js 3172 ff:cd:8a:a3:31:72
>>> Connecting...
Set Slow Write = true
Noble: Stopping scan (openSerial)
BT> Connecting
BT> ERROR Connecting
ERROR: Unable to open device (connectionInfo=undefined)
ERROR: [notify_error] Connection Failed.
>>> Connection Failed.
Perhaps you have one more idea?
At the time when connection worked, I fidgeted with a freshly unboxed raspi 3 - perhaps I should just place it on the table next to my keyboard and the reluctant Puck ...
Best regards,
squyrrel
Edit:
well, now I could connect once again!
Just cannot figure why it works this time. Perhaps waiting a while not doing anything, then trying to connect, gives a better chance?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi Gordon,
I did what you suggested, and it worked! Could connect to the Puck, and enter "1-2" on the left pane, and it replied "=-1"! Yeah!
Then I disconnected for the moment and had a look at the console log.
This is the log, from starting at "Found UART device":
There still seems to be a little problem with the serial port implementation, but nothing bad.
But then I wanted to connect again, and this time it failed.
And since then, it always failed. I could only connect once, never again.
I restarted the Web IDE, cleared the Puck's data again, reprogrammed the Puck with 1v94 and then with 1v95.153, cleared again, even restarted my PC, but nothing helps.
Connecting always results in
Perhaps you have one more idea?
At the time when connection worked, I fidgeted with a freshly unboxed raspi 3 - perhaps I should just place it on the table next to my keyboard and the reluctant Puck ...
Best regards,
squyrrel
Edit:
well, now I could connect once again!
Just cannot figure why it works this time. Perhaps waiting a while not doing anything, then trying to connect, gives a better chance?