Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Bluetooth scan cannot find device

    Scheduled Pinned Locked Moved WiPy 2&3
    bluetoothembc02wipy 2.0
    14 Posts 5 Posters 4.1k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      bucknall
      last edited by

      Hi @Arthur,

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

      Thanks,

      Alex

      Developer Evangelist - Pycom

      1 Reply Last reply Reply Quote 0
      • A Offline
        Arthur
        last edited by Arthur

        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')

        B 1 Reply Last reply Reply Quote 1
        • B Offline
          bucknall @Arthur
          last edited by

          @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!

          Developer Evangelist - Pycom

          A 1 Reply Last reply Reply Quote 1
          • A Offline
            Arthur @bucknall
            last edited by

            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.

            D 1 Reply Last reply Reply Quote 1
            • L Offline
              littlebat
              last edited by

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

              R 1 Reply Last reply Reply Quote 1
              • R Offline
                redimo @littlebat
                last edited by

                @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.

                1 Reply Last reply Reply Quote 1
                • L Offline
                  littlebat
                  last edited by

                  https://github.com/espressif/esp32-bt-lib/commit/11c13cfe5f0fcf68c4b08662f4bf1ae5cab3a2b0

                  R 1 Reply Last reply Reply Quote 1
                  • R Offline
                    redimo @littlebat
                    last edited by

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

                    1 Reply Last reply Reply Quote 1
                    • D Offline
                      duffo64 @Arthur
                      last edited by duffo64

                      Hi @Arthur

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

                      Claudio

                      /Claudio

                      A 1 Reply Last reply Reply Quote 1
                      • A Offline
                        Arthur @duffo64
                        last edited by Arthur

                        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

                        D 2 Replies Last reply Reply Quote 0
                        • D Offline
                          duffo64 @Arthur
                          last edited by duffo64

                          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

                          /Claudio

                          1 Reply Last reply Reply Quote 0
                          • D Offline
                            duffo64 @Arthur
                            last edited by duffo64

                            @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).

                            WiPy gets it one time in 5 minutes (if you are lucky). Why ?

                            Claudio

                            /Claudio

                            D 1 Reply Last reply Reply Quote 0
                            • D Offline
                              duffo64 @duffo64
                              last edited by duffo64

                              @Arthur

                              I did a scan with an Ubertooth One laying around, just to confirm that my embc02 is working and to trace the exact content of its advertisements (hope will be useful for someone).

                              systime=1503417955 freq=2402 addr=8e89bed6 delta_t=1008.339 ms rssi=-39
                              02 25 b4 46 0b ee f3 0c 0f 09 45 4d 42 65 61 63 6f 6e 31 38 30 39 31 00 0e ff 5a 00 bf f8 30 32 29 00 07 d2 e1 c0 01 23 21 3f 
                              Advertising / AA 8e89bed6 (valid)/ 37 bytes
                                  Channel Index: 37
                                  Type:  ADV_NONCONN_IND
                                  AdvA:  0c:f3:ee:0b:46:b4 (public)
                                  AdvData: 0f 09 45 4d 42 65 61 63 6f 6e 31 38 30 39 31 00 0e ff 5a 00 bf f8 30 32 29 00 07 d2 e1 c0 01
                                      Type 09 (Complete Local Name)
                                         EMBeacon18091.
                                      Type ff (Manufacturer Specific Data)
                                         Company: EM Microelectronic-Marin SA
                                         Data: bf f8 30 32 29 00 07 d2 e1 c0 01
                              
                                  Data:  b4 46 0b ee f3 0c 0f 09 45 4d 42 65 61 63 6f 6e 31 38 30 39 31 00 0e ff 5a 00 bf f8 30 32 29 00 07 d2 e1 c0 01
                                  CRC:   23 21 3f
                              
                              systime=1503417956 freq=2402 addr=8e89bed6 delta_t=1002.886 ms rssi=-40
                              02 25 b4 46 0b ee f3 0c 0f 09 45 4d 42 65 61 63 6f 6e 31 38 30 39 31 00 0e ff 5a 00 bf f8 30 32 29 00 07 d2 e2 c0 01 d1 91 99 
                              Advertising / AA 8e89bed6 (valid)/ 37 bytes
                                  Channel Index: 37
                                  Type:  ADV_NONCONN_IND
                                  AdvA:  0c:f3:ee:0b:46:b4 (public)
                                  AdvData: 0f 09 45 4d 42 65 61 63 6f 6e 31 38 30 39 31 00 0e ff 5a 00 bf f8 30 32 29 00 07 d2 e2 c0 01
                                      Type 09 (Complete Local Name)
                                         EMBeacon18091.
                                      Type ff (Manufacturer Specific Data)
                                         Company: EM Microelectronic-Marin SA
                                         Data: bf f8 30 32 29 00 07 d2 e2 c0 01
                              
                                  Data:  b4 46 0b ee f3 0c 0f 09 45 4d 42 65 61 63 6f 6e 31 38 30 39 31 00 0e ff 5a 00 bf f8 30 32 29 00 07 d2 e2 c0 01
                                  CRC:   d1 91 99
                              
                              systime=1503417957 freq=2402 addr=8e89bed6 delta_t=1002.474 ms rssi=-40
                              02 25 b4 46 0b ee f3 0c 0f 09 45 4d 42 65 61 63 6f 6e 31 38 30 39 31 00 0e ff 5a 00 bf f8 30 32 29 00 07 d2 e3 c0 01 80 41 68 
                              Advertising / AA 8e89bed6 (valid)/ 37 bytes
                                  Channel Index: 37
                                  Type:  ADV_NONCONN_IND
                                  AdvA:  0c:f3:ee:0b:46:b4 (public)
                                  AdvData: 0f 09 45 4d 42 65 61 63 6f 6e 31 38 30 39 31 00 0e ff 5a 00 bf f8 30 32 29 00 07 d2 e3 c0 01
                                      Type 09 (Complete Local Name)
                                         EMBeacon18091.
                                      Type ff (Manufacturer Specific Data)
                                         Company: EM Microelectronic-Marin SA
                                         Data: bf f8 30 32 29 00 07 d2 e3 c0 01
                              
                                  Data:  b4 46 0b ee f3 0c 0f 09 45 4d 42 65 61 63 6f 6e 31 38 30 39 31 00 0e ff 5a 00 bf f8 30 32 29 00 07 d2 e3 c0 01
                                  CRC:   80 41 68
                              

                              Logged in GitHub as https://github.com/pycom/pycom-micropython-sigfox/issues/54

                              /Claudio

                              1 Reply Last reply Reply Quote 0

                              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                              With your input, this post could be even better 💗

                              Register Login
                              • 1 / 1
                              • First post
                                Last post

                              Pycom on Twitter

                              Pycom