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

    ImportError: cannot import name Bluetooth **SOLVED**

    Scheduled Pinned Locked Moved WiPy 2&3
    wipy 2.0bluetoothsolved
    7 Posts 2 Posters 3.0k 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.
    • T Offline
      tenspot
      last edited by livius

      I am trying to run some of the Bluetooth examples given in the documentation but am getting the error message: ImportError: cannot import name Bluetooth. I have updated to the latest WiPy 2.0 firmware and can run other code including a web server example, so I am reasonably confident the WiPy is working. I have also tried importing the Bluetooth class using the REPL but get the same result:

      >>> from network import Bluetooth                                                                                       
      Traceback (most recent call last):                                                                                      
        File "<stdin>", line 1, in <module>                                                                                   
      ImportError: cannot import name Bluetooth   
      

      Any help would be greatly appreciated.

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

        Hi @tenspot,

        Could you please go to the REPL and run:

        import os
        os.uname()
        

        I know you have already updated, but this will just double check that the firmware is on the latest version!

        Developer Evangelist - Pycom

        1 Reply Last reply Reply Quote 0
        • T Offline
          tenspot
          last edited by

          Hi,

          The response is:

          (sysname='WiPy', nodename='WiPy', release='0.9.7.b1', version='v1.8.6-234-g765f2bc on 2016-12 02', machine='WiPy with ESP32')

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

            @tenspot Looks like your firmware update wasn't successful! This likely explains the Bluetooth issues!

            Could you try to update the firmware again please? :)

            You're looking to see release='1.6.3.b1',

            Thanks!

            Developer Evangelist - Pycom

            T 2 Replies Last reply Reply Quote 0
            • T Offline
              tenspot @bucknall
              last edited by

              @bucknall Hi, I have updated the firmware again but nothing has changed it is still showing as release='0.9.7.b1'. the update process seems to complete o.k. However, the firmware update program welcome screen say "This wizard will help you upgrade your Pycom board firmware to version 0.9.7.b1." so am I using an old version of this program?

              1 Reply Last reply Reply Quote 0
              • T Offline
                tenspot @bucknall
                last edited by

                @bucknall Hi, I have re-installed the firmware update program and run this to update the firmware to the latest version and I can now import the Bluetooth class.

                Thanks for your help.

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

                  @tenspot No problem! :) It was likely that you had a very old version of the firmware tool installed!

                  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