• Sat 2019.10.26

    EDIT:
    Sun 2019.12.01
    Solution suggested in post #13 does indeed work


    Was in the process of attempting to resolve an issue for another forum post and needed to
    flash to current version.

    Didn't want to hijack the following as I'm not flashing a Puck, but this may be related as it appears still unresolved. (three weeks now without update)

    Puck.js failed to update firmware; can't hard reset now

    fr #7 http://forum.espruino.com/comments/14936­620/

    Still get the stuck uploading green bar, but an additional error using the native app.

    Entering bootloader mode releasing button after one second and view red LED is illuminated


    First attempt using WebIDE native app   v0.70.06
    Note that the device was found blue and then connected green

    TypeError: failed to execute 'requestDevice' on 'Bluetooth' required member filters is undefined.


    Needed to close IDE, unpair device, then 'Add a Device' then pair then relaunch IDE. That worked great
    until I tried the Chrome version. Then device becomes locked and unusable.



    Second attempt using Chrome Version 77.0.3865.120 (Official Build) (64-bit)

    https://www.espruino.com/ide/#

        LOADING ...
    Found MDBT42Q, 1v99
    Connected to Web Bluetooth, MDBT42Q 5389
    Disconnected
    >
    Updating application: espruino_2v04_mdbt42q_app.bin...
    
    
    Console output
     
    No code in storage.
    serviceworker> active
    Handling URL "https://www.espruino.com/ide/"
    No navigator.serial - Web Serial not enabled
    ERROR: serial_frame: getPorts timeout, disabling
    ERROR: getURL("/serial/ports") error : Not Found
    /serial/ports doesn't exist - disabling WebSocket support
    Couldn't connect to wss://localhost:31234 - disabling websockets for this session
    >>> Connecting...
    Set Slow Write = true
    >>> Connecting to MDBT42Q 5389
    BT>  Device Name:       MDBT42Q 5389
    BT>  Device ID:         e/iYKbDcuVb1yiSIggpnaw==
    >>> Connected to BLE
    BT> Connected
    >>> Configuring BLE...
    BT> Got service
    >>> Configuring BLE....
    BT> RX characteristic:{}
    >>> Configuring BLE....
    >>> Configuring BLE.....
    BT> TX characteristic:{}
    >>> Configuring BLE.....
    Set Slow Write = false
    >>> BLE configured. Receiving data...
    Connected [object Object]
    Received a prompt after sending newline... good!
    >>> Sending...
    ---> "\u0010print(\"<\",\"<<\",JSON.stringify­(process.env),\">>\",\">\")\n"
    >>> Sent
    Got "< << {\"VERSION\":\"1v99\",\"GIT_COMMIT\":\"f­0d66ba\",\"BOARD\":\"MDBT42Q\",\"FLASH\"­:524288,\"RAM\":65536,\"SERIAL\":\"27dd3­4cc-f06cc0ad\",\"CONSOLE\":\"Bluetooth\"­,\"MODULES\":\"Flash,Storage,net,dgram,h­ttp,NetworkJS,crypto,neopixel\",\"EXPTR\­":536882348} >> >\r\n>"
    [notify_info] Found MDBT42Q, 1v99
    Loading https://www.espruino.com/json/MDBT42Q.js­on
    Board JSON loaded
    Firmware >1.43 supports faster writes over USB
    Set Slow Write = false
    FIRMWARE: Current 1v99, Available 2v04
    Device found {"portName":"MDBT42Q 5389"}
    [success] Connected to Web Bluetooth, MDBT42Q 5389
    >>> Connected to Web Bluetooth, MDBT42Q 5389
    Downloading https://www.espruino.com/binaries/esprui­no_2v04_mdbt42q.zip
    >>> Downloading binary...
    >>> Done.
    BT> Disconnected (gattserverdisconnected)
    Disconnect callback...
    WARNING: [notify_warn] Disconnected
    >>> Disconnected
    stepFlashNordicDFU:  [object Object]
    >>> Initialising...
    connected to gatt server
    found DFU service
    found 2 characteristic(s)
    [success] Updating application: espruino_2v04_mdbt42q_app.bin...
    >>> Updating application: espruino_2v04_mdbt42q_app.bin...
    >>> Updating application: espruino_2v04_mdbt42q_app.bin...
    connected to gatt server
    found DFU service
    found 2 characteristic(s)
    found packet characteristic
    found control characteristic
    enabled control notifications
    transferring init
    crc32 not found, skipping CRC check
    init packet already available, skipping transfer
    transferring firmware
    >>> Uploading...
    crc32 not found, skipping CRC check
    written 4096 bytes
    crc32 not found, skipping CRC check
    written 8192 bytes
    crc32 not found, skipping CRC check
    written 12288 bytes
    crc32 not found, skipping CRC check
    written 16384 bytes
    crc32 not found, skipping CRC check
    written 20480 bytes
    crc32 not found, skipping CRC check
    written 24576 bytes
    crc32 not found, skipping CRC check
    written 28672 bytes
    crc32 not found, skipping CRC check
    written 32768 bytes
    crc32 not found, skipping CRC check
    written 36864 bytes
    crc32 not found, skipping CRC check
    written 40960 bytes
    crc32 not found, skipping CRC check
    written 45056 bytes
    crc32 not found, skipping CRC check
    written 49152 bytes
    crc32 not found, skipping CRC check
    written 53248 bytes
    crc32 not found, skipping CRC check
    written 57344 bytes
    crc32 not found, skipping CRC check
    written 61440 bytes
    crc32 not found, skipping CRC check
    written
    

    Stalls with green progress bar at 20%

    Second attempt

    Device is not able to be paired at this point. It doesn't even appear as recognizable in the 'Add a Device' BT settings section.

    No Compatible devices found

    >>> Downloading binary...
    >>> Done.
    stepFlashNordicDFU:  [object Object]
    >>> Initialising...
    connected to gatt server
    found DFU service
    found 2 characteristic(s)
    [success] Updating application: espruino_2v04_mdbt42q_app.bin...
    >>> Updating application: espruino_2v04_mdbt42q_app.bin...
    >>> Updating application: espruino_2v04_mdbt42q_app.bin...
    connected to gatt server
    found DFU service
    found 2 characteristic(s)
    found packet characteristic
    found control characteristic
    enabled control notifications
    transferring init
    crc32 not found, skipping CRC check
    init packet already available, skipping transfer
    transferring firmware
    >>> Uploading...
    crc32 not found, skipping CRC check
    written 69632 bytes
    crc32 not found, skipping CRC check
    written 73728 bytes
    

    Closed browser and reattempted

    No chrome.serial - Chrome Serial disabled
    No chrome.sockets - Chrome Socket disabled
    serial_audio: Audio Sample rate : 48000
    serial_audio: Audio Serial Baud 9600 Bit time 5
    WebSocket relay support enabled - running in web browser
    WebSocket localhost support (EspruinoHost) enabled - running in web browser
    serial_frame: Running in a frame - enabling frame messaging
    UTF8 Library loaded successfully
    No chrome.fileSystem - Projects disabled
    No chrome.storage API - disabling Offline mode
    Initialising SettingsConsole
    Initialising Utils
    Initialising Config
    Initialising Notifications
    Initialising Status
    Initialising App
    Initialising File
    Initialising Code
    Initialising Serial
      - Initialising Serial Web Audio
      - Initialising Serial Web Bluetooth
      - Initialising Serial Web Serial
      - Initialising Serial Websocket Relay
      - Initialising Serial Websocket to EspruinoHost
      - Initialising Serial window.postMessage
    Initialising SerialWebSocketRelay
    Initialising SerialWebSocketLocal
    Initialising Terminal
    Initialising CodeWriter
    Initialising Modules
    Initialising Env
    Initialising Flasher
    Initialising EditorBlockly
    Initialising EditorJavaScript
    Initialising Send
    Initialising MenuPortSelector
    Initialising MenuSettings
    Initialising MenuFlasher
    Initialising SettingsAbout
    Initialising SettingsFlasher
    Initialising BoardJSON
    Initialising VersionChecker
    Initialising Compiler
    Initialising Assembler
    Initialising GetGitHub
    Initialising Unicode
    Initialising Minify
    Initialising Pretokenise
    Initialising SaveOnSend
    Initialising SetTime
    Initialising Tutorial
    Initialising Webcam
    Initialising FontSize
    Initialising UiMode
    Initialising URLHandler
    Initialising CodeLink
    Initialising Testing
    Initialising Notification_Sound
    Initialising Tern
    Initialising Debugger
    Initialising Tour
    Initialising SettingsProfile
    Initialising HelpLinks
    Initialising Arrows
    Initialising CoreModules
    Loaded code from storage.
    serviceworker> active
    Handling URL "https://www.espruino.com/ide/"
    No navigator.serial - Web Serial not enabled
    ERROR: serial_frame: getPorts timeout, disabling
    ERROR: getURL("/serial/ports") error : Not Found
    /serial/ports doesn't exist - disabling WebSocket support
    Couldn't connect to wss://localhost:31234 - disabling websockets for this session
    >>> Connecting...
    Set Slow Write = true
    BT> ERROR: NotFoundError: User cancelled the requestDevice() chooser.
    ERROR: [notify_error] Connection Failed.
    >>> Connection Failed.
    >>> Connecting...
    Set Slow Write = true
    BT> ERROR: NotFoundError: User cancelled the requestDevice() chooser.
    ERROR: [notify_error] Connection Failed.
    >>> Connection Failed.
    



    Windows10

    Went to provide console output for native WebIDE app, but as device is now not recognized, get the 'No ports found' error when attempting to connect.

    We have chrome.serial - not using 'serialport' module
    Noble: module couldn't be loaded, no node.js Bluetooth Low Energy  Error: No compatible USB Bluetooth 4.0 device found!
    Disable Web Bluetooth as we have Winnus instead
    serial_audio: Audio Sample rate : 48000
    serial_audio: Audio Serial Baud 9600 Bit time 5
    GET chrome.storage.sync = {"AUTO_SAVE_CODE":true,"BAUD_RATE":9600,­"BLOCKLY_EXTENSIONS":"|bluetooth|robot|"­,"BLOCKLY_LANGUAGE":"en","BLOCKLY_TO_JS"­:false,"BOARD_JSON_URL":"http://www.espr­uino.com/json","CODE":"// TestNFCvCard.js\n// Sat 2019.10.26\n\n\n\n// http://forum.espruino.com/conversations/­315526/#comment14959445\n// https://www.espruino.com/NFCTag\n\n\n\nv­ar data = new Uint8Array(16+768);\ndata.set(\"\\x00\\x­00\\xE1\\x10\\x60\\x00\\x03\\x00\\xFE\",­ 0x0A);\n//var tag = require(\"NFCTag\").create(data);\n\n\n/­/Test vCard\nvar tag = require(\"NFCvCard\").create(data);\n\n\­n\n\n\n//[eof]","COMPILATION":true,"COMP­ILATION_URL":"https://www.espruino.com/s­ervice/compiler","DISABLE_CODE_HINTS":fa­lse,"ENABLE_Testing":false,"ENV_ON_CONNE­CT":true,"FONT_SIZE":12,"MINIFICATION_De­adCode":true,"MINIFICATION_LEVEL":"","MI­NIFICATION_Literal":true,"MINIFICATION_M­angle":true,"MINIFICATION_Unreachable":t­rue,"MINIFICATION_Unused":true,"MODULE_A­S_FUNCTION":false,"MODULE_EXTENSIONS":".­min.js|.js","MODULE_MINIFICATION_LEVEL":­"ESPRIMA","MODULE_PROXY_ENABLED":false,"­MODULE_PROXY_PORT":"","MODULE_PROXY_URL"­:"","MODULE_URL":"https://www.espruino.c­om/modules","OFFLINE_DATA":"","OFFLINE_D­ATA_DOWNLOAD":"","OFFLINE_DATA_UPLOAD":"­","OFFLINE_ENABLED":false,"RESET_BEFORE_­SEND":true,"SAVE_ON_SEND":0,"SERIAL_AUDI­O":"0","SERIAL_TCPIP":"","SERIAL_THROTTL­E_SEND":false,"SET_TIME_ON_WRITE":false,­"SHOW_CODE_LINK_ICON":false,"SHOW_WEBCAM­_ICON":0,"STORE_LINE_NUMBERS":true,"Soun­d_Error":"","Sound_Info":"","Sound_Succe­ss":"","Sound_Warning":"","Speak_Error":­false,"Speak_Info":false,"Speak_Success"­:false,"Speak_Warning":false,"UI_MODE":"­Normal","WEBCAM_CONSTRAINTS":0,"projectE­ntry":"DAC3B543885408F1D2551F8C13C954F9:­EspruinoNFC"}
    Initialising SettingsConsole
    Initialising Utils
    Initialising Config
    Initialising Notifications
    Initialising Status
    Initialising App
    Initialising File
    Initialising Code
    Initialising Serial
      - Initialising Serial Chrome Serial
      - Initialising Serial Chrome Socket
      - Initialising Serial Windows Bluetooth LE
      - Initialising Serial Web Audio
      - Initialising Serial Web Bluetooth
    Initialising Terminal
    Initialising CodeWriter
    Initialising Modules
    Initialising Env
    Initialising Flasher
    Initialising EditorBlockly
    Initialising EditorJavaScript
    Initialising Send
    Initialising MenuPortSelector
    Initialising MenuSettings
    Initialising MenuFlasher
    Initialising SettingsAbout
    Initialising SettingsFlasher
    Initialising BoardJSON
    Initialising VersionChecker
    Initialising Compiler
    Initialising Assembler
    Initialising GetGitHub
    Initialising Unicode
    Initialising Minify
    Initialising SaveOnSend
    Initialising SetTime
    Initialising Tutorial
    Initialising Webcam
    Initialising FontSize
    Initialising UiMode
    Initialising URLHandler
    Initialising CodeLink
    Initialising Project
    Initialising Testing
    Initialising Notification_Sound
    Initialising Tern
    Initialising Debugger
    Initialising Tour
    Initialising SettingsProfile
    Initialising HelpLinks
    Initialising Offline
    Loaded code from storage.
    GET chrome.storage.local.OFFLINE_DATA = 0 bytes
    Web Bluetooth available, but Windows Web Bluetooth is broken in <68 - not using it
    



    Tried the five second hard reset, but still not seen

    http://www.espruino.com/MDBT42Q

    Found this for STM32

    https://www.espruino.com/Serial+Bootload­er

    Are there instructions on how to flash NRF52 using the UART?



    EDIT:

    http://www.espruino.com/MDBT42Q#serial-c­onsole


    1 Attachment

    • MDBT42Q20191027UpdateFailedChrome.jpg
About

Avatar for Robin @Robin started