Bluetooth scan cannot find device



  • Hello guys

    I have some troubles with my pycom WiPy 2.0 and a Bluetooth device (EMBC02). If I scan with my WiPy, it doesn’t find the EMBC02. Other device does it find very well.
    If I scan with my Smartphone (Samsung Galaxy S7), it does find the EMBC02.

    Has anyone an idea why I can’t see the EMBC02 with my WiPy?

    I use follow code(from pycom docs):
    from network import Bluetooth
    bluetooth = Bluetooth()
    bluetooth.start_scan(-1) # start scanning with no timeout
    while True:
    print(bluetooth.get_adv())

    The Datasheet from EMBC02:
    Datasheet

    Thank you, for your help!



  • @Arthur
    I got a dev kit this morning and did some test.
    These beacons are pre-programmed with a three modes state machine, and you can iterate through modes with a short press of the button.

    Mode 1: advertise every second forever (but it's not a standard beacon advertisement, see update below)
    Mode 2: advertise every 100 ms for 60 seconds after movement
    Mode 3: advertise every 100 ms for 10 minutes after fall detection

    In first mode, it takes time to recognize a beacon advertising every 1 second, but eventually WiPy catches it.
    In second mode, WiPy gets adverts more quickly, because the beacon is transmitting 10x times faster than mode 1, but after 60 seconds it stops advertising by design. Are these the 60 seconds of visibility you are referring to ? If yes, it's ok.

    UPDATE:
    In mode 1 WiPy detects adverts very rarely. It's not a standard beacon advert (it's lacking major and minor).
    For example, try to advertise 0f09454d426561636f6e3138303931000eff5a00b0003032290000324fc002 and WiPy gets it one time in 5 minutes (!) Why ?

    Claudio



  • Thanks @Arthur
    Hell :) I am waiting for some EMBC02 myself, and I hoped that the issue was solved.
    Anyway BLE is better, but not totally reliable (yet), from what I see.

    Claudio



  • Hi @duffo64

    Yes, the update was helpful! But only for the other devices (Smartphone, ...)- works much better now.
    With the EMBC02 I have still some problems, I find them only all 60 seconds…

    Follow link you will find the logfile and the new BLE code:
    Code and Log

    Arthur



  • Hi @Arthur

    Did you try with the just released version to see if EM beacons are detected now ?

    Claudio



  • @littlebat Interesting. We cant apply that on a WiPy by ourself, can we?





  • @littlebat Do you have the Changefile for said update? Would be quite interesting to see this.

    Sometimes there is also a problem that the WiPy 2.0 can't find any BLE device, which is quite Strange.



  • There are some recent bugfixes in esp32 SDK which may solve this, I don't think pycom has applied them yet



  • Hi @bucknall

    Thank you, for your support!

    Scanned three different Bluetooth devices:

    • EMBC02 (didn’t work)
    • ESTIMOTE (worked)
    • Notebook (worked)

    With the EMBC02 I received nothing, it looked like this:
    PYB: soft reboot
    None
    None
    None
    None
    None
    None
    None
    None
    None

    With the ESTIMODE and Notebook I received something, it looked like this:
    PYB: soft reboot
    (mac=b'\xcb\xdf\xf2E\xe9\xf9', addr_type=1, adv_type=0, rssi=-37, data=b'\x02\x01\x06\x1a\xffL\x00\x02\x15\xb9@\x7f0\xf5\xf8Fn\xaf\xf9%UkW\xfem\xe9\xf9\xf2E\xc4\x00')
    None
    None
    None
    (mac=b'\xcb\xdf\xf2E\xe9\xf9', addr_type=1, adv_type=0, rssi=-38, data=b'\x02\x01\x06\x1a\xffL\x00\x02\x15\xb9@\x7f0\xf5\xf8Fn\xaf\xf9%UkW\xfem\xe9\xf9\xf2E\xc4\x00')
    None

    I scanned 20 seconds, multiple times, the result was always the same.
    I uploaded the complete scan and screenshots from my smartphone (which did find all Bluetooth device):
    Link

    I hope you can help me to find a solution of my problem.


  • administrators

    @Arthur Can you please provide the output of the REPL console when you run this code? It might not list the exact name of your device, it might be slightly different.

    Thanks!



  • Hi bucknall
    Yes, I worked with the newest version. I had also tested with different WiPy.

    Edit:
    To verification:
    os.uname()
    (sysname='WiPy', nodename='WiPy', release='1.7.8.b1', version='v1.8.6-724-g2b9ed601 on 2017-07-28', machine='WiPy with ESP32')


  • administrators

    Hi @Arthur,

    Have you updated your device to the latest firmware? It should be version v1.7.8.b1

    Thanks,

    Alex


Log in to reply
 

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.