• 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:

    1. I load up the web IDE, hit the connect button, and select my bangle from the list (it's there!)

    2. Once connected, I send a couple commands through the console on the left of the IDE (console.log, Bangle.beep, etc). Everything works fine.

    3. I take some benign code and put it in the right side: console.log("Hello world!");

    4. I hit UPLOAD (RAM). It looks like it is trying to do it, but then it says the Bangle has disconnected.

    5. 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\":\"7­171b2832\",\"BOARD\":\"BANGLEJS2\",\"RAM­\":262144,\"FLASH\":1048576,\"SPIFLASH\"­:8388608,\"HWVERSION\":2,\"STORAGE\":838­8608,\"SERIAL\":\"366870f4-6dfecf14\",\"­CONSOLE\":\"Bluetooth\",\"MODULES\":\"Fl­ash,Storage,heatshrink,crypto,tensorflow­,locale\",\"EXPTR\":485764,\"APP_RAM_BAS­E\":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)"

    >>> Minifying
    index.js:92945 >>> Minification complete
    index.js:92945 Found a prompt... great!
    index.js:92945 Splitting for reset(), delay 250
    index.js:92945 BT> SEND ERROR: NotSupportedError: GATT operation failed for unknown reason.
    index.js:92945 BT> Disconnected (gattserverdisconnected)
    index.js:92945 Disconnect callback... {"port":"Bangle.js dbad","portName":"Bangle.js dbad"}
    index.js:92950 [notify_warn] Disconnected from Bangle.js dbad
    (anonymous) @ index.js:92950
    warning @ index.js:94266
    (anonymous) @ index.js:100843
    (anonymous) @ index.js:95763
    cb @ index.js:92895
    (anonymous) @ index.js:131777
    cb @ index.js:92893
    (anonymous) @ index.js:130080
    cb @ index.js:92893
    (anonymous) @ index.js:101952
    cb @ index.js:92893
    (anonymous) @ index.js:100710
    cb @ index.js:92893
    (anonymous) @ index.js:100609
    cb @ index.js:92893
    (anonymous) @ index.js:98239
    cb @ index.js:92893
    (anonymous) @ index.js:94319
    cb @ index.js:92893
    callProcessor @ index.js:92898
    (anonymous) @ index.js:95762
    closeSerial @ index.js:96758
    btDevice.addEventListener.once @ index.js:96697
    closeSerial @ index.js:96751
    (anonymous) @ index.js:96782
    Promise.catch (async)
    writeSerial @ index.js:96780
    writeSerialWorker @ index.js:95899
    (anonymous) @ index.js:95902
    setTimeout (async)
    (anonymous) @ index.js:95901
    (anonymous) @ index.js:96779
    Promise.then (async)
    writeSerial @ index.js:96777
    writeSerialWorker @ index.js:95899
    writeSerial @ index.js:95921
    (anonymous) @ index.js:98706
    getEspruinoPrompt @ index.js:93244
    writeToEspruino @ index.js:98691
    cb @ index.js:92895
    (anonymous) @ index.js:130010
    cb @ index.js:92893
    wrap @ index.js:129922
    (anonymous) @ index.js:129914
    cb @ index.js:92893
    (anonymous) @ index.js:129682
    cb @ index.js:92893
    findBinary @ index.js:130846
    (anonymous) @ index.js:130782
    cb @ index.js:92893
    callback @ index.js:129621
    minify @ index.js:129642
    (anonymous) @ index.js:129489
    cb @ index.js:92893
    (anonymous) @ index.js:102993
    cb @ index.js:92893
    findASMBlocks @ index.js:102649
    (anonymous) @ index.js:102548
    cb @ index.js:92893
    compileCode @ index.js:102162
    (anonymous) @ index.js:102049
    cb @ index.js:92893
    loadModules @ index.js:99117
    (anonymous) @ index.js:98953
    cb @ index.js:92893
    callProcessor @ index.js:92898
    getEspruinoCode @ index.js:95472
    (anonymous) @ index.js:100593
    ensureConnected @ index.js:100852
    click @ index.js:100589
    index.js:92945 >>> Disconnected from Bangle.js dbad
    

    Any ideas of what I might be able to try?

About

Avatar for Philip @Philip started