Avatar for otbe

otbe

Member since Oct 2015 • Last active Dec 2016
  • 3 conversations
  • 9 comments

Most recent activity

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

    Sorry no chance to get this working :/
    The other way works great. I'm able to advertise arbitrary data via BLE and get messages back :)

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

    Same problem after git pull. It keeps erroring while connecting (with and without named devices) :/

    There is a new error (after a fresh successfully npm i) noble: unknown peripheral null connected!

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

    Sorry for my late response. I tried your advice to remove the naming, but the output is identical.

    Config loaded
    MQTT Connected
    <HTTPProxy> Bleno State poweredOn
    <HTTPProxy> Bleno.startAdvertising Success
    <HTTPProxy> Bleno.setServices Success
    Scanning started...
    MQTT>/ble/write/c9:88:f0:97:da:57/nus/nu­s_tx => "LED1.set();\\n"
    Service 	6e400001b5a3f393e0a9e50e24dcca9e
    Characteristic 	6e400002b5a3f393e0a9e50e24dcca9e
    <Connect> Error Connecting
    
    Tue Dec 13 2016 19:30:16 GMT+0100 (CET)
    
    5a:8b:0c:72:57:56 - ? (RSSI -66)
    68:d9:3c:8e:46:b3 - ? (RSSI -43)
    c9:88:f0:97:da:57 - Puck.js da57 (RSSI -84)
      1809 => {"temp":102}
    
  • in Puck.js, Pixl.js and MDBT42
    Avatar for otbe

    Note:
    I wonder how to "control" the puck in some way. I tried your advice at https://www.espruino.com/Puck.js+Node-RE­D.

    So I published {"payload": "LED1.set();\n"} (and also LED1.set();\n) to /ble/write/puck1/nus/nus_tx
    But all I get is:

    MQTT>/ble/write/puck1/nus/nus_tx => "{\"payload\": \"LED1.set();\\n\"}"
    Service 	6e400001b5a3f393e0a9e50e24dcca9e
    Characteristic 	6e400002b5a3f393e0a9e50e24dcca9e
    <Connect> Error Connecting
    

    Am I missing some advertising?

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

    I guess I got it now :)
    I finally receive something on /ble/advertise/puck1/1809
    Is it possible/"allowed" to reuse other BLE Service UUIDs for custom data (Light,Mag,Temp, BTN state) ?

    Thank you. !

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

    Hi,

    these days I received my puck and I wonder how you connect your pucks to some REST/mqtt services.
    For example: I have a openhab automated "smart home" and I want to push some data from the puck to the REST API of openhab (btn click, temp, light, mag etc).
    First I tried to use the fantastic EspruinoHub project, but BLE4 HTTP Proxy seems a bit limited with only 20bytes payload (and yes uri's are payload too :D). I hacked a bit the sources and get it working by "encoding" some requests, for example the request

    require("ble_http").httpRequest(device, "myItem/state", function(d) {})
    

    will be made to http://openhab:8080/rest/items/myItem/st­ate. This can be a direction to go, but it needs some work.

    Another way would be the MQTT feature of EspruinoHub, but I didnt get it working (especially with custom data).

    What are you guys using for connecting your pucks to the world?

    Btw:
    Whats the proper way to ask for temperature via mqtt?
    Tried /ble/read/puck1/1809/2A1C so far

    • 2 comments
    • 2,684 views
  • in Puck.js, Pixl.js and MDBT42
    Avatar for otbe

    Hi,

    I setup the Espruino Hub on my raspberry pi (2) and all seems to work very well. I can successfully run

    NRF.requestDevice({ filters: [{ services: ['1823'] }] }).then(function(device) { console.log(device) })
    

    and get the hubs bluetooth dongle as result. But if I run the full example from https://www.espruino.com/Puck.js+HTTP+Pr­oxy I just get WARNING: Module "ble_http" not found.

    I updated my puck to 1.89, what Im missing? :)

    Thanks!

  • in Interfacing
    Avatar for otbe

    Hi,

    after my post I re-read the docs to verify that the LSM9DS0 is capable of block reading. Yes it is, but I overlooked something. The MSB of the register to read must be 1 for auto incrementing the address. I will give this a try later and add another post. :)

    Thank you.

    Edit: hehe you were faster :D

Actions