• This might no be a espruino problem, but someone might be able to help.

    I have a couple of Pixel.js units that are to display a value from a BLE advertisement packet.
    For testing I used some Ruuvi sensors and this works just fine, the script builds an array of senders mac addresses and reads out the temperature and humidity, and then updates the display.

    But then I got the real device we will listen to. This is based on a BlueGiga BLE112 module running a bgscript.
    I have no problems finding the device with the Lightblue app on iOS etc.
    I can also see the device just fine with Wireshark and the Adafruit BLE sniffer. I have attached a short pcap file with this data.
    But the Espruino will not see this device, or, after days of testing the Pixel.js has found the device once, thats it.

    The data sent has manufacturer id set to 0x8282 for this test.
    The first 4 bytes of the manufacturer data is a timer value in seconds, then some flags and the last byte is a signature that always reads 0xDB.

    The espruino script is a bit messy but this is in a testing phase... :-)


    2 Attachments

  • you may try with active: true as per https://www.espruino.com/Reference#l_NRF­_findDevices , also try to remove the filters in case it is the filter which is not matching for some reason

  • I used the filters in the findDevices function before but changed to dealing with it myself, if the manufacturer code is not 0x8282 it just prints the mac adress on the console, but if if it is 0x8282 it processes it for the screen.

    I added the active: true but it made no difference.

  • Is it not funny how things always resolve themself as soon as you ask a question??

    Found the problem, just a line that checked a data version of the ruuvi sensor and exited...

    It now works as expected :-)

  • I added the active: true but it made no difference.

    It makes a difference when data (like device name, or basically anything) is in scan response packet and not directly in advertisement packet. Packet size is very limited so sometimes the less important data is in scan response, which is asked for only with active scan. Anyway, great you got it working.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Pixel.js does not hear a specific device BLE advertisement

Posted by Avatar for user127454 @user127454

Actions