Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotImplementedError: On UARTService() #178

Closed
Minus-hates-school opened this issue Dec 23, 2022 · 2 comments
Closed

NotImplementedError: On UARTService() #178

Minus-hates-school opened this issue Dec 23, 2022 · 2 comments

Comments

@Minus-hates-school
Copy link

ESP32 Pro S3 using CircuitPython

Error Message:

Traceback (most recent call last): File "code.py", line 12, in <module> File "/lib/adafruit_ble/services/nordic.py", line 55, in __init__ File "/lib/adafruit_ble/services/__init__.py", line 49, in __init__ NotImplementedError:

Version / modle:

Adafruit CircuitPython 7.3.1 on 2022-06-22; ProS3 with ESP32S3

Code(color picker example):

import board
import neopixel

from adafruit_bluefruit_connect.packet import Packet
from adafruit_bluefruit_connect.color_packet import ColorPacket

from adafruit_ble import BLERadio
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble.services.nordic import UARTService

ble = BLERadio()
uart_service = UARTService()
advertisement = ProvideServicesAdvertisement(uart_service)

pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, brightness=0.1)

while True:
    # Advertise when not connected.
    ble.start_advertising(advertisement)
    while not ble.connected:
        pass
    ble.stop_advertising()

    while ble.connected:
        if uart_service.in_waiting:
            packet = Packet.from_stream(uart_service)
            if isinstance(packet, ColorPacket):
                print(packet.color)
                pixels.fill(packet.color)
@Neradoc
Copy link
Contributor

Neradoc commented Dec 23, 2022

Hi, services are not implemented on ESP32 chips in Circuitpython.
See: adafruit/circuitpython#5926 (comment)
And: https://learn.adafruit.com/welcome-to-circuitpython/frequently-asked-questions#faq-3129409

@shanecromer24
Copy link

I am reading that there is support in Circuit Python 9.0 but there is code that need to be written for the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants