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 deinit bug in RC7-RC10

    Scheduled Pinned Locked Moved Issues & Bugs
    2 Posts 2 Posters 290 Views 2 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.
    • R Offline
      rfinkers
      last edited by

      Hello,
      I think I found a bug inside the firmware, 1.20.0.rc7 and further.
      I'm using bluetooth to detect bluetooth beacons nearby.
      Inside my code I'm disable and enable bluetooth sometimes, using init() and deinit().
      But when I'm using a newer RC version and I've called deinit(), the bluetooth is not working anymore.
      I've used the init() function after the deinit() and then it can't find anything anymore.
      With the same code on RC4 it's working.

      This is my test code:

          def bt_test(self):
              self.bt.init()
              time.sleep(2)
              self.bt.start_scan(2)
              time.sleep(2)
              adv = self.bt.get_advertisements()
              print(adv)
              self.bt.deinit()
      

      The first time it found some devices and the second time nothing.

      1 Reply Last reply Reply Quote 2
      • T Offline
        t0000899
        last edited by t0000899

        This is still an issue in the latest frimware!
        Light sleep mode ( machine.sleep() ) is affected too as bluetooth does not initialise after waking up.

        Tested with:
        Pycom MicroPython 1.20.1.r1 [v1.11-3138a13] on 2019-10-08; LoPy4 with ESP32
        Pybytes Version: 1.1.3

        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