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

    SiPy Bluetooth

    Scheduled Pinned Locked Moved SiPy
    sipybluetooth
    6 Posts 2 Posters 2.1k Views 3 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.
    • S Offline
      sk
      last edited by sk

      My program isn't finding my phone (which has its bluetooth visible to all). Is there a certain time I need to scan for, currently I scan for 10 seconds.

      Program:

      from network import Bluetooth
      bluetooth = Bluetooth()
      
      bluetooth.start_scan(10)
      while bluetooth.isscanning():
          adv = bluetooth.get_adv()
          if adv:
              print(adv)
          else:
              print("NONE")
      
      1 Reply Last reply Reply Quote 0
      • J Offline
        jmarcelino
        last edited by jmarcelino

        The only way for your phone to appear in the scan is to turn it into a Bluetooth LE (BLE) peripheral device, for example by running some app that puts it into that mode.

        Phones are normally BLE central, so they don't advertise on BLE - they only scan for peripherals much like you're doing.

        (You may be be thinking of Bluetooth Classic, which is different)

        S 2 Replies Last reply Reply Quote 0
        • S Offline
          sk @jmarcelino
          last edited by

          @jmarcelino Thank you.
          I understand the problem now. I just wanted SiPy to act as a sniffer for cellphones with their bluetooth or wifi/hotspot on.

          1 Reply Last reply Reply Quote 0
          • S Offline
            sk @jmarcelino
            last edited by

            @jmarcelino is there any way to see a list of devices that SiPy has found whether or not it is advertising? Bluetooth must do an initial acknowledgement of some sort with other bluetooth devices, right? Is there a way to see the devices they acknowledge?

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              jmarcelino @sk
              last edited by

              @sk
              If your phone isn't advertising (as a BLE peripheral) then the SiPy will have no knowledge of it.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sk @jmarcelino
                last edited by

                @jmarcelino is there any way to configure this? Any libraries or plug ins for the board's BT sensor I could use?

                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