Avatar for chowlett

chowlett

Member since Mar 2018 • Last active Mar 2018
  • 1 conversations
  • 2 comments

Most recent activity

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

    OK, well I was able to connect.

    For the benefit of others, this is what I did:

    First, I checked the bluetooth adapter in my laptop was capable of BLE:

    hciconfig -a
    ...
    HCI Version: 4.1 (0x7) REvision: 0x0

    This tells me it is.

    Next I checked my version of bluetoothd:

    bluetoothd --version
    5.47

    That tells me I'm ok there.

    Next I restarted my bluetooth service:

    sudo /etc/init.d/bluetooth restart
    [ ok ] Restarting bluetooth (via systemctl): bluetooth.service.

    Next I started following this tutorial: https://www.jaredwolff.com/blog/get-starĀ­ted-with-bluetooth-low-energy/

    hcitool dev
    Devices:

    hci0    64:6E:69:BA:A2:58
    

    sudo hcitool lescan
    LE Scan ...
    C2:20:44:79:31:EE Puck.js 31ee

    So my laptop can see my Puck!

    Next I tried connecting with gatttool:

    sudo gatttool --device=C2:20:44:79:31:EE -I
    [C2:20:44:79:31:EE][LE]> connect
    Attempting to connect to C2:20:44:79:31:EE
    Error: connect error: Connection refused (111)

    So I tried using btmgmt:

    sudo btmgmt le on
    hci0 Set Low Energy complete, settings: powered connectable discoverable bondable ssp br/edr le secure-conn

    I still saw the connection refused. but restarting the bluetooth service and attempting gatttool again, this time with the -t random option saw success:

    sudo gatttool --device=C2:20:44:79:31:EE -I -t random
    [C2:20:44:79:31:EE][LE]> connect
    Attempting to connect to C2:20:44:79:31:EE
    Connection successful

    I could then follow the tutorial above, access primary services and characteristics successfully.

    Then I tried the web IDE again and lo and behold the Puck shows up. A few more attempts and I was able to connect to it...

    Hope that helps someone.

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

    Hi,

    I just got my first Puck and am really struggling to get started.

    I'm running Linux (Lubuntu 17.10) and can't get the Web IDE in Chrome to see the Puck.

    The Espruino website says I have web-bluetooth enabled. From the Web-IDE in chrome, I click the yellow button and then select the web-bluetooth port. The pairing pop-up starts scanning, but never sees any device.

    I've upgraded bluez to 5.4.7.

    I can see my iphone when it's discoverable in bluetoothctl or the bluetooth manager UI.

    On my iphone I can see the Puck in nRF Connect. I've successfully updated the Puck's firmware to 1v96 using nRF Toolbox on the iphone.

    What am I doing wrong?

    Thanks

Actions