Hi there! Just got my physical Bangle JS2 device today and have been tinkering, after using the emulator and the web IDE for about a week.
I have been having a couple fishy issues with bluetooth, but this one particular issue has me scratching my head. I hope someone can offer some suggestions! Basically what happens is:
I load up the web IDE, hit the connect button, and select my bangle from the list (it's there!)
Once connected, I send a couple commands through the console on the left of the IDE (console.log, Bangle.beep, etc). Everything works fine.
I take some benign code and put it in the right side: console.log("Hello world!");
I hit UPLOAD (RAM). It looks like it is trying to do it, but then it says the Bangle has disconnected.
Same thing happens if I hit the little Database icon (view storage). Here's what I am seeing in the developer console for the IDE
Pre disconnect:
>>> BLE configured. Receiving data...
index.js:92945 Connected {portName: 'Bangle.js dbad'}
index.js:92945 Received a prompt after sending newline... good!
index.js:92945 >>> Sending...
index.js:92945 ---> "\u0010print(\"<\",\"<<\",JSON.stringify(process.env),\">>\",\">\")\n"
index.js:92945 >>> Sent
index.js:92945 BT> Received packet of length 128 - assuming increased MTU
index.js:92945 >>> Receiving...
index.js:92945 Got "< << {\"VERSION\":\"2v18\",\"GIT_COMMIT\":\"7171b2832\",\"BOARD\":\"BANGLEJS2\",\"RAM\":262144,\"FLASH\":1048576,\"SPIFLASH\":8388608,\"HWVERSION\":2,\"STORAGE\":8388608,\"SERIAL\":\"366870f4-6dfecf14\",\"CONSOLE\":\"Bluetooth\",\"MODULES\":\"Flash,Storage,heatshrink,crypto,tensorflow,locale\",\"EXPTR\":485764,\"APP_RAM_BASE\":536882880} >> >\r\n>"
index.js:92945 >>>
index.js:92945 [notify_info] Found BANGLEJS2, 2v18
index.js:92945 Loading https://www.espruino.com/json/BANGLEJS2.json
index.js:92945 Board JSON loaded
blockly_espruino.js:114 Blockly.setBoardJSON {VERSION: '2v18', GIT_COMMIT: '7171b2832', BOARD: 'BANGLEJS2', RAM: 262144, FLASH: 1048576, …}
index.js:92945 Firmware >1.43 supports faster writes over USB
index.js:92945 Set Slow Write = false ('Throttle Send'='Auto')
index.js:92945 FIRMWARE: Current 2v18, Available 2v18
index.js:92945 Device found {"portName":"Bangle.js dbad"}
index.js:92945 [success] Connected to Bangle.js dbad
index.js:92945 >>> Connected to Bangle.js dbad
And then this additional content appears in the console after I hit "Send to Espruino (RAM)"
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 there! Just got my physical Bangle JS2 device today and have been tinkering, after using the emulator and the web IDE for about a week.
I have been having a couple fishy issues with bluetooth, but this one particular issue has me scratching my head. I hope someone can offer some suggestions! Basically what happens is:
I load up the web IDE, hit the connect button, and select my bangle from the list (it's there!)
Once connected, I send a couple commands through the console on the left of the IDE (console.log, Bangle.beep, etc). Everything works fine.
I take some benign code and put it in the right side:
console.log("Hello world!");
I hit UPLOAD (RAM). It looks like it is trying to do it, but then it says the Bangle has disconnected.
Same thing happens if I hit the little Database icon (view storage). Here's what I am seeing in the developer console for the IDE
Pre disconnect:
And then this additional content appears in the console after I hit "Send to Espruino (RAM)"
Any ideas of what I might be able to try?