Avatar for user79870

user79870

Member since Jul 2017 • Last active Aug 2017
  • 1 conversations
  • 14 comments

Most recent activity

  • in Puck.js
    Avatar for user79870

    Wow -- I'd not seen that one. On point!

    Having played around with things a little more, I'm now thinking that the real fix is this:

    bluetoothctl
    remove [mac address of puck]
    

    Then maybe do a 'hard' reset on the puck. My bet is that if I'd done that, I would have been able to pair again from the Web IDE on the next attempt.

    Otherwise, things on my end seem to be working even without the --experimental flag set on bluetooth.service. Maybe because Arch is rolling release?

    Thanks again for all your time and help, Gordon. I still have to really dig into things, but having JS on these systems is amazing. I hope learning C and Python is in my future, but for now this opens up a lot of options for me. I ordered an Espruino WiFi today.

  • in Puck.js
    Avatar for user79870

    Done! : )

    I removed everything from npm, reverted everything back to defaults, unpaired/removed the puck with bluetoothctl, cleared the cache, restarted, removed all code from the IDE and saved the blank file, then I tried to pair straight from the IDE -- no pairing with bluetoothctl first, though I did have it open in the terminal.

    This is what the 'good' output looked like:

    [CHG] Controller 00:16:EB:79:49:23 Discovering: yes
    [NEW] Device F7:86:42:E9:36:7C Puck.js 367c
    [CHG] Device F7:86:42:E9:36:7C RSSI: -55
    [CHG] Device F7:86:42:E9:36:7C RSSI is nil
    [CHG] Controller 00:16:EB:79:49:23 Discovering: no
    [CHG] Device F7:86:42:E9:36:7C Connected: yes
    [CHG] Device F7:86:42:E9:36:7C Trusted: yes
    [NEW] Primary Service
        /org/bluez/hci0/dev_F7_86_42_E9_36_7C/se­rvice000a
        00001801-0000-1000-8000-00805f9b34fb
        Generic Attribute Profile
    [NEW] Primary Service
        /org/bluez/hci0/dev_F7_86_42_E9_36_7C/se­rvice000b
        6e400001-b5a3-f393-e0a9-e50e24dcca9e
        Nordic UART Service
    [NEW] Characteristic
        /org/bluez/hci0/dev_F7_86_42_E9_36_7C/se­rvice000b/char000c
        6e400003-b5a3-f393-e0a9-e50e24dcca9e
        Nordic UART RX
    [NEW] Descriptor
        /org/bluez/hci0/dev_F7_86_42_E9_36_7C/se­rvice000b/char000c/desc000e
        00002902-0000-1000-8000-00805f9b34fb
        Client Characteristic Configuration
    [NEW] Characteristic
        /org/bluez/hci0/dev_F7_86_42_E9_36_7C/se­rvice000b/char000f
        6e400002-b5a3-f393-e0a9-e50e24dcca9e
        Nordic UART TX
    [CHG] Device F7:86:42:E9:36:7C UUIDs: 00001800-0000-1000-8000-00805f9b34fb
    [CHG] Device F7:86:42:E9:36:7C UUIDs: 00001801-0000-1000-8000-00805f9b34fb
    [CHG] Device F7:86:42:E9:36:7C UUIDs: 6e400001-b5a3-f393-e0a9-e50e24dcca9e
    [CHG] Device F7:86:42:E9:36:7C ServicesResolved: yes
    

    Gordon, thanks again for your patience and persistence. I'm still not sure what went wrong or what fixed it. : \ I hope that things stay fixed!

  • in Puck.js
    Avatar for user79870

    Hi Gordon -- I finally have some good news. The puck works out of the box with the other system. The only thing I did there was turn the experimental features on in Chromium.

    I don't use that PC regularly, so I still need to try to get the other one to work. But it's great to see that the puck itself is working. And since it seems to work out of the box, I'm going to see if I can roll back to a cleaner slate on this machine.

  • in Puck.js
    Avatar for user79870

    Following is the developer console output from Chromium:

    Error in event handler for (unknown): TypeError: Cannot read property 'sites' of undefined
        at chrome-extension://fcdjadjbdihbaodagojio­mdljhjhjfho/scripts/atd-chrome.js:80:17
    blockly.html:1 Error in event handler for (unknown): TypeError: Cannot read property 'sites' of undefined
        at chrome-extension://fcdjadjbdihbaodagojio­mdljhjhjfho/scripts/atd-chrome.js:80:17
    settingsConsole.js:30 >>> Connecting...
    settingsConsole.js:30 Set Slow Write = true
    settingsConsole.js:30 >>> Connecting to Puck.js 367c
    settingsConsole.js:30 BT>  Device Name:       Puck.js 367c
    settingsConsole.js:30 BT>  Device ID:         VU8rXtEY9pk4SfQ02NQ8oA==
    settingsConsole.js:30 >>> Connected to BLE
    settingsConsole.js:30 BT> Connected
    settingsConsole.js:30 BT> Disconnected (gattserverdisconnected)
    settingsConsole.js:40 [notify_error] Connection Failed.
    console.error @ settingsConsole.js:40
    error @ notifications.js:46
    (anonymous) @ menuPortSelector.js:169
    (anonymous) @ serial.js:134
    closeSerial @ serial_web_bluetooth.js:175
    (anonymous) @ serial_web_bluetooth.js:116
    settingsConsole.js:30 >>> Connection Failed.
    settingsConsole.js:30 BT> ERROR: NetworkError: GATT Server is disconnected. Cannot retrieve services. (Re)connect first with `device.gatt.connect`.
    settingsConsole.js:40 [notify_error] Connection Failed.
    console.error @ settingsConsole.js:40
    error @ notifications.js:46
    (anonymous) @ menuPortSelector.js:169
    (anonymous) @ serial.js:134
    (anonymous) @ serial_web_bluetooth.js:164
    Promise rejected (async)
    openSerial @ serial_web_bluetooth.js:156
    openSerialInternal @ serial.js:108
    openSerial @ serial.js:76
    connectToPort @ menuPortSelector.js:162
    connect @ menuPortSelector.js:63
    selectPortInternal @ menuPortSelector.js:71
    selectPort @ menuPortSelector.js:75
    dispatch @ jquery-1.11.0.js:4624
    elemData.handle @ jquery-1.11.0.js:4292
    settingsConsole.js:30 >>> Connection Failed.
    

    And from Chrome:

    >>> Connecting...
    settingsConsole.js:30 Set Slow Write = true
    settingsConsole.js:30 >>> Connecting to Puck.js 367c
    settingsConsole.js:30 BT>  Device Name:       Puck.js 367c
    settingsConsole.js:30 BT>  Device ID:         xDBlb1DcMujaD0Zmnp670Q==
    settingsConsole.js:30 >>> Connected to BLE
    settingsConsole.js:30 BT> Connected
    settingsConsole.js:30 BT> Disconnected (gattserverdisconnected)
    settingsConsole.js:40 [notify_error] Connection Failed.
    console.error @ settingsConsole.js:40
    settingsConsole.js:30 >>> Connection Failed.
    settingsConsole.js:30 BT> ERROR: NetworkError: GATT Server is disconnected. Cannot retrieve services. (Re)connect first with `device.gatt.connect`.
    settingsConsole.js:40 [notify_error] Connection Failed.
    console.error @ settingsConsole.js:40
    settingsConsole.js:30 >>> Connection Failed.
    

    :\

    I'm going to try it on another PC now, although it's also running Arch.

  • in Puck.js
    Avatar for user79870

    The Relay Key entry should be 5th from the top in Communications.

    Strange -- I don't see it. I have: Auto Save, Baud Rate, Connect over Audio, Connect over Bluetooth Smart (Web Bluetooth), Reset Before Send, Store Line Numbers . . . but no Relay Key.

    Which one doesn't work in Firefox? the phone, or the PC version?

    Sorry, Firefox didn't work on Android, but Chrome did. I'm using Chromium on the PC.

    When you start espruino-server after doing all that extra stuff and go to the 'connect' window, do you see noble starting scan now?

    I don't see that message. On the terminal, I get this output:
    Wed Aug 02 2017 16:22:58 GMT+0000 (UTC) HTTP GET /serial/ports

    Interestingly enough, if I go to Communications on espruino-server, I don't see an option for Connect over Bluetooth Smart (Web Bluetooth), which I can see in the Web IDE.

    You could look in /usr/lib/node_modules/espruino-web-ide/n­ode_modules/ (or whatever your npm directory was) and see if noble was in there[.]

    It is indeed there. : \

    Do you think any further debugging is useful at this point? It would be great to get the puck working, but I'm wondering if I might have better luck exchanging it for a pico or wifi.

  • in Puck.js
    Avatar for user79870

    FYI, I didn't post this before, but this is the console output from the PC's Web IDE, if I try to connect directly to the puck:

    >>> Connecting...
    Set Slow Write = true
    >>> Connecting to Puck.js 367c
    BT>  Device Name:       Puck.js 367c
    BT>  Device ID:         /V/CLksgIvVJ0Sn0qd0mAA==
    >>> Connected to BLE
    BT> Connected
    BT> Disconnected (gattserverdisconnected)
    ERROR: [notify_error] Connection Failed.
    >>> Connection Failed.
    BT> ERROR: NetworkError: GATT Server is disconnected. Cannot retrieve services. (Re)connect first with `device.gatt.connect`.
    ERROR: [notify_error] Connection Failed.
    >>> Connection Failed.
    
  • in Puck.js
    Avatar for user79870

    I did not see noble starting scan in the console.

    I tried reinstalling the server and noble. I'm not sure if I missed it the first time, but I'm getting a bunch of errors throughout the npm installs. Quickly skimming them over, they appear to be permissions issues. I have my npm setup with a different default directory (as per option 2 here -- could that be the issue, especially if I'm running with sudo?

    Also, libudev-dev is not available in Arch -- I installed libudev0-shim -- perhaps another source of problems?

    I'd be happy to email the error logs, if that is useful.

    The packages do eventually install, so I also tried installing noble (also had some warnings), but espruino-server still doesn't work with Bluetooth.

    I've also made sure to run the setcap command. No apparent problems with that command.

    I tried the Web IDE relay -- a couple of issues:

    1. Maybe obvious, but it didn't work in Firefox. Installed Chrome, which tries to pair.
    2. Initially, the puck seemed to connect. I went to pull up the browser on the PC. When I returned to Android, the connection had failed.
    3. I tried reconnecting again, but the connection would instantly fail. I reset the puck, and this continued a few times. Eventually, I was able to connect.
    4. However, going back to the PC, I couldn't find the option to enter the relay key. Is it not under the Communications tab anymore?
  • in Puck.js
    Avatar for user79870

    Hi Gordon,

    Here's the current status -- all with a fresh battery:

    1. On 1v93:

      • espruino -p can connect to the puck. It stays connected.

      • espruino-server loads, but only displays connections for serial. It does this even if I successfully connect with espruino, both before and after starting the server. If I run espruino after espruino-server the latter's terminal output gives the unknown peripheral message.

      • bluetoothctl is not able to connect (or rather, connects then immediately disconnects) although I think I was able to connect before I tried setting up the npm packages.

    2. On 1v93.149, which I have been able to flash (I forgot to hold the button down, sorry!) everything is the same. After the firmware flashed, I held the button down until all three LEDs lit up.

    3. On 1v91, I am able to successfully connect with bluetoothctl! However, this has made no difference with either the online IDE or espruino-server. : \

    4. With Android, everything seems to be connecting smoothly, and flashing firmware seems to work well, with the blue LED staying on and then blinking off after 100% on DFU.

    I'm still able to connect to my other Bluetooth devices (keyboard, speaker) without problems.

    Is there anything else I can do?

  • in Puck.js
    Avatar for user79870

    One more update: I tried flashing 1v91 on the puck, and now I'm getting DFU SERVICE NOT FOUND.

    Do I have a bricked puck?

Actions