Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

ImportError: no module named '_bleio'
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

ImportError: no module named '_bleio'

by L0cutus on Wed Aug 12, 2020 8:43 am

Hello,

just purchased Metro M4 airlift Lite, upgraded bootloader (version 3.10.0), circuitpython and library bundle (version 6.0.0 alpha2) taken from here:

https://circuitpython.org/board/metro_m4_airlift_lite/

But after i have tried a simple example that i have found on latest examples bundled with latest libray (6.0.0 alpha2):

Code: Select all | TOGGLE FULL SIZE
"""
This example solicits that apple devices that provide notifications connect to it, initiates
pairing, and prints existing notifications.
"""

import adafruit_ble
from adafruit_ble.advertising.standard import SolicitServicesAdvertisement
import adafruit_ble_apple_notification_center as ancs

# PyLint can't find BLERadio for some reason so special case it here.
radio = adafruit_ble.BLERadio()  # pylint: disable=no-member
a = SolicitServicesAdvertisement()
a.solicited_services.append(ancs.AppleNotificationCenterService)
radio.start_advertising(a)

print("Waiting for connection")

while not radio.connected:
    pass

print("Connected")

for connection in radio.connections:
    if ancs.AppleNotificationCenterService not in connection:
        continue

    if not connection.paired:
        connection.pair()
        print("Paired")

    ans = connection[ancs.AppleNotificationCenterService]
    # Wait for the notifications to load.
    while len(ans.active_notifications) == 0:
        pass
    for notification_id in ans.active_notifications:
        notification = ans.active_notifications[notification_id]
        print(notification.app_id, notification.title)


on the REPL i obtain this error:

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 2, in <module>
File "adafruit_ble/__init__.py", line 38, in <module>
ImportError: no module named '_bleio'


any idea on why this happens ?

Thanks !

L0cutus
 
Posts: 3
Joined: Mon Aug 10, 2020 5:52 pm

Re: ImportError: no module named '_bleio'

by dastels on Wed Aug 12, 2020 8:49 am

This board does not have builtin bluetooth. "Airlift" provides WiFi capabilities via the ESP32 coprocessor.

Dave

dastels
 
Posts: 3470
Joined: Tue Oct 20, 2015 3:22 pm

Re: ImportError: no module named '_bleio'

by L0cutus on Wed Aug 12, 2020 8:51 am

dastels wrote:This board does not have builtin bluetooth. "Airlift" provides WiFi capabilities via the ESP32 coprocessor.

Dave

Arrgh, i was thinking that esp32 was also ble capable... sorry!

L0cutus
 
Posts: 3
Joined: Mon Aug 10, 2020 5:52 pm

Please be positive and constructive with your questions and comments.