ble implementation

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Post Reply
User avatar
Rebtop
 
Posts: 134
Joined: Fri Jan 31, 2020 9:25 pm

ble implementation

Post by Rebtop »

I want to connect my Iphone 14 to Matrixportal m4.
I installed the Adafruit code from the Apple library, Bluefruit Connect.
I downloaded the ble bundle and extracted it to Circuitpy.

I am getting this error.

File "code.py", line 11, in <module>
File "adafruit_ble/__init__.py", line 163, in __init__
RuntimeError: No adapter available

Thoughts

User avatar
mikeysklar
 
Posts: 13544
Joined: Mon Aug 01, 2016 8:10 pm

Re: ble implementation

Post by mikeysklar »

You need to setup your MatrixPortal for BLE mode.

Update the AirLift Firmware

User avatar
Rebtop
 
Posts: 134
Joined: Fri Jan 31, 2020 9:25 pm

Re: ble implementation

Post by Rebtop »

I am using a Matrixport M4.
The M4 is updated.
Do i still have to update the Airlift firmware?

User avatar
Rebtop
 
Posts: 134
Joined: Fri Jan 31, 2020 9:25 pm

Re: ble implementation

Post by Rebtop »

I updated the Airlift software and had to reload the Circuitpy file, UF2, before it would display Circuitpy.

I copied the files in the BLE host folder, Python 8 to match the version i use.
I copied the lib file contents to the lib on Circuitpy.
I copied the two .py files to Circuitpy.

Same result.
Traceback (most recent call last):
File "code.py", line 11, in <module>
File "adafruit_ble/__init__.py", line 163, in __init__
RuntimeError: No adapter available

User avatar
Rebtop
 
Posts: 134
Joined: Fri Jan 31, 2020 9:25 pm

Re: ble implementation

Post by Rebtop »

I just noticed that one file is required and not in the lib folder, Adafruit_airlift.

I could not find it..............

/adafruit_airlift <---------------------------------------
/adafruit_ble
/adafruit_bus_device
/adafruit_esp32spi
adafruit_requests.mpy

User avatar
Rebtop
 
Posts: 134
Joined: Fri Jan 31, 2020 9:25 pm

Re: ble implementation

Post by Rebtop »

Screenshot circuit lib 2024-02-08 220355.png
Screenshot circuit lib 2024-02-08 220355.png (25.68 KiB) Viewed 100 times
current lib
Image

Here is my current Lib.

User avatar
mikeysklar
 
Posts: 13544
Joined: Mon Aug 01, 2016 8:10 pm

Re: ble implementation

Post by mikeysklar »

Make sure you are starting with the BLE Example code.

You can download the adafruit_airlift/ folder from the Download Project Bundle. Top left link from the BLE example code. It is also in the normal python library bundle.

Code: Select all

% find . | grep -i airlift
./CircuitPython 9.x/lib/adafruit_airlift
./CircuitPython 9.x/lib/adafruit_airlift/__init__.mpy
./CircuitPython 9.x/lib/adafruit_airlift/esp32.mpy
./CircuitPython 8.x/lib/adafruit_airlift
./CircuitPython 8.x/lib/adafruit_airlift/__init__.mpy
./CircuitPython 8.x/lib/adafruit_airlift/esp32.mpy

User avatar
Rebtop
 
Posts: 134
Joined: Fri Jan 31, 2020 9:25 pm

Re: ble implementation

Post by Rebtop »

Mike
Thanks again.

As soon as i loaded the airlift into the lib, it works..

User avatar
Rebtop
 
Posts: 134
Joined: Fri Jan 31, 2020 9:25 pm

Re: ble implementation

Post by Rebtop »

But it sems to have a stability issue.

I tried to transfer the default image, and the system bombed. USB not recognized? Circuitpy dropped off.

User avatar
Rebtop
 
Posts: 134
Joined: Fri Jan 31, 2020 9:25 pm

Re: ble implementation

Post by Rebtop »

MIke

I am working with the demo code provided.

all seems to work as advertised.

Thanks

User avatar
mikeysklar
 
Posts: 13544
Joined: Mon Aug 01, 2016 8:10 pm

Re: ble implementation

Post by mikeysklar »

Thank you for the followup. Glad you are running.

Was there anything unclear in the documentation with getting the demo going?

Post Reply
Please be positive and constructive with your questions and comments.

Return to “Wireless: WiFi and Bluetooth”