Avatar for squyrrel

squyrrel

Member since Jan 2018 • Last active Mar 2018
  • 1 conversations
  • 10 comments

Sorry, had to change my user name for personal and practical reasons.

Avatar coming soon.

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for squyrrel

    Hi Gordon,

    (sorry for my name change, did this for practical reasons),
    i did not use the PI 3 yet (too impatient for configuring it right now) but tried a bit more with the Web IDE.
    The Puck is a very nice toy for embedded programming with Javascript, I like it.

    What I found is that chances for connecting with Puck seems to increase dramatically when closing the Chrome browser on Windows 10.
    Perhaps this may give an indication of the reason for connection problems?

    Best regards,
    squyrrel

  • in Puck.js, Pixl.js and MDBT42
    Avatar for squyrrel

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

    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.str­ingify(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\":\"cef34f5483ea097d2c6362b59b7b­a6e11db1317d\",\"BOARD\":\"PUCKJS\",\"CH­IP\":\"NRF52832\",\"CHIP_FAMILY\":\"NRF5­2\",\"FLASH\":524288,\"RAM\":65536,\"SER­IAL\":\"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?

  • in Puck.js, Pixl.js and MDBT42
    Avatar for squyrrel

    Hi Gordon,

    I really appreciate your efforts!

    I tried your modified Web IDE, and of course something has changed.
    And it it really faster.

    Now it finds the Puck but still cannot connect.
    When starting the Web IDE, console log looks like this:

    We have chrome.serial - not using 'serialport' module
    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,"BLUETOOTH_LOW_ENERGY":true,"BOAR­D_JSON_URL":"http://www.espruino.com/jso­n","CODE":"var  on = false;\nsetInterval(function() {\n  on = !on;\n  LED1.write(on);\n}, 500);","COMPILATION":true,"COMPILATION_U­RL":"http://www.espruino.com:32766","DIS­ABLE_CODE_HINTS":false,"ENABLE_Testing":­false,"ENV_ON_CONNECT":true,"FONT_SIZE":­12,"MINIFICATION_DeadCode":true,"MINIFIC­ATION_LEVEL":"","MINIFICATION_Literal":t­rue,"MINIFICATION_Mangle":true,"MINIFICA­TION_Unreachable":true,"MINIFICATION_Unu­sed":true,"MODULE_AS_FUNCTION":false,"MO­DULE_EXTENSIONS":".min.js|.js","MODULE_M­INIFICATION_LEVEL":"ESPRIMA","MODULE_PRO­XY_ENABLED":false,"MODULE_PROXY_PORT":""­,"MODULE_PROXY_URL":"","MODULE_URL":"htt­ps://www.espruino.com/modules","OFFLINE_­DATA":"","OFFLINE_DATA_DOWNLOAD":"","OFF­LINE_DATA_UPLOAD":"","OFFLINE_ENABLED":f­alse,"RESET_BEFORE_SEND":true,"SAVE_ON_S­END":0,"SERIAL_AUDIO":"0","SERIAL_TCPIP"­:"","SERIAL_THROTTLE_SEND":false,"SET_TI­ME_ON_WRITE":false,"SHOW_CODE_LINK_ICON"­:false,"SHOW_WEBCAM_ICON":0,"STORE_LINE_­NUMBERS":true,"Sound_Error":"","Sound_In­fo":"","Sound_Success":"","Sound_Warning­":"","Speak_Error":false,"Speak_Info":fa­lse,"Speak_Success":false,"Speak_Warning­":false,"UI_MODE":"Normal","WEBCAM_CONST­RAINTS":0}
    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 Noble Bluetooth LE
      - 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 SetTime
    Loaded code from storage.
    Noble: stateChange -> poweredOn
    

    And clicking on connect field, it scans and offers the Puck.js for connection!
    (It displays the MAC address as its name and in the second line (smaller) "Puck.js 3172".

    But then ....

    Noble: Starting scan
    Web Bluetooth available, but Windows Web Bluetooth is broken in <=60 - not using it
    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
    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
    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
    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
    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
    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.
    

    I also tried this with several firmware versions of the Puck.js.
    I tried 1v95 (official), but also 1v94, 1v95.153 (latest) and 1v95.157, they all behaved the same.
    Having WinUSB driver installed on PC all the time.

    Thought I saw some similar problems in this form, but perhaps not exactly the same.
    Maybe there is a solution now, somehow, probably its just a little change of whatsoever.

    Any more advice for me?

    Best regards,
    squyrrel

  • in Puck.js, Pixl.js and MDBT42
    Avatar for squyrrel

    Maybe here starts the problem?

    Disable Web Bluetooth as we have Winnus instead
    

    To me, this looks like Web IDE will only search for kind of "serial" devices. Like the COM1 port.

    Unfortunately I cannot find any detailed information about winnus except its github page.

    Why is Web Bluetooth superfluous now, I thought it was used for connection of the Web IDE to the Puck?
    Are there additional requirements for communicating between Web IDE and Puck using winnus?

  • in Puck.js, Pixl.js and MDBT42
    Avatar for squyrrel

    Ok, installing WinUSB again with zadig, then reboot, with CRS 4.0 module plugged in.
    Then starting native Web IDE.

    This is the console log:

    We have chrome.serial - not using 'serialport' module
    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,"BLUETOOTH_LOW_ENERGY":true,"BOAR­D_JSON_URL":"http://www.espruino.com/jso­n","CODE":"var  on = false;\nsetInterval(function() {\n  on = !on;\n  LED1.write(on);\n}, 500);","COMPILATION":true,"COMPILATION_U­RL":"http://www.espruino.com:32766","DIS­ABLE_CODE_HINTS":false,"ENABLE_Testing":­false,"ENV_ON_CONNECT":true,"FONT_SIZE":­12,"MINIFICATION_DeadCode":true,"MINIFIC­ATION_LEVEL":"","MINIFICATION_Literal":t­rue,"MINIFICATION_Mangle":true,"MINIFICA­TION_Unreachable":true,"MINIFICATION_Unu­sed":true,"MODULE_AS_FUNCTION":false,"MO­DULE_EXTENSIONS":".min.js|.js","MODULE_M­INIFICATION_LEVEL":"ESPRIMA","MODULE_PRO­XY_ENABLED":false,"MODULE_PROXY_PORT":""­,"MODULE_PROXY_URL":"","MODULE_URL":"htt­ps://www.espruino.com/modules","OFFLINE_­DATA":"","OFFLINE_DATA_DOWNLOAD":"","OFF­LINE_DATA_UPLOAD":"","OFFLINE_ENABLED":f­alse,"RESET_BEFORE_SEND":true,"SAVE_ON_S­END":0,"SERIAL_AUDIO":"0","SERIAL_TCPIP"­:"","SERIAL_THROTTLE_SEND":false,"SET_TI­ME_ON_WRITE":false,"SHOW_CODE_LINK_ICON"­:false,"SHOW_WEBCAM_ICON":0,"STORE_LINE_­NUMBERS":true,"Sound_Error":"","Sound_In­fo":"","Sound_Success":"","Sound_Warning­":"","Speak_Error":false,"Speak_Info":fa­lse,"Speak_Success":false,"Speak_Warning­":false,"UI_MODE":"Normal","WEBCAM_CONST­RAINTS":0}
    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 Noble
      - Initialising Serial Windows NUS BLE
      - Initialising Serial 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 SetTime
    Initialising Minify
    Initialising SaveOnSend
    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
    

    Then click the yellow "Connect/Disconnect" field, but only COM1 is avaliable.

    When choosing this, connection becomes green and status bar says CONNECTED TO PORT COM1 .
    Console log adds:

    Web Bluetooth available, but Windows Web Bluetooth is broken in <=60 - not using it
    >>> Connecting...
    Set Slow Write = true
    [object Object]
    Connected [object Object]
    Found a prompt... great!
    >>> Sending...
    ---> "\u0010console.log(\"<\",\"<<\",JSON.str­ingify(process.env),\">>\",\">\")\n"
    >>> Sent
    WARNING: No result found - just got ""
    Device found (connectionId=1)
    [success] Connected to port COM1
    

    No noble starting scan ...
    In the communications settings, "Connect over Bluetooth Smart (BTLE) via 'noble'" is enabled.
    I did not change anything there.
    What more can I check/do now?

    Thank you very much,
    squyrrel

  • in Puck.js, Pixl.js and MDBT42
    Avatar for squyrrel

    Thank you Gordon,

    I am sorry, I had no access to my PC since.
    Hopefully again this evening or tomorrow.

    From what I remember, with WinUSB (but also with native driver) the console log said that 1 device was found. It was happy that it saw a prompt, which meant that there is a device, but after sending some complex expression (can't remember exactly but I hope you know which) it said that there was only a "" response. One more line, and that was all.
    However, I believe this must be the COM1 port, which is not the BLE dongle.

    I have Bluetooth switched off (nearly) all the time on tablet and phone, so no chance that the Puck can silently pair with one of these. And switching it on, I can see the Puck advertising so it is also not paired with any other device.
    I will post the console log when trying again with WinUSB drivers.

    No Raspberry Pi here, but perhaps I will have an old Windows 7 notebook (not upgradable because of insufficient hardware) available, which has USB 2.0 ports, will give it a try then.

    Best regards,
    sqyrrel

  • in Puck.js, Pixl.js and MDBT42
    Avatar for squyrrel

    Unfortunately I had no luck.

    I installed Zadig 2.3. My CSR 4.0 dongle is visible as "Generic Bluetooth Radio", I installed the WinUSB Driver for it.
    After this, the Bluetooth section disappeared from the device manager, and the Bluetooth on/off toggle switch in the devices overview was also gone. (This was not a problem for me, as I do not use any other Bluetooth peripheral with my PC.)
    However, I like to ask whether this is expected behavior with the WinUSB driver installed?

    But it made no difference. The native Web IDE did not recognize the dongle before (only a COM1 port, which seems to be another device) and it still does not recognize it now.

    I then played around a few hours with removing and plugging the BLE dongle while installing, reinstalling and deinstalling drivers and devices in the device manager.
    But for the native Web IDE nothing changed.

    This is start of console log when having the native Windows-10 drivers:

    We have chrome.serial - not using 'serialport' module
    'noble' module couldn't be loaded, no node.js Bluetooth Low Energy Error: LIBUSB_ERROR_NOT_SUPPORTED
    Disable Web Bluetooth as we have Winnus instead
    serial_audio: Audio Sample rate : 48000
    ...

    And this is with WinUSB drivers:

    We have chrome.serial - not using 'serialport' module
    Disable Web Bluetooth as we have Winnus instead
    serial_audio: Audio Sample rate : 48000
    ...

    Now I perhaps have missed something ... I must probably try something else.
    Any help will be appreciated!

    Best regards,
    squyrrel

  • in Puck.js, Pixl.js and MDBT42
    Avatar for squyrrel

    Hi Gordon,

    thank you very much for your advice!
    Then I will try connection from native Web IDE directly with the help of Zadig and WinUSB (I hope this still exists in Windows 10) this evening.

    Best regards,
    squyrrel

  • in Puck.js, Pixl.js and MDBT42
    Avatar for squyrrel

    Hi,
    I got a Puck.js and a "CSR 4.0" Bluetooth USB adapter for my desktop PC a few days ago.
    Firstly I updated the Puck.js to firmware 1v95 with my android tabled, which worked well.
    Then I installed the native Web IDE.

    Since then, I have been trying to discover and pair the Puck.js with my desktop PC, but without luck.
    The PC has Windows 10 v. 1703 (Creators Update).
    The CSR dongle uses native Windows drivers, which were automatically installed when first inserting it. Searching for driver update MS says everything is up to date.
    Windows PC Bluetooth recognizes my tablet when I switch Bluetooth on there, but it does not see the Puck.js and also no other BLE HID devices that can bee seen with the tablet.
    Deinstalling/reinstalling dongle and drivers did not change anything, I even tried installation of CSR Harmony stack, which only led to error messages when tring to enable Bluetooth. So I deinstalled it and after reinserting the dongle native windows drivers were there again.

    The Creators Update seems to be notorious for problems with BLE, as I found many discussions on internet about suddenly invisible/unusable peripheral devices after update to v.1703.

    So my question to other Puck.js developers on Windows 10 with Creators Update:
    How do you still connect to your Puck. js?
    Do you use a different dongle (Broadcom?) Or what does the trick for you?

Actions