bluetooth - no module named 'bluetooth'

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
prem111
Posts: 127
Joined: Sun Feb 23, 2020 3:18 pm

bluetooth - no module named 'bluetooth'

Post by prem111 » Wed Feb 26, 2020 12:22 pm

Hi, im using firmware:
(Firmware built with ESP-IDF v3.x, with support for BLE, LAN and PPP:)
esp32-idf3-20191220-v1.12.bin

But im give error on import bluetooth:

>>> import bluetooth
ImportError: bluetooth - no module named 'bluetooth'


Thanks for help.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: bluetooth - no module named 'bluetooth'

Post by jimmo » Wed Feb 26, 2020 1:45 pm

That's weird.

Can you press Ctrl-D and show us what the startup message looks like? e.g. similar to

Code: Select all

MicroPython v1.12-199-gba7f33f90-dirty on 2020-02-27; linux version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> 

User avatar
OlivierLenoir
Posts: 126
Joined: Fri Dec 13, 2019 7:10 pm
Location: Picardie, FR

Re: bluetooth - no module named 'bluetooth'

Post by OlivierLenoir » Wed Feb 26, 2020 8:17 pm

I do observe the same situation, I don't see the bluetooth or ubluetooth module.

And I also see twice the module uhashlib.

Installed version in esp32-idf3-20191220-v1.12.bin

Code: Select all

sha256sum esp32-idf3-20191220-v1.12.bin 
dc143bf4f7362ecab27422b4c4f830b3b64239d2aeb285cc21bdc070d491b338  esp32-idf3-20191220-v1.12.bin

Code: Select all

MicroPython v1.12 on 2019-12-20; ESP32 module with ESP32
Type "help()" for more information.
>>> 
>>> ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4844
load:0x40078000,len:9656
load:0x40080400,len:6216
entry 0x400806f0
I (457) cpu_start: Pro cpu up.
I (457) cpu_start: Application information:
I (457) cpu_start: Compile time:     Dec 20 2019 07:50:41
I (461) cpu_start: ELF file SHA256:  0000000000000000...
I (467) cpu_start: ESP-IDF:          v3.3
I (471) cpu_start: Starting app cpu, entry point is 0x40083600
I (0) cpu_start: App cpu up.
I (482) heap_init: Initializing. RAM available for dynamic allocation:
I (489) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (495) heap_init: At 3FFBA488 len 00025B78 (150 KiB): DRAM
I (501) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (507) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (514) heap_init: At 40092D6C len 0000D294 (52 KiB): IRAM
I (520) cpu_start: Pro cpu start user code
I (203) cpu_start: Chip Revision: 1
W (203) cpu_start: Chip revision is higher than the one configured in menuconfig. Suggest to upgrade it.
I (207) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
MicroPython v1.12 on 2019-12-20; ESP32 module with ESP32
Type "help()" for more information.
>>> help('modules')
__main__          framebuf          ucryptolib        urandom
_boot             gc                uctypes           ure
_onewire          inisetup          uerrno            urequests
_thread           machine           uhashlib          uselect
_webrepl          math              uhashlib          usocket
apa106            micropython       uheapq            ussl
btree             neopixel          uio               ustruct
builtins          network           ujson             utime
cmath             ntptime           umqtt/robust      utimeq
dht               onewire           umqtt/simple      uwebsocket
ds18x20           sys               uos               uzlib
esp               uarray            upip              webrepl
esp32             ubinascii         upip_utarfile     webrepl_setup
flashbdev         ucollections      upysh             websocket_helper
Plus any modules on the filesystem
>>> 


prem111
Posts: 127
Joined: Sun Feb 23, 2020 3:18 pm

Re: bluetooth - no module named 'bluetooth'

Post by prem111 » Wed Feb 26, 2020 9:50 pm

Problem has solved - install: esp32-idf3-20200226-v1.12-195-gb16990425.bin - works!

Powersoft
Posts: 1
Joined: Thu Jun 11, 2020 5:33 pm

Re: bluetooth - no module named 'bluetooth'

Post by Powersoft » Thu Jun 11, 2020 5:36 pm

Where can I download esp32-idf3-20200226-v1.12-195-gb16990425.bin 8-)

Cheers

Jan

Daksh
Posts: 1
Joined: Sat Jul 16, 2022 6:56 am

Re: bluetooth - no module named 'bluetooth'

Post by Daksh » Sat Jul 16, 2022 7:01 am

Can somebody help me how to install this module in esp8266?? I am a beginner.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: bluetooth - no module named 'bluetooth'

Post by Roberthh » Sat Jul 16, 2022 7:56 am

The esp8266 does not have bluetooth. hardware. Thus, no bluetooth support.

Post Reply