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

    LoPy crashes while running BLE example code

    Scheduled Pinned Locked Moved LoPy
    bleble lolopy
    3 Posts 3 Posters 1.2k 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.
    • C Offline
      cylex
      last edited by

      Everytime I run the BLE example Code, where my LoPy is supposed to act as a advertising periphal, the LoPy crashes. When I click on "Cancel" in the Atom Pymakr plugin nothing changes and I'm forced to unplug the device in order to access it again. I'm using the newest firmware and you can find the code at the bottom of the side:
      https://docs.pycom.io/pycom_esp32/library/network.Bluetooth.html

      Thanks in advance!

      R 1 Reply Last reply Reply Quote 0
      • R Offline
        RichardTXD @cylex
        last edited by

        @cylex
        I use a WiPy 2. I use Atom on windows. Various firmware revisions in the WiPy.

        I found that simple code examples for scanning BLE advertisements crashed after a few minutes to a few hours. Fiddling with gc made a difference, not always good, but did not fix it. The thing locks up.

        The cure I found was to scan for 10 seconds. Then when it stops scanning, you can detect that, de-init the module then start it scanning again. That worked very well for 6+ days.

        Yours is a different module and a different application etc... worth a try. Stop the BLE then restart it. Just a guess. Hope it works.

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

          Hi @cylex,

          Could you please update to the latest firmware? Version 1.7.0b1 introduced a number of fixes for the BLE code examples.

          You can check what version of firmware that your device is currently running by using the commands from the REPL

          import os
          os.uname()
          

          Thanks!

          Alex

          Developer Evangelist - Pycom

          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