#circuitpython-dev

1 messages · Page 92 of 1

manic glacierBOT
#

Hi Dan

Here are the logs. Please tell me if I can support you more on this topic.

mpremote with debug output of raw ascii

I patched mpremote so it allows us to see all characters on the serial line.

mpremote tries to bring the device in a specific state (raw mode, soft reset, raw paste mode). I added debug output whenever such a mode is entered.

This mpremote may be helpful to debug https://github.com/adafruit/circuitpython/issues/8038 and https://github.com/adafruit/circuitpython/...

manic glacierBOT
manic glacierBOT
#

Raw paste mode is very fragile. I have a project that uses basically the same low-level transport mechanisms as mpremote and depending on the device you really need to transfer data using very small chunks.

Hi bablokb, I agree with you that raw paste mode is fragile and I would nobody recommend to use it. This issue here is about newer cicuitpython versions crashing and not recovering - this certainly has to be fixed.

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; Adafruit Macropad RP2040 with rp2040

Code/REPL

import time
from adafruit_macropad import MacroPad

macropad = MacroPad()
last_position = 0

while True:
    try:
        key_event = macropad.keys.events.get()
        if key_event:
            if key_event.pressed:
                print(key_event)
                if key_event.key_number == 0:
                    macropad.keyboard...
tiny peak
#

So I tried, after many experiments, I

torpid crow
#

I am trying to integrate a c module into the atmel-samd port but am getting no rule to make target SRC_C. Could someone point me in the right direction?

slender iron
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

The current download for "Inky Frame 7.3" (Pico W Aboard) by Pimoroni" is for the older version with the Pico W. They have since released a new version with the Pico 2 W instead. Can you release a version for the Inky Frame 7.3 with Pico 2 W. To my knowledge it was just a replacement of the pico w with a pico 2 w, the rest of the hardware was the same.

https://shop.pimoroni.com/products/inky-frame-7-3

manic glacierBOT
#

No, not correct. They changed the display technology and now use a Spectra6. So at least the init-sequences have to be changed. I do have suitable init-sequences, since I use the same display made for a Pi with a Pico-to-Pi adapter, see https://github.com/bablokb/circuitpython-inky. But without a physical board to test I would not create a new board here. Maybe you can give it a try, most of it should be copy&paste anyhow.

lone sandalBOT
manic glacierBOT
#

No, not correct. They changed the display technology and now use a Spectra6. So at least the init-sequences have to be changed. I do have suitable init-sequences, since I use the same display made for a Pi with a Pico-to-Pi adapter, see https://github.com/bablokb/circuitpython-inky. But without a physical board to test I would not create a new board here. Maybe you can give it a try, most of it should be copy&paste anyhow.

Sorry didn't notice they changed it again, my version does not have...

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.1.0-beta.1-2-gf6f52ade4c-dirty on 2025-11-20; Seeed Xiao ESP32-S3 Sense with ESP32S3

Code/REPL

import microcontroller
microcontroller.on_next_reset(microcontroller.RunMode.BOOTLOADER)
mmicrocontroller.reset()

Behavior

The board goes right back to the CircuitPython REPL (with CIRCUITPY mounted).

Also, I can't get into the bootloader using the RESET switch (tried with various delays, wai...

orchid basinBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; Pimoroni Badger 2040 with rp2040

Code/REPL

# something I tried...
# INACTIVITY TIMEOUT (Only on battery)
if time.monotonic() - last_activity > INACTIVITY_TIMEOUT:
    _, is_charging = get_battery_status()
    
    if is_charging:
        print("On USB power - staying awake")
        last_activity = time.monotonic()
    else:
        print(f"DEBUG: Inactivity timeout. Saving sta...
manic glacierBOT
manic glacierBOT
#

It looks like there is no board.EN_3V3 :

>>> import board
>>> dir(board)
['__class__', '__name__', 'DISPLAY', 'ENABLE_DIO', 'GP0', 'GP1', 'I2C', 'INKY_BUSY', 'INKY_CS', 'INKY_DC', 'INKY_RST', 'INT', 'MISO', 'MOSI', 'REF_1V2', 'RX', 'SCK', 'SCL', 'SDA', 'SPI', 'SW_A', 'SW_B', 'SW_C', 'SW_DOWN', 'SW_UP', 'TX', 'UART', 'USER_LED', 'USER_SW', 'VBAT_SENSE', 'VBUS_DETECT', 'VREF_POWER', '__dict__', 'board_id']
>>> 

What else can I try?

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

As @dhalbert has said, you can reduce this to one second.

You cannot compare a generic firmware like CircuitPython with a specifically patched version of MicroPython that Pimoroni uses. Their firmware is very limited (to Pimoroni devices) and they implement all kinds of special hacks. In this case, they drive the enable-dio pin high very early so you don't have to press the button that long.

manic glacierBOT
#

From @mikeysklar in https://forums.adafruit.com/viewtopic.php?p=1073088#p1073088, an example on CircuitPython 10.0.3 on 2025-10-17; Adafruit Feather ESP32-S3 Reverse TFT with ESP32S3
that reliably causes "Nimble out of memory":

import time
import adafruit_ble
from adafruit_ble.advertising import Advertisement
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble.services.standard.hid import HIDService
from adafruit_ble.services.standard.device_in...
stuck elbow
tulip sleet
manic glacierBOT
#

CircuitPython version and board name

10.0

Code/REPL

no code

Behavior

no behavior

Description

On the https://docs.circuitpython.org/en/latest/shared-bindings/adafruit_bus_device/spi_device/index.html#adafruit_bus_device.spi_device.SPIDevice page, the description of the class definition is:

`classadafruit_bus_device.spi_device.SPIDevice(spi: busio.SPI, chip_select: digitalio.DigitalInOut | None = None, *, baudrate: int = 100000, polarity: int ...

stuck elbow
#

@tulip sleet ^^ done, hope that helps

tulip sleet
#

tyvm

manic glacierBOT
#

Ok, I will see if I can figure out how to build my custom firmware integrating pimoroni's patches.

For context, I am building a ebook reader. It needs to start fast when you pick it up to read some more pages. The Micropython gives me that, but I lose the ability to put books on the ereader by just connecting it to a computer with USB.

It turns out it's more then 2 seconds : when I hold down a button, it starts to blink the led (not RGB), for about 2 seconds, and I have to keep holding it f...

manic glacierBOT
manic glacierBOT
manic glacierBOT
crimson ferry
#
manic glacierBOT
#

It turns out it's more then 2 seconds : when I hold down a button, it starts to blink the led (not RGB), for about 2 seconds, and I have to keep holding it for 2-3 more seconds so it loads my code.py. If I release too soon, it doesn't "boot" my code. So, kind of a pain.

I cannot confirm this. The led blinks for exactly one second. I am using the Badger/Badger2040 in one of my projects, see https://github.com/bablokb/circuitpython-clock. I am using the buttons for special actions like "forc...

manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.1.0-beta.1 on 2025-11-06; Adafruit Pybadge with samd51j19

Same behavior on PyGamer as well.

Code/REPL

N/A

Behavior

After installing 10.1.0-beta.1 the TFT display remains dark when the device boots up. Reverting back to 10.0.3 makes the display go back to lighting up as normal.

Description

No response

Additional information

I tested PyPortal Titano (also SAMD) and it ...

manic glacierBOT
#

I traced this back to the changes from: https://github.com/adafruit/circuitpython/pull/10699

I made a guess that the removal of reset_all_pins(); in supervisor/port.c could be related so I checked before and after that commit and found that before the backlight does turn on, and after it does not.

I'm not actually sure if reset_all_pins() is truly related, or if I just got somewhat lucky. I haven't tried isolating the changes from this PR.

minor wing
#

Where (what folder) are the wifi module code files for the Raspberry Pico contained in the circuitpython repo?

#

/circuitpython/ports/raspberrypi/lib/cyw43-driver ?

tulip sleet
#

ports/raspberrypi/common-hal/{wifi,socketpool}. ssl in in shared-modules

#

the cyw43 library that actually talks to the radio module is what you are pointing to

manic glacierBOT
manic glacierBOT
#

That board isn't really beta supported. P4 is all alpha I'd say. I didn't make much progress on it (but did try.)

The USB device port is connected to the usb-to-serial/jtag converter so we can't get the normal CIRCUITPY functionality. We could blow a fuse to swap it with the full speed USB but I doubt we want to do that. In theory we can get the usb-to-serial converter working but I didn't have time to debug it. I also didn't get the display going after realizing that.

slender iron
#

@tulip sleet I'm around. Do you need anything from me?

tulip sleet
slender iron
manic glacierBOT
manic glacierBOT
#

You must be aware of the fact that the filesystem is not writable from CircuitPython. You have various options:

  • use nvram to save state. This works fine if you don't need to save much and is the least invasive
  • remount / read-writable from boot.py. You should implement that in a way to prevent the remount (e.g. pressing button 'B' during boot), because once it is mounted rw, you cannot write from the host anymore.
  • add a second partition during build that is writable from CP
manic glacierBOT
#

Then, there is definitely stuff I don't understand.
I am using f.write(data) to save stuff, and it works most of the time. I do have a toggle in my boot.py that disables usb mass storage when I press a key while booting. But most of the time, it boots on battery anyway, so, storage is writable. Or is it?

The thing that I don't get is why is it sometimes working? This feels like it should always work, or never work.

Here is my save and load state, it it helps :

def state_save(state):
  ...
manic glacierBOT
urban silo
#

@slender iron Someone pointed me to your comment

No luck getting the M5Stack Tab5 going with this yet. The USB C is connected to GPIO24/25 which is connected to the serial/jtag peripheral...

If this is still an issue then I have a good solution 🙂

For my product Tanmatsu we have made the same choice to connect the USB-C port to the USB-serial/jtag peripheral, simply because it makes a lot of sense when flashing in a factory and for easy recovery by users. But: while researching we found that we did not have to hook up the second USB1.1 PHY too, it is possible to swap the USB PHYs during runtime without having to mess with efuses.

This function in the firmware for our device implements a simple way to switch USB mode between the debug & user peripheral on the fly as often as you want: https://github.com/Nicolai-Electronics/tanmatsu-launcher/blob/main/main/usb_device.c#L193

GitHub

Launcher firmware for Tanmatsu. Contribute to Nicolai-Electronics/tanmatsu-launcher development by creating an account on GitHub.

#

Our firmware has MIT license so feel free to reuse this function in CircuitPython provided that our attribution gets acknowledged (2025 Nicolai Electronics).

Hopefully this allows you to add support for more boards that are wired in this way 🙂

minor wing
minor wing
#

Ok, so I have determined that I can build working firmware images at this point, now I just need to start making the appropriate changes to the code to get features working properly, so I will be asking questions regarding how to properly make those changes, please forgive me for seemingly "dumb" questions at this point - I'm just trying to figure this out so I can help to contribute...

#

I'm going to work on Raspberry Pico 2W and Adafruit KB2040, since I have those devices to test/verify with. I have at least 3 things I have found (non-implemented features) for the Pico2W, I'll attempt to do those first.

minor wing
#

I have now forked https://github.com/adafruit/circuitpython/ main, and created a new branch locally for developing the Pico 2W cyw43-rssi-current_ap fix, should I do all of the build steps listed at https://learn.adafruit.com/building-circuitpython/build-circuitpython to prepare my local branch for building?

GitHub

CircuitPython - a Python implementation for teaching coding with microcontrollers - adafruit/circuitpython

How to build CircuitPython yourself on different platforms

manic glacierBOT
#

Here it is :

import board
import digitalio
import storage
import time

button_a = digitalio.DigitalInOut(board.SW_A)
button_a.direction = digitalio.Direction.INPUT
button_a.pull = digitalio.Pull.DOWN

time.sleep(0.1)

button_pressed = button_a.value

button_a.deinit()

if button_pressed:
    storage.disable_usb_drive()
    print("USB mass storage DISABLED - button A was held during boot")
else:
    print("USB mass storage ENABLED - button A was not pressed")
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; Seeed Xiao ESP32-C6 4MB Flash 512KB SRAM with ESP32-C6FH4

Code/REPL

import wifi, time

WLAN_SSID = "XXX"
WLAN_PASSWORD = "YYY"
_WAIT_CONNECTED_SECONDS = 15
_radio = wifi.radio

while True:
    _radio.hostname = "TestHostName"
    _radio.enabled = True
    _radio.start_station()
    print("Connecting... ")
    _radio.connect(WLAN_SSID, WLAN_PASSWORD, timeout=_WAIT_CONNECTED_SECO...
tiny peak
#

@minor wing Things are pretty quiet here for the US holiday weekend. More people will probably be back around to see your messages by Monday.

nimble sparrow
#

@slender iron I've been wondering why it might be that the ESP32P4 EV board works when other P4 devices don't, and discovered that until recently the EV board used a dedicated CP2102 UART<>USB bridge, which is dropped in the most recent revision in favour of the "native" UART/JTAG device.

#

So annoyingly someone is bound to eventually buy a more recent version of the board and discover it "doesn't work" as it will act the same as the Tab5, Tanmatsu etc. until we figure out switching/bringing up device mode per @wind anvil 's code snippet above. More annoyingly, I guess that might mean you can't ever have a single unified P4-EV board target...

orchid basinBOT
#
orchid basinBOT
#

I'm glad to hear that the feature is being implemented on some boards.

As far as I can tell, my Adafruit Feather RP2040 board with CircuitPython does not have an "mpconfigboard" file at all right now, and I would be way, way out of my league to even attempt adding one (if that's even possible).

So the original post remains my dream - to have dual partitions implemented on all boards where it makes sense to do so.

orchid basinBOT
manic glacierBOT
#

CircuitPython version and board name

Tried with latest version (CircuitPython 10.0.3)
and also all other major versions

Code/REPL

No code, just installation failing

Behavior

When dragging the combined hex in the MICROBIT drive, the board just resets like nothing happened
When dragging the combined hex in the MAINTENANCE drive, there is a fail.txt with this content:
error: The starting address for the interface update is wrong.
type: user

Here is ...

orchid basinBOT
manic glacierBOT
#

Hello from 2025. Issue is still here. This is related to circuitpy.
Something went wrong right after device discovered:

[3641919.149882] sd 8:0:0:1: Attached scsi generic sg6 type 0
[3641919.152140] sd 8:0:0:0: [sdf] 2049 512-byte logical blocks: (1.05 MB/1.00 MiB)
[3641919.231050] usb 1-1.2: reset full-speed USB device number 93 using xhci_hcd
[3641919.309439] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[3641919.309827] usb 1-1.2: Quirk or no altset; falling back to MIDI 1.0
[3641919.3192...
manic glacierBOT
manic glacierBOT
#

My suggestions:

  • try a 9.2.8 version and see if you have the same problem
  • remove the initial blinking with CIRCUITPY_SKIP_SAFE_MODE_WAIT = 1
  • add a short blink very early in your code.py/main.py so you know when the system is up
  • retest
  • write to nvram instead of a file (read the docs of module nvm). Then you don't need the boot.py stuff anymore. As far as I can see, you only write a filename and a page, that should fit and since you already have the binary conversion...
manic glacierBOT
#

@FFAMax I have not seen another report of this. Since when you take away the hub, it works, something about the hub is provoking the problem. Could you open a new issue and say specifically which make and model of hub it is, the version of Linux, and details on the host computer.

Do you have any non-RP2 CircuitPython boards? Do they exhibit the same problem? Have you tried other host ports and other ports on the hub?

candid sun
#

<@&356864093652516868> We'll have our weekly meeting in about 65 minutes from now in this text channel and in the circuitpython voice channel. Please take the time to add your notes in advance to the document: [link to doc] -- I look forward to everyone's updates!

slender iron
tulip sleet
#

I do see my mic level

lone axle
#
Instructables

Raspberry Pi Pico W - Binary Clock / Weather Monitor: In this project, we’ll build a Binary Clock and Weather Monitor using the Raspberry Pi Pico W. It displays the time in binary using LEDs and also pulls the current weather data from the internet — all powered by a tiny microcontroller!
We’ll build t…

GitHub

Tutorials / Projects and Devlog - Course Related to the Raspberry Pi Pico - Guitarman9119/Raspberry-Pi-Pico-

Get JLCPCB 6-layer PCBs for just $2! Register to get $60 Coupons: https://jlcpcb.com/?from=Nerd

In this video we revisit an old project " The nerdiest clock ever" and improve on it by changing the format of the time being displaying in Binary and the added OLED will allow us to display the weather information.

Website:
https://nerdcave.xyz/...

▶ Play video
manic glacierBOT
#

On boards with sufficient non-volatile memory (like RP2040) it would be great to have two "disk partitions" in CIRCUITPY. One partition would be "readonly" from the microprocessor, but Read/Write from the attached computer. This partition would be used for "boot.py", "code.py" and whatever else the computer needs to control. The second partition would be Read/Write from the microprocessor, but "readonly" from the attached computer. This would allow the microprocessor to create non-volatil...

short tendon
#

@tulip sleet - please feel free to reach-out if I can test any of the C base airlift stuff

tulip sleet
#

When I get it to a usable state I'll let you and other folks know -- thanks!

wraith crow
#

So a lot of times you see a pop up when you're about to access something outside control of the primary OS with a confirmation requirement

#

Thanks all!

lone axle
#

Thanks for hosting Liz! Have a great week everyone.

tidal kiln
#

👋

candid sun
#

Here is the notes document for next Monday’s CircuitPython Weekly meeting. It is at the normal time of 11am Pacific / 2pm Eastern here on Discord. Everyone is encouraged to attend! Please add your hug reports and status updates even if you’ll be attending the meeting - it’s super helpful! If you are unable to attend but would still like to include updates, feel free to include them in the notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868>
https://docs.google.com/document/d/1_O2owjB7PZ_xTvg7pxIdX81GBGeHt_-u9CGx5fn2IP4/edit?tab=t.0

slender iron
#

@tulip sleet do you think it is important to support board.I2C() for zephyr? Or could we do board.I2C for most things? () needs a function call where the version without it is the object directly.

tulip sleet
slender iron
#

ya, I think that's the best way to do it

#

I've gotta generate that function I think though

manic glacierBOT
#

New bitmaptools function to replace all pixels of a given color with a different color.

Most directly I want to use this inside of an "AccentableLabel" class that I am working on that allows certain passages of text within the label to use a different foreground/background color scheme from the rest of the text.

Having this replace_color() function makes that easy and quick because it can blit from the glyph bitmap and then replace the 1s with a different color from the palette af...

manic glacierBOT
manic glacierBOT
tulip sleet
#

@lone axle I suggested removing the default value, and now there are compile errors like:

../../shared-bindings/bitmaptools/__init__.c:188:9: error: missing initializer for field ‘defval’ of ‘mp_arg_t’ {aka ‘const struct _mp_arg_t’} [-Werror=missing-field-initializers]
  188 |         {MP_QSTR_dest_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ},
#

this is confusing to me because this code is in I2C.c, for example:

#
    static const mp_arg_t allowed_args[] = {
        { MP_QSTR_scl, MP_ARG_REQUIRED | MP_ARG_OBJ },
        { MP_QSTR_sda, MP_ARG_REQUIRED | MP_ARG_OBJ },
        { MP_QSTR_frequency, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 100000} },
        { MP_QSTR_timeout, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 255} },
    };
lone axle
#

The error seems specific to the unix port. I see the same locally attempting to build unix port. However I was able to build esspressif and run it on a MagTag.

I am putting them back for now though.

#

I just found some that are like this:

    static const mp_arg_t allowed_args[] = {
        {MP_QSTR_dest_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ, {}},
        {MP_QSTR_x, MP_ARG_REQUIRED | MP_ARG_INT, {}},
        {MP_QSTR_y, MP_ARG_REQUIRED | MP_ARG_INT, {}},
        {MP_QSTR_radius, MP_ARG_REQUIRED | MP_ARG_INT, {}},
        {MP_QSTR_value, MP_ARG_REQUIRED | MP_ARG_INT, {}},
    };

with empty {} as the default value. Maybe that is better than removing it altogether?

tulip sleet
#

it has to do with -Wno-missing-field-initializers, maybe, though I don't see that added for non-unix ports. Still looking.

tulip sleet
lone axle
tulip sleet
#

me too

#

@lone axle there is no explicit setting or unsetting of missing-field-initializers that would affect this that I can find.

#

simple test program:

typedef struct {
    int a;
    int b;
    int c;
} s_t;

s_t f(void) {
    s_t s = { 1,2 };
    return s;
}
#
gcc -Wall -Wmissing-field-initializers -c init.c
arm-none-eabi-gcc -Wall -Wmissing-field-initializers -c init.c

both produce the error, so it doesn't seem to be the compilers. It may be different versions of the C standard being chosen. At some point C started automatically zero-initializing unspecified fields.

#

I will spend a little time on this to understand it.

tulip sleet
#

@lone axle this is because of -Wextra, present only on the Unix port compiles, which turns on some extra warnings. Why we have that I don't know, and will investigate further.

manic glacierBOT
#

The ports/unix build is failing with the missing initializers, e.g.:

../../shared-bindings/bitmaptools/__init__.c:188:9: error: missing initializer for field ‘defval’ of ‘mp_arg_t’ {aka ‘const struct _mp_arg_t’} [-Werror=missing-field-initializers]
  188 |         {MP_QSTR_dest_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ},

This is because ports/unix compiles with -Wextra, which enables -Wmissing-field-initializers. The other ports do not do -Wextra, though there is mention of ...

manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-12-03; Raspberry Pi Pico W with rp2040

Code/REPL

see below

Behavior

Runtime of programs is three times longer on CP10 than on CP9

Description

When switching my data collection program to CP10 I noticed it runs much slower:

CP9:
[2025-12-02 09:37:40] start: _create_view
[2025-12-02 09:37:49] end:  _create_view

[2025-12-02 09:37:55] 0.161 (collect data)
[2025-12-02...
#

they implement all kinds of special hacks. In this case, they drive the enable-dio pin high very early so you don't have to press the button that long.

Specifically I spent some time with some wiggly IO pins an an oscilloscope instrumenting the MicroPython startup time and upstreamed some improvements - https://github.com/micropython/micropython/pull/9017 - to get the cold boot to first Python time down as far as reasonably possible.

This wasn't fast enough, though, so we also use an earl...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Hi, the build is overflowing on one or more languages.

You are freezing a lot of libraries. You could drop some of these:

  • adafruit_bus_device is already included as a C implementation. The frozen version will not be used.
  • adafruit_sdcard is not needed if sdcardio is enabled.
  • simpleio is not really needed. If you want a range() operation, see adafruit_simplemath.
  • You are including non-displayio display support with adafruit_framebuf and adafruit_ssd1306. Is it ...
tulip sleet
#

@lone axle I'll make the release for esp32spi unless you did already

lone axle
#

You can go ahead. I haven't

manic glacierBOT
#

Does your program write to the SD card as part of the data collection? If you remove that, does the slowness go away? Or if you log to CIRCUITPY (you'll have to remount)?

I'm just trying to figure out what is going on that slows things down. Is it a lot of inherent USB activity from the host, or is it maybe USB activity that is provoked by writing to the SD card in the program?

manic glacierBOT
#

I am mounting the SD in the beginning during hardware setup. I usually only write once (a single csv-line of collected sensor data). This is the part labeled "save_data". USB-activity is only while printing logs to the console. The lines above are only an excerpt. CIRCUITPY is never mounted during execution, I usually mount-update-umount during deployment. I never access the second device (/dev/sdb for me) from the host side and journalctl tells me it is not polling.

I have an option to log ...

manic glacierBOT
manic glacierBOT
ebon horizon
tulip sleet
tiny peak
#

@slender iron I've been tentatively considering improving the implementation coverage for hashlib.sha1 (e.g. already implemented for esp32s3 but not nrf52840) as part of a TOTP token project. It would also be kinda nice to have hashlib.sha256. To get this working on nrf52480 (no existing mbedTLS), I'm thinking it might make sense to use the relevant implementations from a lightweight embedded crypto library (perhaps BearSSL). If I went that far, I wonder if it would make sense to consider doing it in a way that would help with the crypto primitives you need for CircuitMatter (sha1, sha225, ecdsa NIST256p, ecdsa ECDH, AESCCM, etc.). Do you have any plans for how you want to add the crypto stuff for running CircuitMatter on non-unix ports?

slender iron
#

The nordic port will be moving more towards zephyr

#

though esp will switch later

tiny peak
#

so is your plan basically to move everything to Zephyr? I've been thinking about a relatively near-term thing. Like, I've got a project working now on a CLUE board with a pure python sha1 implementation, but it takes about 2 seconds to do a sha1.

slender iron
#

I expect nordic to be one of the first ports to move

tiny peak
#

I've got another thing that does hmac-sha1 on esp32s3 (c for sha1, python for hmac), and that's so fast already that it's not worth my trouble to mess with

slender iron
#

since I'm doing support for the newer chips with zephyr

tiny peak
#

hmm... okay, so my takeaway from that is that adding a BearSSL dependency would be somewhat at odds with what you have in mind, so probably not a great option then.

slender iron
#

add whatever zephyr uses

#

(probably mbedtls)

tiny peak
#

ok. thanks. I'll see what I can find in the zephyr source.

#

seems like maybe they use PSA Crypto which is backed by mbedTLS and potentially soc-specific hardware accelerator stuff

#

there's also some mention of TinyCrypt and kconfig/cmake-configurable crypto backends, but I think that may be older and the new thing is to try to do stuff with the PSA api

lone sandalBOT
manic glacierBOT
#

Some more insights:

  • I seem to have problems with math. CP10 runs 4x longer, not 3x
  • To slow down the program, it is sufficient that I mount the SD. I don't have to write anything.
  • The USB-connection to the host is necessary. If I run disconnected, powered from a battery and log to the SD instead of the console, I don't see the slow down
  • CP10 is still 20-30% slower in this case, but not 400%

This was tested with the current state of the main-branch with no additional tweaks.

manic glacierBOT
#

Well,
I implemented the pimoroni patches and I switched from storage to nvram for my save progress function, and it works great now, it boots very fast! I now have a very usable tiny ebook reader!

I now think the save issues I was having were my fault, but regardless, it's simpler with the nvram implementation.

I put everything here for those interested : https://github.com/stanelie/badger2040-ebook-reader/tree/main/circuitpython_version

Thanks everyone! Your help was invaluable!

manic glacierBOT
#

Hi all,
We made an expander board for the Pico 2W, The Pico 2W is soldered on the board, and it has some peripherals permanently connected to the board so it made sense to make a custom board file for it.
It is part of a bigger project to learn the Industrial Design students at the Technical University of Delft to program, more info here: https://id-studiolab.github.io/Connected-Interaction-Kit/test/components/

I built the board, copied the UF2 file, tested the functionality, and all se...

orchid basinBOT
manic glacierBOT
manic glacierBOT
minor wing
manic glacierBOT
slender iron
minor wing
lone sandalBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

In the pin list below, group pin aliases together, with blank lines in between, so it's easy to see which pins have which multiple names. You did this with some pins toward the end of the list. Put the preferred name first: that is the name that will be listed by dir(board). E.g.:

(I don't know which name you want to be the primary name: your choice.)

[blank line]
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO4) },
{ MP_ROM_QSTR(MP_QSTR_GP4), MP_ROM_PTR(&pin_GPIO4) },
{ MP_RO...
manic glacierBOT
#

There is also a question of what version ESP-IDF is using (they probably have a fork).

It would make sense just to use Zephyr's version of Mbedtls when we switch a port to zephyr. I would think we are already using Zephyr's version in the zephyr-cp, but I didn't look. Given the long-term goal of moving to Zephyr, if it's a big job to update Mbedtls, I'm not sure it's worth the effort. Are there additions or changes in the crypto APIs?

manic glacierBOT
#

The PSA Crypto API that Zephyr uses is an abstraction layer that's available as part of mbedtls alongside the traditional lower level mbedtls API. The current Mbedtls submodule includes PSA Crypto, but I'm not sure to what extent, if any, that version of the API differs from the one in Mbedtls 3.6.5 that Zephyr 4.3 uses.

PSA is a bit more of a batteries-included thing with higher level APIs and maybe fewer sharp edges. Using PSA is a bit more complicated (need to call psa_crypto_init() at...

manic glacierBOT
slender iron
#

@tulip sleet how's the esp32spi native work going?

tulip sleet
#

SPI communication is working (can retrieve version, etc.). I just converted over the scanning code. Getting that to compile now.

#

it's still the case this code is going to about 10kB or so, and will not fit on SAMD51x19 without us trimming something else out. I am thinking we should write a Python wifi/socketpool/ssl wrapper to substitute for adafruit_esp32spi for such boards

#

fits fine of course on PyPortal with SAMD51J20

slender iron
#

ugh, I don't want to do that

#

can't we leave them with esp32spi?

tulip sleet
#

phone call...

slender iron
#

what has the SAMD51x19 and a coprocessor?

tulip sleet
#

metro m4 airlift lite + anyone who uses an AirLift co-processor board like a FeatherWing etc.

#

we don't HAVE to write this library, but if we do, then it's a largely uniform experience across all the boards, and we drop adafruit_esp32spi in the long run

#

only diff from regular native import wifi is that you have to specify the pins if needed

#

so I have an extra airlift_init() routine for that.

#

(on hold on the phone at the moment)

slender iron
#

we can see where we're at once the native is done

#

I think the external airlift board is going to be diminishing returns

tulip sleet
#

the size is essentially the same if I were to do native adafruit_esp32spi, so that seemed like kind of a waste of time, since it doesn't add an value really (speed is not an issue), and would only fit on pyportal and similar

#

we already discussed that

slender iron
#

right

tulip sleet
#

I'd also like to talk to you about BLE HID seeming to conflict with workflow issues and also maybe bablokb's notes about slower 10.x.x performance when using SD cards

#

could do video now; phone call done

slender iron
#

I'm around all day except lunchtime

tulip sleet
#

now ok?

slender iron
#

yup

manic glacierBOT
#

The current Mbedtls submodule includes PSA Crypto, but I'm not sure to what extent, if any, that version of the API differs from the one in Mbedtls 3.6.5 that Zephyr 4.3 uses.

I think this is the crux of whether you want to update. If they differ significantly then you may want to update. Even then, you can likely #ifdef the behavior between the two versions instead.

Does the Zephyr port have what you need for your project yet? If so, you can use it instead of the Nordic port.

manic glacierBOT
#

Does the Zephyr port have what you need for your project yet?

From looking in ports/zephyr-cp/boards/nordic, it looks like only nrf5340dk, nrf54l15dk, and nrf7002dk are supported. I'm using ports/nordic/clue_nrf52840_express.

After taking a run at implementing hashlib.sha1 and hashlib.sha256 on the PSA Crypto API, I think using PSA for hashlib is not so good because of the overhead it would impose for boards that don't need TLS. Problem is PSA requires that you initialize a bunch of stuff...

#

CircuitPython version and board name

cp 10.0.3
waveshare esp32-s3 touch lcd-2

Code/REPL

# code.py -- ESP32-S3 Reverse TFT Feather
# Minimal BLE HID keyboard: D0, D1, D2 send A, B, C

import time
import board
import digitalio

import adafruit_ble
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble.services.standard.hid import HIDService

from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycod...
manic glacierBOT
#

The point of this is to:

  1. Make it possible to use a CLUE board as a TOTP token that supports the SHA1 and SHA256 hash algorithm options for fast updating (pure python hashes take 2+ seconds)
  2. Add optional SHA256 support to hashlib that can be used by other things that need it (e.g. CircuitMatter)

List of specific changes:

  1. Implement 'sha256' option for hashlib.new()
  2. Gate SHA256 stuff behind #ifdef CIRCUITPY_HASHLIB_SHA256
  3. Enable hashlib with 'sha1' and 'sha256' for ports...
manic glacierBOT
manic glacierBOT
#

Thanks! Looks good to me, but did not test.

It's too bad there's so much duplicated code and documentation. If the documentation is largely the same for busio.I2C, I wonder if it should cross-reference that instead of copying it. The shared-binding code of busio.I2C vs zephyr_i2c.I2C also seems to be pretty much identical, or are there subtle differences? I don't see how to get around that except maybe if one macro-ified the the shared-binding source so it could be instantiated sev...

#

Thanks! Looks good to me, but did not test.

It's too bad there's so much duplicated code and documentation. If the documentation is largely the same for busio.I2C, I wonder if it should cross-reference that instead of copying it. The shared-binding code of busio.I2C vs zephyr_i2c.I2C also seems to be pretty much identical, or are there subtle differences? I don't see how to get around that except maybe if one macro-ified the the shared-binding source so it could be instantiated sev...

manic glacierBOT
manic glacierBOT
lone sandalBOT
lone sandalBOT
manic glacierBOT
#

CircuitPython version and board name

Board: ESP32-S2-DevKitC-1-N8R2

CircuitPython Version: 10.0.3

Code/REPL

Code to Reproduce:

pythonimport board
import busio
import sdcardio
import storage

spi = busio.SPI(board.IO36, MOSI=board.IO35, MISO=board.IO37)
cs = board.IO34
sd = sdcardio.SDCard(spi, cs, baudrate=250000)
print("SDCard initialized successfully")  # This works

vfs = storage.VfsFat(sd)  # Fails here with OSError: [Errno 19] No such device
storage.m...
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Thanks for the reply. I did not install TinyUf2 bootloader at all. I thought that was purely to install circuit python using a uf2. I'm happy to do that and erase the file system next time I'm in front of the board / pc. ( I for the most part have been using micropython, but here circuit python appeared to have better support for MP3s and sound overall)

manic glacierBOT
#

It's fine just to use the .bin, but erase the flash beforehand if you did not already do that. The size of CIRCUITPY is what is expected. There are two firmware partitions - one is for potential OTA update.

I am not sure this has to do with that, though. How are you wiring the SD card breakout? Are you supplying it with 5V or 3.3V to VCC? The breakout does level conversion and expects and delivers 5V logic levels, which the Espressif board will not be happy with.

manic glacierBOT
manic glacierBOT
#

Hi!

Sorry, I forgot to mention earlier. This board will be used with a guidebook that our team is developing. We planning to freeze in all the required libraries so users don’t have to manually add anything into the lib folder. That’s why you see many libraries included here hahah. There are two more libraries I plan to add OPT4048 (which I already added) and PAJ7620.

  • I removed the adafruit_bus_device as per your comment
  • we use the simpleio Iibrary because we use it for buzz...
manic glacierBOT
slender iron
#

<@&356864093652516868> We'll be meeting in just over an hour. I'm excited to chat with you all! Notes doc is here: https://docs.google.com/document/d/1_O2owjB7PZ_xTvg7pxIdX81GBGeHt_-u9CGx5fn2IP4/edit?tab=t.0

tiny peak
#

Scott, did you happen to see my hashlib PR?

slender iron
#

yes, haven't gotten through my email and reviews completely yet

#

It's an open tab 🙂

tiny peak
#

one thing I wasn't sure about was turning it on for boards other than CLUE. I happen to be using that one at the moment, but it seems potentially relevant for other stuff.

tulip sleet
tiny peak
#

oh wow, yikes

slender iron
#

yes, hashlib shouldn't change shape across ports

tiny peak
#

so what about enabling the sha256 option?

#

Like, there was an existing CIRCUITPY_HASHLIB option which I just turned on for CLUE. But, then I also added a CIRCUITPY_HASHLIB_256 and turned that on too.

slender iron
#

I don't have the context to discuss this yet. Let's discuss it on the PR

tiny peak
#

sounds good

manic glacierBOT
#

It's too bad there's so much duplicated code and documentation. If the documentation is largely the same for busio.I2C, I wonder if it should cross-reference that instead of copying it. The shared-binding code of busio.I2C vs zephyr_i2c.I2C also seems to be pretty much identical, or are there subtle differences?

I think this is a bit of a trade off with having a shared central doc file versus having it in shared bindings. Having it next to the shared-bindings means that it needs ...

#

Open question: Should this be turned on for other boards/ports? Dan suggested on discord that it might be useful to try turning on the SHA256 option for stuff that already enables hashlib to see if it fits.

Go ahead and try it. Just set CIRCUITPY_HASHLIB_SHA256 = $(CIRCUITPY_HASHLIB) in circuitpy_mpconfig.mk, I think, and re-run the PR. If it doesn't fit we'll see failures. That's how we check in general.

tiny peak
#

+1 for a settings.toml option to turn off the boot delay. That would save battery for sensors that do a lot of deep sleep.

slender iron
#

boot delays are skipped when waking from deep sleep. However if you do the sleep externally it could help.

turbid radish
#

No newsletter Dec 29th

#

Thanks all!

wraith crow
#

Thanks everyone 😁

lone axle
#

Thanks for hosting Scott. Have a great week everyone 👋

tulip sleet
#

Thanks Scott!

slender iron
#

Here is the notes document for next Monday’s CircuitPython Weekly Meeting. It is at the normal time of 11am Pacific / 2pm US Eastern here on Discord. Add your hug reports and status updates to the document before the meeting. If you are unable to attend but would still like to contribute, feel free to add your notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/1HoEfxmPuua_fsRhUIkSPLZ6aGZnY1cEgfWfj-oe2_js/edit?usp=sharing

manic glacierBOT
manic glacierBOT
manic glacierBOT
tiny peak
#

@tulip sleet Currently working on your requested documentation change. Is there a guide somewhere that describes the normal procedure for building docs locally. Scanned through the Building CircuitPython guide but didn't find any obvious mention of it.

slender iron
#

you can make html in the repo root

tulip sleet
slender iron
manic glacierBOT
#

now Build CI / docs check is failing, but it looks unrelated, probably?

From the build log:

...
zephyr_i2c/__init__.pyi:127: error: Incompatible default for argument "in_end" (default has type "None", argument has type "int")  [assignment]
zephyr_i2c/__init__.pyi:127: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
zephyr_i2c/__init__.pyi:127: note: Use https://github.com/hauntsaninja/no_implicit_optional to automat...
manic glacierBOT
#

Dan, you've mentioned turning hashlib on for boards that have wifi. From ripgrepping for CIRCUITPY_HASHLIB and CIRCUITPY_WEB_WORKFLOW, cross checked with circuitpython.org included modules lists, it seems the only ports which currently enable hashlib for at least some boards are:

  • ports/espressif
  • ports/nordic (after this PR)
  • ports/raspberrypi

So, that would seem to leave out:

  • M4 based PyPortal boards
  • M4/M7 AirLift boards
  • Various non-rp2/ESP32/nordic Feather boards (potenti...
manic glacierBOT
#

@samblenny This is fine for now. I mean boards with native wifi. The current ones with hashlib depend on mbedtls. So what you did was add the SHA256 calls. It's consistent.

I am adding wifi/socketpool/ssl for boards that could support AirLift. I don't think I will need hashlib for those boards, because the cryptography is done in the co-processor. Right now PyPortal doesn't need or have hashlib, for instance.

@tannewt https://github.com/adafruit/circuitpython/pull/10740#issuecomme...

manic glacierBOT
#

OK thanks - btw - I am using 3.3 V for the power.
I erased the flash using TinyUf2 and reinstalled cp using the open installer. Seems like everything went fine.
Tried again...same behaviour I'm afraid.

Pics are never perfect..but I have the sd card lined up w/the pins:
<img width="846" height="466" alt="Image" src="https://github.com/user-attachments/assets/dc32de5d-341c-481b-9fc7-50531f7d96d2" />

and tought to get a great angle but I am plugging in in the right area :) : (34,35,36,37)
<im...

manic glacierBOT
manic glacierBOT
#

Hi Dan,
I kept getting an error in the actions, i have updated my branch with origin/main, but I still end up getting this error:
`touch circuitpython-stubs/board/init.py
touch circuitpython-stubs/board_definitions/init.py
zephyr_i2c/init.pyi:125: error: Incompatible default for argument "out_end" (default has type "None", argument has type "int") [assignment]
zephyr_i2c/init.pyi:125: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to...

orchid basinBOT
manic glacierBOT
#

I went to test the latest version of Display Text and start updating guides that use the old more specific Label classes and realized that some projects are for devices with it frozen in so they don't have access to the newest version unless the user puts the library in root.

I will plan on waiting until the next release that includes the frozen lib updates before making those changes to the learn projects that way the normal library procedure will continue to work as expected.

manic glacierBOT
#

I think I am seeing the same issue with a Adafruit gamepad plugged into a Fruit Jam. The device.read(0x81, buf) call in the demo code takes about .07 seconds to complete, which is too slow for a game running at 20 frames a second (.05 sec per frame). I am wondering if Sam Blenny's code in the Adafruit Playground for "Fruit Jam Gamepad Tester"/"Fruit Jam Two Gamepad Demo" is a work-around or has the same issue.

slender iron
#

@tulip sleet when you are around, can we talk about supporting two different SPI types interenally?

manic glacierBOT
#

Hi, I've got Circuit Python running an ESP32 WROOM and ESP32 Dev board. If I hook the board's USB port to my Framework 13 laptop port directly it boots and I can open a Putty session on the com port where it shows up and get the REPL. If I plug a hub into the framework port, and then plug the ESP32 into a Hub port, the disk still shows up but attempts to open the serial port hang. This is very repeatable. If I use the Arduino IDE to create a serial port on the USB connector it works both plug...

orchid basinBOT
manic glacierBOT
#

CircuitPython version and board name

Board: espressif_esp32s3_devkitc_1_n8r8
Frequency: 240000000
(sysname='ESP32S3', nodename='ESP32S3', release='10.0.3', version='10.0.3 on 2025-10-17', machine='ESP32-S3-DevKitC-1-N8R8 with ESP32S3')

Code/REPL

"""
Minimal test case to reproduce BLE UART write error 261 on ESP32-S3
This script attempts to connect to a BLE UART device and write data.
"""

import time
from adafruit_ble import BLERadio
from adafruit_ble.advert...
manic glacierBOT
#

The fixed implementation versions of I2C, UART and SPI will live in modules separate from busio but act the same way. busio is reserved for dynamic pin construction.

Dan and I just decided not to do this because it complicates other C modules that rely on the standard busio common_hal such as FourWire and SDCard. board will still hold fixed versions but they'll be busio.* objects.

manic glacierBOT
orchid basinBOT
manic glacierBOT
manic glacierBOT
#

@baldengineer Would you mind testing your board(s) again with 10.0.3? In forums.adafruit.com/viewtopic.php?t=221471, a user reports there is no REPL control via serial. Thanks.

Tested with 10.0.3 and I have access to the REPL in serial (and can see it on the OLED.)

I erased Flash before updating from 9.x.x.

<img width="1230" height="411" alt="image" src="https://github.com/user-attachments/assets/3b9a49e3-d819-414f-8d51-0300d2da...

orchid basinBOT
manic glacierBOT
#

It worked out like I said in the last comment, that it sort of worked with
the battery attached and the firmware stated. I have since abandoned that
board in favor of a usb-c feather.

In terms of software, both worked fine, but thonny is the better way to
go.

It has a feature that you can save in UTF8, which I found to be helpful as
sometimes my files seemed to get corrupted from my rapid development and
rewrites.

On Tue, Dec 9, 2025, 7:54 PM Markos H @.***> wrote:

*...

orchid basinBOT
orchid basinBOT
#

For what it's worth, I'm still against a rewrite of circuitpython.org. I'm still not convinced that we can't fix the hard edges with jekyll in much less time than a rewrite would take. I think a rewrite should be a last resort.

I do understand liquid is somewhat annoying to use, but at the same time, it's currently working in production for our use cases.

If we need to handle board renames, and permalinks, we can opt-in to various plugins as the jekyll ecosystem is fairly massive and we are...

orchid basinBOT
#

For ESP8684-DevKitC-2-N4, it should have been formatted slightly different as ESP8684-DevKitC-02C-N4.

I agree on the above.

For the ESP32-S2 boards, wow, this is confusing. The CircuitPython builds for ESP32-S2 DevKitC boards cover the boards below. They are virtually identical except for the memory differences.
a. 4MB flash; no PSRAM
b. 4MB flash; 2MB PSRAM
c. 8MB flash; 2MB PSRAM

Here is a list of ESP32-S2-DevKitC-1 boards:
https://docs.espressif.com/projects/esp-dev-kits/en/...

manic glacierBOT
tiny peak
#

Is there an existing plan or checklist for what should be added to core to enable porting CircuitMatter to boards instead of just Raspberry Pi? I'm thinking of:

  1. Which boards have the right kind of radio -> what vendor SDKs (ESP-IDF and ???) would be relevant to those boards -> how do those SDKs handle hardware TRNG access -> because PSA Crypto needs a hardware entropy source as part of initialization
  2. What should the module namespacing look like for providing things that CircuitMatter currently gets from importing ecdsa, cryptography.hazmat.primitives.ciphers.aead, ecdsa.curves, ecdsa.ellipticcurve, etc. Would it make sense to just dump all the relevant stuff in a new psa_crypto module or something? (I am assuming that matching the CPython API of the aforementioned modules would involve adding way too much irrelevant code beyond what CircuitMatter needs)
tulip sleet
#

This was a "just get it working" effort, which made up some substitutes for various third-party modules and included just enough code to get things working. I got a light bulb to blink. There were issues about doing secure-enough key generation. Because of a security flaw in some encryption scheme (I can reconstruct the details but don't have it at the front of my head), it is necessary to run some aspect of key generation like 100k times to make it sufficiently safe. On a CircuitPython board this could take hours. One solution is don't bother to be so secure, and the other is to run the key generation on a faster computer and copy it over.

#

When I put the CircuitPython part of this work on hold, we were still thinking about how to move forward with zephyr, etc., and what crypto stuff should really be in C, complicated by what kind of hw support there is on which chips for crypto.

#

it was not urgent and there were other things to do. There were also complications about which of the major Matter-supporting platforms allowed uncertified devices access.

#

there were not that many Matter devices available. We thought our focus might be more on building Matter-compatible devices rather than controlling Matter-compatible devices

#

but we didn't know. And the market momentum of Matter was not clear (and still isn't, though IKEA's new product line is a good push).

tiny peak
#

hmm... I'm kinda interested in it as a potential extension of the LoRa sensor monitoring stuff I've been doing

tulip sleet
#

It is a big somewhat messy thing, not as bad a BLE, but still large.

tiny peak
#

Like, I cobbled together a system that works fine with my own homebrewed MAC layer and LoRa or ESP-NOW for transport, plus some IRC and web. But, that's all kinda weird and outside the phone ecosystem

#

Wondering if CircuitMatter with Apple Home app integration or whatever might make for convenient sensor monitoring and control panel stuff

#

plus automated light controls, etc.

tulip sleet
#

is MQTT a good base for your stuff. Monitoring vs device control (light bulbs, etc.) are kind of two different directions

#

I think you could do what you want without all the Matter infrastructure.

#

we have done some Home Assistant stuff

tiny peak
#

The unifying angle for me is having little notification and status gizmos (that look respectable) scattered around living and work spaces. I'm not worried about data collection. Thinking more about little mini-dashboard/status-light/control panel gizmos

tulip sleet
#

and Adafruit IO and Wippersnapper are all about monitoring

tiny peak
#

Yeah... I'm inclined more toward locally hosted stuff

tulip sleet
#

Wippersnapper will also do output stuff, not just monitoring

tiny peak
#

(allergic to subscription plans, etc)

slender iron
#

We were targeting wifi for CircuitMatter first

#

once we have that, we could look at thread

tulip sleet
slender iron
#

I don't know of matter over lora. Matter is built on top of ipv6 generally

tulip sleet
#

a local MQTT server might serve well, with some kidn of lora gateway

slender iron
#

I think the main project for local control is home assistant

tulip sleet
tiny peak
#

Context for why I mention the stuff above is mainly to motivate the idea that I'm potentially interested in investing a bit of dev time to move the CircuitMatter stuff forward -- at least far enough to see if it would meet my needs. I don't think AIO or Wippersnapper would be a good fit for me.

#

At the moment I'm more specifically interested in the angle of integrating collected sensor data (which I already have) with home automation stuff (ambient status displays & light controls). I've evaluated Home Assistant, and I don't much like it. Wondering if CircuitMatter would be better.

manic glacierBOT
tiny peak
#

All that is to say, if you had some wishlist issues for stuff you'd like done to support porting CircuitMatter, maybe I could implement some of them

#

If it's too soon, that's fine too.

tulip sleet
#

I would say Matter and Home Assistant exist at different levels in the functionality stack. Matter has multiple transports and specifies how controllers and devices define themselves and talk to each. I don't know a lot but I see it as similar to BLE service/characteristic/etc. definitions

#

BLE kinda mixes up the transport level and architeture level.

tiny peak
#

The angle that intrigues me is that it's got some integration with Apple's ecosystem

#

Like, if I could tie my sensor system into apple's notification system on my mac and phone, that would be potentially interesting.

#

same for being able to control lights at my workstation

#

particularly if I could do it all in a way that didn't have any network dependencies outside my home LAN

#

I'd be willing to invest some dev time to see if those sorts of things are possible (unless you already know they're obviously not)

tulip sleet
#

There is no reference-y impl of Matter in Python (there is kind of one for JavaScript, if I remember right). Scott was kinda doing that (but he can speak for himself if this is a mischaracterization), tackling both the device/service definition and the basics to get communication working. I then took that and tried to replace the big cryptography libraries with something that would fit in CircuitPython. That's as far as it got.

#

It is a lot of code, and the next step might be to see how to get the crypto stuff to be more efficient. But right now it is a thin vertical existence proof.

#

we have no planning docs or anything olike that

#

for your practical purposes, I'd say look at stuff that's more mature and that has the Apple Notificiation stuff you want (we have some BLE support for that, and maybe there is also stuff in Home Assistant or something you can hang off a local MQTT server)

tiny peak
#

okay, so looking at if from a slightly different angle... are you relatively sure that a CircuitMatter implementation of some sort is a thing that you want? (sure enough to justify some potentially failed experiments in attempting to get it to work?)

#

I'm less concerned about having a thing that works now than I am with having a project that would be cool to write about

tulip sleet
#

it's a goal, medium-long term. If Matter died on the vine then it wouldn't be.

tiny peak
#

okay. that helps

#

what about plans for the appropriate sort of namespacing for better core crypto support on CircuitPython boards? Like, Matter aside, do you know where you'd like ecdsa stuff to live? Would it be better not to mess with such things until the Zephyr ports are further along?

#

Basically, I'm wondering if this is the wrong time to pursue this stuff as an active project. Perhaps I should just put it on the list of stuff to keep an eye on for later

tulip sleet
#

I pushed my latest changes; I don't remember exactly what was going on then.

#

we haven't decided about ecdsa, etc. I was just trying to prune the code enough to get it to fit and just (barely) work.

#

I think it's premature, yes, and right now we don't have time to do much direction-setting on this. It would be a few months at least, I think.

slender iron
#

@tiny peak if you want to experiment with circuitmatter then start on desktop cpython

#

don't require a bunch of pre-work to get into it

tulip sleet
#

look at the blink.py and cpblink.py examples in main and the circuitpython branch in the repo

tulip sleet
#

@slender iron do you know of a single C call I can make that will do the equivalent of str(some_object), where some_object has a print routine? It looks like I could use an mp_print_t and a vstr, mp_printf() into the vstr mp_print_t and then convert it to a str, but I thought there might be a single call. I can't find one, which seems a bit weird.

slender iron
#

I can't think of one off the top of my head either

tulip sleet
#

thanks - I was stymied 🤷

slender iron
#

I think mp_printf trick is the way to go

tiny peak
#

tannewt & danh, thanks for the context on CircuitMatter. Sounds like the thing for me to do is wait and maybe poke at the CPython stuff.

manic glacierBOT
manic glacierBOT
#

For products released after Oct 14, 2025, the LCD/Touchscreen drive IC have been replaced with ST7123. Which version are you using to run the tests? I have the old one (the first one).

Do you know if the serial number or the outside box can tell the difference? I ordered another but it looks like 250901 is in the serial number. The outside box does mention gt911. I'll likely return it if so.

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.1 on 2025-10-09; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3

Code/REPL

mpconfigboard.mk:

CIRCUITPY_BLE_FILE_SERVICE = 0
CIRCUITPY_SERIAL_BLE = 0

Behavior

Circuitpython won't build when disabling BLE_FILE_SERVICE and SERIAL_BLE.

PacketBuffer.c seems to be missing a compilation guard when the build flags are set. It seems like the prototype is removed from the header fil...

tulip sleet
#

@jaunty juniper interesting thing I discovered about NINA-FW while working on AirLift wifi. A few years ago a bunch of low-level socket operations were added, here: https://github.com/arduino/nina-fw/pull/81. It's hard to find any public code that uses this, except maybe for https://github.com/gershnik/BetterWiFiNINA, which didn't know about before a few minutes ago.
Your additions to adfruit_esp32spi didn't assume these (rightly so), and I don't know whether there are any bugs.

manic glacierBOT
tulip sleet
#

may try your Python code, converted to C first, or may try the socket ops

crimson ferry
#

the NINA BSD sockets API looks nice, and it has select/poll which could help with async on Airlift

manic glacierBOT
manic glacierBOT
tulip sleet
manic glacierBOT
manic glacierBOT
nimble sparrow
#

Now that we have stdin injection for USB keyboards for e.g. Fruit Jam, is there a world in which we expand that functionality more generically? I'm playing with the Tanmatsu (https://docs.tanmatsu.cloud) right now with an early working CP build, and I've played with the Lilygo T-Deck in the past. Both have built-in keyboards via I2C daughterboards (in the Tanmatsu's case, @indigo wedge's beautiful keeb), and at the moment the most you can do for either is simulate a REPL by grabbing keypresses and running exec etc. on the input on a carriage return.

lone axle
# nimble sparrow Now that we have stdin injection for USB keyboards for e.g. Fruit Jam, is there ...

I think the M5 cardputer also has the stdin key injection. It looks like it's using a matrix instead of I2C board, but I think something similar could be possible to implement for the I2C keyboards. https://github.com/adafruit/circuitpython/blob/main/ports/espressif/module/cardputer_keyboard.c Most of it happens in here. There have been some changes and refactoring to it over time, if you search PRs for cardputer, or check git history you could see the evolution of functionality for that device which could be good place to start from for adding similar support to other devices.

nimble sparrow
#

Thanks, great minds - I just started poking around at how the cardputer does it!

manic glacierBOT
nimble sparrow
manic glacierBOT
#

I was about to create a duplicate... and my title would have been: "CardPuter Crash on cardputer_keyboard.KEYBOARD.deinit()"

My piece of code to trigger that is this:

import cardputer_keyboard
#cardputer_keyboard.detach_serial() # <= optional, does not help
cardputer_keyboard.KEYBOARD.deinit() # This crash with CP 10.0.3 and CP 10.1.0-beta.1

Why deinit the keyboard? Because I try to use the CardPuter firmware for the CardPuter ADV.
So the tentative is to free board.KB_A_1 and `boa...

manic glacierBOT
urban silo
#

Hi! I'm trying to get CircuitPython to work as an app, started from a launcher firmware on my ESP32-P4 board. The whole launcher part works and can start CircuitPython as an app without problems 🙂

But... there is one tiny issue: my other firmware expects that the FAT partition uses the wearleveling API provided by ESP-IDF. CircuitPython appears to not use said API and thus overwrites the FAT with wearleveling with its own filesystem on boot. I've solved that for now by patching internal_flash.c to use the inactive OTA slot as the FAT partition.

Instead of this workaround I would like for CircuitPython to be able to mount the FAT with wear leveling. Before I even look into implementing such a thing, what is the stance of the devs here on such a thing and are there things I should know?

tulip sleet
# urban silo Hi! I'm trying to get CircuitPython to work as an app, started from a launcher f...

The wear-leveling code is not included in the CircuitPython build. The FAT implementation, shared across all ports, is in lib/oofatfs. The lowest-level ESP-IDF actual flash r/w calls are in ports/espressif/supervisor/internal_flash.c. Note that "internal" here is a misnomer, due to how ESP-IDF is structured. Dependin on how the ESP-IDF wear-leveling is structured, that may or may not be the place to add it.

#

In general, we have essentially no reports of people wearing out flash that might require wear-leveling. But for people who want to do a lot of flash writes, they often end up using an SD card.

#

MicroPython has switched to using LittleFS in many cases, but it's not available via USB MSC.

#

What is your higher-level goal here?

urban silo
# tulip sleet What is your higher-level goal here?

Integration with the rest of the ecosystem, CircuitPython is one of the apps a user can run, but for example a NES emulator app could use the same FAT partition to store its roms. Apps on the platform can be of two types: main type is just separate firmware that gets started through some bootloader modifications we made which allow starting firmwares from a special flash partition (based on sprites work for the pocketsprite (can be found here if you're curious: https://github.com/badgeteam/esp32-component-appfs). The second type is ELF applets which get started on top of the launcher firmware and can thus hook into the existing library code the launcher itself uses.

We will eventually want to start CircuitPython with an argument string stored in the LP RAM, this will allow a user to select a Python script from the launcher to start it, as an alternative form of apps for the device. When started without a script filename we want to drop to REPL on the on-device screen and keyboard so that people can play with Python on-the-go.

#

Best case would be if we can integrate all of this in upstream CircuitPython, which is why we will try to keep as much of the required changes as possible within the confines of the board folder

#

Another fun challenge is the internal I2C bus, we plan on adding our existing C drivers for the peripherals on said bus to the board folder with Python bindings on top to allow for proper semaphore locking on bus access and such, so that we can have regular interrupt handler tasks in FreeRTOS running.

#

(And a slightly modified ball demo running as python script)

tulip sleet
#

CircuitPython does a tricky thing, which is that the MBR is not actually written to flash -- it's always the same, so we simulate it. See supervisor/shared/flash.c. This might or might not be one of the problems.

#

flash_read_blocks()

#

this might be part of the issue you are seeing, but I'm not sure.

urban silo
#

As the inactive-ota-partitinon approach seems to work well enough to allow for at least temporary filesystem retention between system updates a potential solution could also be to just mount the other filesystem in a subfolder, like with SD cards

tulip sleet
#

in the longer run, we are working on a zephyr port to achieve some commonality for a lot of lower level things, like maybe flash management

#

and definitely BLE and network stacks

#

i agree that just keeping our filesystem separate is the easiest solution for now

urban silo
#

Ah yes, I was about to mention that bit too: as the P4 doesn't have a radio built-in we have to use esp-hosted-mcu and a separate ESP32-C6 via SDIO for network.

tulip sleet
#

since it's your board, you can configure the flash partitions however you want

urban silo
#

That esp-hosted stuff has been giving me headaches for a while now, I'm at the point I'm separating out all the low-level SDIO stuff and doing version checks before continuing just to avoid crashing on every single tiny thing

urban silo
#

I do wonder how difficult it would be to integrate by just mounting with the standard ESP-IDF functions. They do map to the POSIX file calls so without having looked into the custom filesystem stuff of CircuitPython I assume that should just work? 😄

tulip sleet
#

assuming we make a P4 board it may or may not use the ESP-IDF firmware for a C6 co-processor. We also have a variant of NINA-FW which we've used in the past. In the past we talked to the co-processor with the adafruit_esp32spi library. At this very moment I am working on a native-C wifi/socketpool/ssl implementation that uses the NINA-FW protocol underneath. But we are also considering the ESP-IDF co-processor firmware.

#

The filesystem mounting code is done at the FAT block level. See the sdcardio and sdioio impls, and also adafruit_sdcard. You provide readblocks and writeblocks. The FAT stuff is done with the existing FAT code.

#

it is not done at the POSIX system call level

#

though internally there are "protocols" for doing that between different kinds of filesystems (that's how LittleFS vs FAT is supported, for instance).

urban silo
#

Oh, that complicates stuff by a lot actually... I assumed it would be the same as MicroPython in just using POSIX calls.. oh well, new challenge 🙂

tulip sleet
#

We don't have LittleFS built in to CircuitPython, but since it comes from MicroPython, there is latent support, though we have removed a bunch of sources.

#

that is how MicroPython does it too for block filesystems

#

at the Python level

#

I am not that familiar with how to support other than FAT, as I haven't had to do it yet.

urban silo
#

We're not using LittleFS, but FAT with the Espressif WL library below it

jaunty juniper
#

I'm curious, what does the ESP-IDF fat wear leveling API do ? Is it a standard FAT variant ? Does it do stuff on top of a standard FAT partition ? Is such a partition mountable on a PC ?

tulip sleet
#

yeah, does it remap the block addresses?

urban silo
#

Ah, seems we can just use wl_read and wl_write API calls to allow the standard FAT library to use the flash as if it doesn't have WL

urban silo
nimble sparrow
tulip sleet
nimble sparrow
#

Ah I see, this is for a new board design then?

#

I thought you meant you were working on a generic new firmware we could use on the C6 on any of these various P4+C6 combo boards

#

(Tab5, Tanmatsu, Waveshare various, EV)

tulip sleet
nimble sparrow
#

Ahhh, I wonder if we can reuse it

tulip sleet
#

ESP-IDF supplies several co-processor firmware options, in which they do remote API calls to the C6 from the network stack on the P4 (or other Espressif chip).

#

They don't use NINA-FW: that takes a different approach with the network stack on the co-processor. NINA-FW origin is much older: from Arduino WiFi shields

#

they have multiple ways

manic glacierBOT
nimble sparrow
tulip sleet
#

are you on the same project with Renze or different?

nimble sparrow
#

Same

#

And have a couple of other P4+C6 boards

manic glacierBOT
#

Update: I got an ESP32-S3-DevKitC-1-N8R8 and that works well - after some massaging - I needed to use an external power for the sd card...and a few 100 uF caps - I have notes here https://github.com/jouellnyc/esp32_MAX98357A

TL;DR

  • I did the same setup with an Adafruit Metro ESP32-S3
  • That worked flawlessly using it's internal sd and did not need any 100 uF capacitors.
  • I leaned on Claude Ai extensively as the sd card + amplifier took lots of troubleshooting to get right.

At least I h...

manic glacierBOT
#

My nRF board doesn't want to work with the new thonny at all, it keeps resetting, it barely works in thonny 3.2.6

on the other side is ESP32 TTGO LoRa running MeshCore Firmware. I can't even communicate with USB-HOST, I also found out that there is no bluetooth support at all on PICO W

]0;🐍192.168.1.103 | BLE:Reconnecting | REPL | 10.0.3\

Adafruit CircuitPython 10.0.3 on 2025-10-17; ESP32-S3-DevKitC-1-N8R8 with ESP32S3

%Run -c $EDITOR_CONTENT
disconnected, scanning
connected
echo
Tra...

manic glacierBOT
#

@jouellnyc Glad you got it working. I'd suggest finding a different SD card breakout that doesn't have level shifters, which might be degrading the signals. If they are designed correctly that should not be a problem. So a better quality one might work better too.

We have a no-level-shift breakout: https://www.adafruit.com/product/4682

manic glacierBOT
#

This fix makes it possible to disable BLE file services and remove the flashing blue light start-up sequence. That speeds up the overall start up procedure significantly for users who don't use these services.

It works well in combination with "CIRCUITPY_SKIP_SAFE_MODE_WAIT = 0" to remove both the flashing yellow and flashing blue start up sequences.

mpconfigboard.mk:
CIRCUITPY_BLE_FILE_SERVICE = 0
CIRCUITPY_SERIAL_BLE = 0

Fixed issues:
-Conditional compilation of prototype in hea...

#

Thanks!

I added this as I though it could be a helpful feature for others who don't use the BLE file services and wants to speed up the board startup sequence by removing the flashing blue and flashing yellow led delay.

It works great together with CIRCUITPY_SKIP_SAFE_MODE_WAIT = 0.

I tested it with flags enabled and disabled.

Pull request:
https://github.com/adafruit/circuitpython/pull/10753

Hope I did it right, I tried to follow the guide and all the instructions.

#

This fix makes it possible to disable BLE file services and remove the flashing blue light start-up sequence. That speeds up the overall start up procedure significantly for users who don't use these services.

It works well in combination with "CIRCUITPY_SKIP_SAFE_MODE_WAIT = 0" to remove both the flashing yellow and flashing blue start up sequences.

mpconfigboard.mk:
CIRCUITPY_BLE_FILE_SERVICE = 0
CIRCUITPY_SERIAL_BLE = 0

Fixed issues:
-Conditional compilation of prototype in hea...

slender iron
#

@urban silo We'd merge a PR to add the ability to read and write via wear leveling as long as it is behind a flag so boards can opt in.

#

We already have a way to set which python file to run next too.

lone axle
slender iron
#
Instructables

Moon and Tide Clock: Want a clock that can't tell time but instead uses the current time to calculate the lunar phase and an incredibly specific oceanographic prediction for a tiny subset of the UK coastline. THEN HAVE I GOT THE CLOCK FOR YOU. presenting the worlds firs…

#

This is video 66 on embedded solutions. In this video, we learn to improve our LVGL widgets. We start with one of our simple test programs and enhance its widgets with images and styles. The result is a colorful display that is also functional. Our Test Rig is an ESP32-S3-N16R8 USB Board wired to an integrated ILI9341 display and xpt2046 touchs...

▶ Play video
manic glacierBOT
#

This fix makes it possible to disable BLE file and serial services, to remove the flashing blue light start-up sequence. That speeds up the overall start up procedure significantly for users who don't use these services.

It works well in combination with "CIRCUITPY_SKIP_SAFE_MODE_WAIT = 0" to remove both the flashing yellow and flashing blue start up sequences.

I tested the fix with the build flags both enabled and disabled.

mpconfigboard.mk:
CIRCUITPY_BLE_FILE_SERVICE = 0
CIRCUITPY...

#

Thanks!

I added this fix as I though it could be a helpful feature for others who don't use the BLE file services and wants to speed up the board startup sequence by removing the flashing blue and flashing yellow led delay.

It works together with CIRCUITPY_SKIP_SAFE_MODE_WAIT = 0 which already works well.

I tested it with flags enabled and disabled.

I created pull request towards the main branch that I just closed, as I realized that 10.0.x seems to be the target now. Here is the new pull...

slender iron
#

I don't hear Dan either

tulip sleet
#

ok, never mind, no success here

#

just read mine

#

Thanks for hosting @lone axle !

slender iron
#

Thanks for the meeting!

lone axle
#

Thanks everyone, have a great week!

lone axle
#

Here is the notes document for next Monday’s CircuitPython Weekly Meeting. It is at the normal time of 11am Pacific / 2pm US Eastern here on Discord. Add your hug reports and status updates to the document before the meeting. If you are unable to attend but would still like to contribute, feel free to add your notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/1c7VlX4wGl_jU02L7U-7uzNU-X_5s_TJavYiEm-u4RIw/edit?usp=sharing

orchid basinBOT
manic glacierBOT
#

CircuitPython version and board name

ESP32-C3: 10.0.3, 10.1.0-beta.1

Code/REPL

NA: initial installation

Behavior

Symptoms: only serial port found, no disk

[554608.088718] usb 1-5.2: new full-speed USB device number 109 using xhci_hcd
[554608.166223] usb 1-5.2: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[554608.166228] usb 1-5.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[554608.166229] usb 1-5.2: Produc...
#

@dhalbert here are connected 2 devices to demonstrate both cases. Second - ESP-C3 not recognized as a drive at all (separate issue).

lsusb -vt
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/14p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/3p, 480M
        ID 0bc2:ab44 Seagate RSS LLC Backup Plus Hub
        |__ Port 003: Dev 006, If 0, Class=Hub, Driver=hub/3p, 480M
            ID 0bc2:ab44 Seagate RSS LLC Back...
manic glacierBOT
urban silo
urban silo
urban silo
urban silo
manic glacierBOT
lone sandalBOT
orchid basinBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; Waveshare ESP32-S3-GEEK with ESP32S3
Board ID:waveshare_esp32_s3_geek

Code/REPL

import os
import board
import sdcardio
import storage

sd = sdcardio.SDCard(board.SD_SPI(), board.SD_CS)
vfs = storage.VfsFat(sd)
storage.mount(vfs, "/sd")
print(os.listdir("/sd"))

Behavior

code.py output:
Traceback (most recent call last):
File "code.py", line 8, in
OSError: [Errno 19]...

manic glacierBOT
solar whale
#

@danh a user has submitted a very helpful PR for the adafruit_rfm9x library. I have tested it and it works fine. I don't think it will add many bytes (if any) to the code -- Is it OK to goahead and merge it? I would then like to implement the chamge for the rfm69 library and the rfm combined libraries if that sounds ok. It should help eliminate some packet loss.

#

@tulip sleet hmm tried to tag you above, but I must have done something wrong 👆

tulip sleet
solar whale
tulip sleet
#

go ahead and merge and I'll make a release. Is there an API difference, or is it basically a "bug" fix?

#

then you don't have to wait to test the new release

solar whale
#

No API change -- just an improvement

tulip sleet
#

if testing is of interests

#

I can just click "Merge" right now 🙂

solar whale
#

I think it "does no harm" so I am comfortable with it. -- Go right ahead!

solar whale
#

I implment it for rfm69 and rfm in the next day or so.

tulip sleet
#

we really appreciate your work on the RFM libraries!

solar whale
#

Thank you! I doubt any users aother than the author will ever know, but it is a good idea.

manic glacierBOT
#

The code looks OK. What size is the SD card, and is it formatted as FAT? Does the card work on other CircuitPython boards?

The mount() is failing, so sdcardio is finding a card, but there is some issue with the filesystem.

I tried with 3 Micro SD Cards: 128GB and 64GB exFAT, and a small 8GB card in FAT32 and exFAT.
I don't have a micro SD card small enough for the old FAT format, is that the only supported file system?

I didn't try on other boards, but I have one board that might...

solar whale
manic glacierBOT
manic glacierBOT
manic glacierBOT
wraith crow
#

@slender iron I've been working on refactoring and switching my "native" USB host PR to using the CIRCUITPY_USB_HOST/DEVICE_INSTANCE parameters rather than inferring the instance from the CIRCUITPY_USB_HOST/DEVICE (enabled) parameters as you had suggested. It's been slow going as I've forgotten how everything held together but I think I'm back to the point where I have to dig into tiny_usb to figure out why the CIRCUITPY startup is sometimes hanging after the Serial console setup message. Before I did that though I wanted to run an issue by you. Since the CIRCUITPY...INSTANCE parameters are defined as macros in header files and ports/raspberrypi/mpconfigport.h defines a value for CIRCUITPY_USB_HOST_INSTANCE, I had to perform an #undef in the board/mpconfigboard.h file before setting the custom value for the board I'm testing. I don't think I've seen this before so I wanted to see if I've made a wrong turn somewhere along the way. I assumed that you hadn't intended for me to convert the header macro parameters to .mk file parameters so they could be more easily redefined by the board files?

slender iron
#

I ran into a similar issue recently too

#

where the port can't set a default value that boards can override

#

I think we may need to reorder the header includes...

#

I'd say just change the port value for now

wraith crow
#

If we're just looking at a short term solution is the #undef an option?

#

Would setting the USB_HOST_INSTANCE as a port default mess up all the boards that have attached USB A ports wired to pins?

#

re-reading your response.... when you say just change the port value, did you mean go ahead and change the value using the undef or did you mean change the default value for the port being set in ports/raspberrypi/mpconfigport.h. (I'm thinking you probably meant the undef is fine for now...)

manic glacierBOT
#

I could finally install MicroPython. With the latest version available of MicroPython (v1.27) and the files on the board's wiki, I get the same error:

Traceback (most recent call last):
  File "boot.py", line 23, in <module>
OSError: [Errno 19] ENODEV

The code on boot.py is:

import machine
import sdcard
import uos

# Assign chip select (CS) pin (and start it high)
cs = machine.Pin(34, machine.Pin.OUT)

# Intialize SPI peripheral (start with 1 MHz)
spi = machine.SoftSPI(
    ...
orchid basinBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

The same behavior at SAME54 Xplained Pro board with 10.0.1 and older. Last working Version is 9.2.8.
As IDE I use Thonny and a simple enter of x crashes.
I tried to investigate and compiled V10.0.1 as debugging version. Compiling was done with cflags CFLAGS += -fno-inline -fno-ipa-sra -DNDEBUG and it worked fine.
Further investigation shows only cflag -fno-inline is necessary to work.
Now enter x gives an NameError.
Perhaps this will help the developer to narrow down the error ...

slender iron
orchid basinBOT
slender iron
#

@tulip sleet my zephyr spi PR is waiting for your review.

tulip sleet
slender iron
#

Thank you! @tulip sleet

solar whale
#

@tulip sleet Thanks for the merges!

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; Raspberry Pi Pico 2 with rp2350a

Raspberry Pi Pico 2 - https://www.waveshare.com/wiki/RP2350-USB-A

Code/REPL

import usb_host
import board

usb_host.Port(board.GP12, board.GP13)


# SPDX-License-Identifier: Unlicense

import usb.core


from relic_usb_host_descriptor_parser import DeviceDescriptor


for i, device in enumerate(usb.core.find(find_all=True)):

    device_descriptor...
orchid basinBOT
manic glacierBOT
#

Can you try a test using a slightly modified version of Adafruit's Host descriptor library and this code snippet?

You'll need to rename any copies of adafruit_usb_host_descriptors.mpy you have in the /lib folder or the root folder of your device and then copy the adafruit_usb_host_descriptors.py from here (use the "download raw file" icon near the top of the code) to the ...

manic glacierBOT
#

I have done that
and i get

2dc8:3106
Traceback (most recent call last):
  File "<stdin>", line 49, in <module>
usb.core.USBError: 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 51, in <module>
NameError: name 'print_exception' isn't defined

line 49 being
print(device.manufacturer, device.product)

this is the same with just the dongle no controller connected or dongle with controller connected

#

Maybe I'm hiding too much info, can you try again with this snippet, this one let's it crash on the get_configuration call:

import usb.core
import adafruit_usb_host_descriptors
from traceback import print_exception

for device in usb.core.find(find_all=True):
# print device info
    try:
	print(f"{device.idVendor:04x}:{device.idProduct:04x}")
    except usb.core.USBError as e:
	print_exception(e, e, None)
    try:
	print(device.manufacturer, device.product)
    except usb.core.USBError ...
#
2dc8:3106
usb.core.USBError: 

Traceback (most recent call last):
  File "<stdin>", line 53, in <module>
  File "/lib/adafruit_usb_host_descriptors.py", line 98, in get_configuration_descriptor
  File "/lib/adafruit_usb_host_descriptors.py", line 75, in get_descriptor
usb.core.USBError: 

this part fails
config_descriptor = adafruit_usb_host_descriptors.get_configuration_descriptor(
device, 0
)

orchid basinBOT
#

Looking into this, it may be possible. We can get a list of releases from https://api.github.com/repos/adafruit/circuitpython/releases. My concern is that the GitHub API limit may be too limiting, but it appears to be 60 per hour per IP Address for unauthenticated (i.e. no token) access, which shouldn't affect most users. If need be, in the future, we could implement OAuth over Javascript, but it complicates the code and likely isn't necessary.

Anyway, once we have the release info, we shoul...

manic glacierBOT
orchid basinBOT
orchid basinBOT
#

After thinking about this more, I think it is not worth it. The latest stable and development versions are available. Other versions may require different TinyUF2 versions, as has happened recently for 4MB Espressif boards, and we'd have to keep track of which bootloader works for which UF2.

A previous version can be downloaded and installed with the WebSerial tool or esptool. We could point

I could imagine an alternate entry to OPEN INSTALLER that asks for files to be uploaded by the user....

orchid basinBOT
orchid basinBOT
lone axle
orchid basinBOT
orchid basinBOT
orchid basinBOT
orchid basinBOT
manic glacierBOT
lone sandalBOT
orchid basinBOT
manic glacierBOT
#

Re the autogen_board_info.toml files: if we wanted to turn on/off a module for a whole class of boards, would we need to re-do the builds locally for all those boards and recommit? Maybe using cascading toml to provide defaults would make sense in the long run so this extra step doesn't need to be done, like the cascading that mpconfig/mpconfigport/mpconfigboard provide.

Ya, it is kind of annoying but I added a make all (and make clean-all) to do it in one pass. This info is used i...

orchid basinBOT
orchid basinBOT
tiny peak
#

Question on where to file audio issues... In the course of doing a Morse code with sinewave synth thing on Fruit Jam, I've found some fairly annoying audio artifacts. Acoustically, they all happen together with the same reproducer code, but I think there are likely two different things going on:

  1. Strong clicks on synthio note attack and release: these sound like they have a good chance of relating to the synthio vca envelope or perhaps waveform interpolation calculations
  2. Aliasing and harmonics that get drastically worse as you decrease the sample rate from 48000 or 44100 down to 22050 or 11025. This sounds to me like there may be a need to adjust the TLV320DAC built in filters to match the sample rate (ensure nothing above nyquist frequency gets sent out the DAC). But, it's also plausible this might relate to synthio waveform interpolation code.

So, should I file a circuitpython issue for the synthio thing and an Adafruit_CircuitPython_TLV320 issue for the sample rate thing? Something else?

#

I'm also not sure if the attack/release clicks are a general synthio thing or if they are specific to the TLV320. I don't have any other DAC breakouts to compare it to.

tulip sleet
#

what kind of waveform are you generating?

tiny peak
#

I'm doing a variation on todbot's numpy sinewave thing, so the starting phase in particular ought to be pretty good, I'd think.

#

if you scroll back slightly in the #help-with-circuitpython channel, I posted a couple wav files demonstrating how the clicks sound and how I think the note attacks and releases ought to sound (lowpass filtered with sox).

tulip sleet
#

there is no ramp-up or down with your sine wave waveform, so it's going to generate energy away from the tone frequency

tiny peak
#

I've seen that mentioned, but I'm not super up on the details. The thing that bugs me about this is that setting a vca envelope on the synthesizer doesn't seem to reduce the clicking

tulip sleet
#

if you look at the spectrum of your first sample in, say, Audacity, you can see this:

tiny peak
#

If I set 30 ms attack an release times, I would expect that to substantially reduce the clicking, but that does not seem to be the case.

tulip sleet
#

could you post the .wav from that?

#

it's bad form in ham radio to have "hard" keying, with abrupt off/on transitions. It makes for a lot of noise outside of the narrow bandwidth of the CW (Morse) waveform

tiny peak
#

I think the one in the help channel ought to be downloadable? It's pretty similar to what's in the reproducer. I've been working on getting set up with a waveform recorder that I'm reasonably confident won't be applying any filtering, but I'm not there yet. (earlier recording made with macos voice recorder... unsure if it did any processing)

manic glacierBOT
#

Does this disable the keyboard support on the original version?

Yes it does break the keyboard for the normal Cardputer (v1.0 and v1.1) => definitively not a good solution and it should NOT be approuved.

And so far I had no success using TCA8418 (at least I can talk to it in I2C, but I could get any key input out of it... need to investigate).

I think the best option would be to create a separate Cardputer ADV board and improve over time. This is what we did for the original `C...

manic glacierBOT
#

Hi!

Thanks again for the suggestion. We’ve disabled several unused modules and adjusted the firmware flash allocation (similar to Pico W / Pico 2 W). The firmware now takes up about 81% of the allocated space.

  1. From your experience, are there any issues we should expect when our firmware takes up most of the allocated flash space?

  2. We have also added one more newly created frozen library (PAJ7620). Would it be OK if we include this library in the CircuitPython community bundle? ...

manic glacierBOT
manic glacierBOT
manic glacierBOT
orchid basinBOT
#

Greetings :)

We are preparing for an upcoming release of a new Pico 2 W development board; EDU PICO 2

For now, we use 3D generated images for the board images. These will be updated later with final photos. The product link is also not available yet and will be enabled upon release.

This is prepared early to allow internal testing and to ensure a smooth launch.

Please let us know if any changes are needed. Thanks!

orchid basinBOT
manic glacierBOT
manic glacierBOT
#

Here's a demonstration using the following code: https://soundcloud.com/re-li-c/11025-khz-bit-test

import audiobusio
import audiocore
import audiomixer
import board
import digitalio
import pwmio
import time

import adafruit_tlv320

rst = digitalio.DigitalInOut(board.PERIPH_RESET)
rst.direction = digitalio.Direction.OUTPUT
rst.value = False
time.sleep(0.1)
rst.value = True
time.sleep(0.05)

i2c = board.I2C()
dac = adafruit_tlv320.TLV320DAC3100(i2c)
mclk_out = pwmio.PWMOut(board.I2S...
manic glacierBOT
tulip sleet
manic glacierBOT
#

I made my own test8.wav (8-bit unsigned 8kHz) and test16.wav (16-bit signed 8kHz) and tried your code. Got similar results with the 8-bit one sounding severely distorted and the 16-bit one sounding reasonably good. Also, it looks like your volume settings are hot enough that a sine wave normalized to -1 dB clips (caused by dac.dac_volume=0).

Unmodified Example Code (clipping)

This is what my loudest 8-bit wave looked like:

<img width="1071" height="658" alt="Image" src="https://github.c...

#

For the 8-bit stuff, the broadband noise with hamonic spikes extending well past the Nyquist frequency looks very similar to what I was seeing when the PLL settings were wrong (clock frequency mismatch between what was being sent by the RP2350 and what was coming out of the TLV320's internal PLL).

If the problem was strictly a math thing with the 8-bit conversion, I would expect the noise to be limited to below 4 kHz. Since the noise goes clear up to 12+ kHz, it looks a lot like a clock jitt...

manic glacierBOT
#

Now that I've actually figured out the order the samples play in, what I'm hearing for the 8-bit mclk=True sample sounds really good with very little distortion (considering). Note that I did leave the dac_volume set to -20 dB rather than turning it up to 0 (so there's no clipping).

8-bit mclk=False (broadband clock jitter noise and harmonics)

<img width="1043" height="612" alt="Image" src="https://github.com/user-attachments/assets/44318801-4f29-4fac-a91e-13253f89bc12" />

8-bit mcl...

manic glacierBOT
#

For my particular setup, I was using line-level output into an audio interface, which is why I had it fairly hot. I did this to reduce the amount of ground-level noise I was getting. You're welcome to adjust those settings.

As for the test audio, I was using StreetChicken.wav (you can find that here) converted using the ffmpeg scripts listed in the original post.

Here's a modified version...

lone axle
#
Gumroad

Brand-new Armv8-A AArch64 Assembly Cheatsheet! Resolution for 2880 x 1800 screens (MacBook) at 150 PPI (6000 x 3750).Free download (you can set price to $0, then download) since it's the first version and I'll probably be tuning it a little more, fix any missed errors, and send it to print before releasing a print version.Enjoy <3

#

Most people don't know how to use AI the right way.

Here's how you can use AI the right way:

ChatGPT Best Practices: 
✅ Use the GRWC prompting framework 
✅ Use Custom instructions about how you want your outputs

GPTs: 
✅ VideoGPT by Veed: Helps you create AI videos 
✅ Consensus: AI-powered research assistance

Prompting framew...

slender iron
#

I think it is python + C for crypto

#

with claude help

wraith crow
#

The original cardputer board definition didn't support the keyboard in the core either, it was added later

#

Thanks everyone, happy holidays!!!!

lone axle
#

Thanks for hosting Dan. Havea great week and happy holidays / new year everyone!

tulip sleet
#

meeting video posting may be delayed for an hour or two

#

I'd like to take a walk before it gets dark

thorny jay
slender iron
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; Adafruit Feather ESP32-S3 TFT with ESP32S3
Board ID:adafruit_feather_esp32s3_tft

Code/REPL

print("Hello World!")

Behavior

  1. Set up web workflow in settings.toml
  2. Connect to board in the browser and enter the File Editor
  3. Click edit next to code.py
  4. Click save
  5. Loading Status is 500 (Internal Server Error)

Description

This should return a status of 200

...

nimble sparrow
tulip sleet
#

Here is the notes document for the next CircuitPython Weekly Meeting, on Monday, January 5, 2026. We're skipping a week due to the holidays. It is at the normal time of 11am Pacific / 2pm US Eastern here on Discord. Add your hug reports and status updates to the document before the meeting. If you are unable to attend but would still like to contribute, feel free to add your notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868>
https://docs.google.com/document/d/1XDA3jYN0RWPMOXHo9Wtmsd1KYxSTTbVQ3n7NBdcDr60/edit?usp=sharing

turbid radish
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Yes! we are ready to proceed with merge

Before we do, I just wanted to follow up briefly on one earlier question to make sure we’re aligned:

We’ve added one newly created frozen library (PAJ7620). Would it be OK to include this library in the CircuitPython community bundle? I ask because there is already an existing library for this sensor, but due to some disagreements with the maintainer, we decided to develop and maintain our own version.

thanks!

#

It is fine to add

We’ve added one newly created frozen library (PAJ7620). Would it be OK to include this library in the CircuitPython community bundle? I ask because there is already an existing library for this sensor, but due to some disagreements with the maintainer, we decided to develop and maintain our own version.

This is ok, but I looked at https://github.com/deshipu/circuitpython-paj7620/pull/1, and I think you could still work with the library author. His requests are minor,...

manic glacierBOT
uncut nexus
#

@slender iron Hi Scott! I've built the Zephyr CP for a FRDM-MCXN947 board. I did not find any instructions on how to flash it, so I used the NXP linkserver binary on Windows. It worked; but is there a better way (esp. for use on Linux)?

lone axle
slender iron
#

which for that will use linkserver by default. The per-board zephyr instructions are pretty good

manic glacierBOT
slender iron
#

@potent hound why are you interested in switching?

potent hound
slender iron
#

I'd definitely want to get the circuitpy drive working well with it

potent hound
#

And you have a Jumperless now so I can ask you how I should structure things in a non-stupid way.

slender iron
#

but I'm not sure how much I'd actually script my board

#

the probe is what sold me

potent hound
slender iron
#

we don't have any examples of CP coexisting with a bunch of other code

#

we assume that it's usually CP VM driven

#

though we do have a "background task" system to interleave stuff with VM execution

potent hound
#

Does CP have something like pyexec_event_repl_process_char( c );? I just have a service running in my scheduler that dumps chars from the repl endpoint into that.

slender iron
#

We may inherit it from MP but I don't know of any uses

potent hound
#

I think it can be made to work just fine, a lot of it is just my naming conventions for jumperless-specific calls are dumb because I was just trying to get it to work at all and also barely know how to write python

slender iron
#

much of the pwm ish stuff I'd just want to use our standard APIs

#

I don't know how the other jumperless stuff is structured

potent hound
slender iron
#

nice!

#

pico-sdk would make it pretty easy to have things shared

manic glacierBOT
#

add support for virtual USB-Network interface

  • RNDIS
  • Ethernet Control Model (ECM)
  • Network Control Model (NCM)
    sometimes also called USB CDC NCM

usage

  • the CP device shows as Network card to a host (computer / phone / tablet)
  • CP device has build in DHCP server - so host-device gets ip address

now we could experiment with network-based things, without the need of a real LAN or Wifi network...

link collection

potent hound
#

btw if anyone wants to take a look at the code we're talking about
https://github.com/Architeuthis-Flux/JumperlOS
relevant files are MpRemoteService.cpp (the more recent one where I'm actually using MP's built-in raw repl), Python_Proper.cpp (kind of an abomination where I wrote the repl with syntax highlighting and history myself), and then lib/micropython/ for the port stuff and modules/modjumperless.c

GitHub

The new Jumperless V5 firmware / operating system. Contribute to Architeuthis-Flux/JumperlOS development by creating an account on GitHub.

slender iron
potent hound
slender iron
#

right. that's common with micropython. thonny does it that way too

#

CP is a bit different because we'll auto-reload code when written over the usb mass storage connection

#

(have you tried CP on a board?)

potent hound
slender iron
#

make sure you know what you are getting into

#

🙂

#

it might make more sense to make a library to control jumperless remotely

#

then you could do it over ble or web workflows too

manic glacierBOT
#

i would like to experiment with this thing..
but have the feeling that for my available spare time it is to difficult to get all the different needed things together for me..
currently i have no idea of how i could at least start to include / experiment with this in the circuitpython code-tree...

@tannewt pointed at some possible directions in the forum topic:

slender iron
#

and if that works really well, then integrate it into all in one

wraith crow
# turbid radish Anyone want to help with pacman on the Adafruit Fruit Jam? I have a port from th...

I'm playing with the controller objects (and adding a keyboard option) and will take a look at refactoring the audio to use the fruitjam library. I've submitted a PR to adafruit_circuitpython_usb_host_descriptors which will allow that library to support gamepads and joysticks. I don't have any usb gamepads to test with and my only Joystick is an old Microsoft force feedback but I'll submit a PR with the updates I come up with and you can have a look 😁

manic glacierBOT
#

Have you evaluated whether a Raspberry Pi Zero or a Beagle Board with Blinka might be a better fit your USB to DMX bridge idea? IIRC, the PocketBeagle 2 in particular is designed to work well in USB gadget mode, but I think the Pi Zero can do it too. I don't know if Blinka works on the PocketBeagle.

My impression of what you're describing for adding USB virtual network interface support to CircuitPython is that, while it would be really cool, it would probably be a fairly heavy lift. With a ...

lone sandalBOT
fleet hollow
fleet hollow
turbid radish
#

Thanks @fleet hollow @wraith crow for taking a look - I think it'd be great to have PacMan on Fruit Jam too

fleet hollow
turbid radish
#

It can be called something else. I don't think it uses any code from the original

wraith crow
fleet hollow
wraith crow
#

I'm not real familiar with your library so I don't know exactly what you need. I also don't know a lot about the Microsoft joystick I'm using. It was getting a 13 byte buffer back from the usb reads and I fed a bunch of them into an AI and it told me how to code up a get_direction method that was compatible with the one Anne had in place for the SNES controller class. I also pulled the first three button states off of the 9th byte. The joystick has a directional hat, throttle and z-axis as well as at least 5 other buttons that I ignored and would probably have to be researched if you really wanted to support it.

manic glacierBOT
manic glacierBOT
#

Clarify the return value of the monotonic function to specify it returns fractional seconds.

looking at cpython's time.monotonic() documentation, one sees in the first line "Return the value (in fractional seconds) of a monotonic clock" -

I would have expected a similar introduction when reading that for circuitpython at https://docs.circuitpython.org/en/latest/shared-bindings/time/

I see there is a fall back that says "For more information, refer to the original CPython documentati...

fleet hollow
# wraith crow I'm not real familiar with your library so I don't know exactly what you need. I...

Could you share the model of the controller, the output of the USB descriptor test on it (from the library example), and your example code if possible. You can add it as an issue here (https://github.com/relic-se/CircuitPython_USB_Host_Gamepad/issues). I'll do the rest of the work of integrating it. I'd love for that library to support as many devices as possible, but I only have so many at my disposal and many of them operate just slightly differently. Thank you!!

manic glacierBOT
#

okay as a follow up i have tested now with a different board Waveshare RP2040-Zero and a usb a breakout
I get more successful results

using the code from
https://learn.adafruit.com/adafruit-feather-rp2040-with-usb-type-a-host/usb-host-read-data

with

import board
import usb_host
usb_host.Port(board.GP2, board.GP1)

added

i get this in repl with controller [xinput]

pid 0x2009
vid 0x57e
man Nintendo Co., Ltd.
product Pro Controller
serial E417D8019DF8
config[0]:
 value ...
manic glacierBOT
#

Update: Resolved with additional fixes required ✅

Short version: It's true I got the HiLetgo SD card working with the level shifter using capacitors and 5V external power, but then encountered additional timing and caching issues that required further fixes.

NOTE: I am not an sdcard expert by any stretch. I leaned on claude.ai here. That said it appears to have identified and corrected the problem I had. No claims are made past that :)

The Full Story

  1. **Initial problem (this...
manic glacierBOT
#

That particular USB device (I have one) can cycle through a few USB descriptors, depending on how you talk to it. It seems to be designed with heuristic detection for which host OS USB stack it's connected to and tries to adapt to that. It can act like different devices are being unplugged and plugged in (Switch Pro, XInput, etc) over the course of several seconds.

I've had good results by using a retry loop where I just sleep for maybe 300 ms or whatever after a USBError exception then call...

manic glacierBOT
#

that is a good point!
it is really less work to do! (just use ola as basis..)
would be a good fit for this particular project idea.

my first main idea was to use CP as i like it a lot and it is easier to stay at on framework..
(i try to do all hobby project ideas in CP these days ;-) )
and i thought - there is already all this network things in there - could be a very easy thing to add...

main difference of uC and soc boards fo...

manic glacierBOT
manic glacierBOT
#

I have a script that turns a Pi-0 into gadget mode and creates a network card: https://github.com/bablokb/raspi2go/raw/refs/heads/master/files/usr/local/sbin/raspi2go.sh. This is an old script and things tend to change within the kernel, so I am not sure it still works. The repo also has an install script that creates a suitable systemd-service to run the gadget-mode script at boot.

Regarding cold boot: you can bring down boot-times considerably with only a few tweaks. You can give this a re...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Issue

I’m using CircuitPython on nRF52840 with RFM9x (LoRa) and an SD card sharing the same SPI bus.

My device behaves like a Class C gateway:

  • LoRa is in continuous receive mode (receive(timeout=0.1))
  • Incoming sensor data is queued and logged to an SD card

SD writes frequently fail with:
OSError: [Errno 5] Input/output error

This happens even when:

  • Logs are queued in RAM
  • SD writes are retried later
  • spi.try_lock() / spi.unlock() are used

It appears that ...

manic glacierBOT
#

Here's a better view - I think - of the issue regarding mounting the HiLetgo sd reader after soft reboot:

  • First Run after Hard Reset/Reboot - All Good
>> import test_sd_debug

--- SD Config: Detected adafruit_feather_huzzah32 ---
==================================================
SD Card Cache Bug Test (with safety)
==================================================

Board: adafruit_feather_huzzah32
Config loaded from sd_config.py

[STEP 1] Mounting SD card...
  ✓ SPI initialized
  ✓ ...
manic glacierBOT
#

Issue

I’m using CircuitPython on nRF52840 with RFM9x (LoRa) and an SD card sharing the same SPI bus, stacked all boards one another.

My device behaves like a Class C gateway:

  • LoRa is in continuous receive mode (receive(timeout=0.1))
  • Incoming sensor data is queued and logged to an SD card
  • I tried to use separate SPI buses, but it gives the error "SPI in USE."

SD writes frequently fail with:
OSError: [Errno 5] Input/output error

This happens even when:

  • Logs ar...
manic glacierBOT
#

In short there is a TCA8418 (python) library for CP: https://docs.circuitpython.org/projects/tca8418/en/latest/

So if you free the pins (with current firmware they blocked by the keyboard scanning code for the v1 cardputer) to reuse them for I2C... then it should be possible to communicate with the TCA8418 and use it in keyboard scanning mode (see this learn guide for an Adafruit product based on TCA8418: https://learn.adafruit.com/adafruit-tca8418-keypad-matrix-and-gpio-expander-breakout).
...

manic glacierBOT
#

Not a CircuitPython issue, but a new macOS (Tahoe 26) release is showing compatibility problems with FAT12 that will effect CircuitPython users.

GUI behavior appears regressed: Finder and Disk Utility show zero-byte capacity, incorrect free space, or fail during copy operations on very small FAT volumes.

Pattern matches FAT12 edge cases: Issues disproportionately affect small volumes (often a few MB) typical of CircuitPython and Audio FX boards.

Works on other OSes: The same devices/filesy...

manic glacierBOT
#

It appears that the LoRa radio accesses SPI so frequently that the SD card never gets a clean window.

This is a wrong assumption. The LoRa radio does not access the SPI-bus. It is the MCU (or to be more specific: your program running on the MCU) that is in charge of the SPI-bus. The program pulls the CS-line of the respective device low when it wants to talk to that device. So while you are busy with the SD-card, the LoRa radio is not into play.

One thing you should know when sharing SPI:...

manic glacierBOT
#

@bablokb I tried your suggestion for setting CS with pullups, but it still fails. It enters the loop and opens the file, but on "f.write ()", it throws the error.

    with open("/sd/waste_controller_logs.csv", "a") as f:
        while log_queue:
            f.write(log_queue.pop() + "\n")

Error;

 [SD ERROR] [Errno 5] Input/output error

I have attached the LoRa RX side of my setup for your review. TX is only nrf42840 with RFM9x, which is working fine. The RX setup is work...

manic glacierBOT
manic glacierBOT
#

True, and a second device on the bus adds capacitance and the signals might deteriorate.

@muhammadawais92 : you could try to lower the bus-speed as well. Ruling out bus-issues by using a second bus is a good first approach.

BTW: I am using the Adafruit LoRa-RFM95x-Bonnet (which also has an OLED-display) together with a Pico-2W and a SD-card socket. The SD-card and the LoRa are on the same bus. So the setup is very similar, even the software boils down to basically the same logic. One differ...

manic glacierBOT
manic glacierBOT
#

I did not see this problem in early beta releases of macOS 26, and am sorry to hear it is occuring. #8449 and #8918 documented other FAT filesystem issues in previous versions of macOS.

If people see this, please document it well and submit to the macOS Feedback Assistant. If you do so, publish the Feedback number here so other people can refer to that in their own reports.

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

The regulator of that NRF should be ok, it provides 600mA peak and you are far below. But load transients could still be a problem.

You will have to experiment a bit and try to change various things. Please replace adafruit_sdcard with sdcardio. Try to get the second spi-bus working. Change the bus-speed. Maybe change the stacking. Put the radio into sleep-mode before flushing data to the sd-card (not a good idea for productive use, but for testing).

manic glacierBOT
manic glacierBOT
#

I have gotten it to work! After hours of debugging.

here is the code

import time
import board
import busio
import digitalio
import microcontroller
import displayio
import terminalio
from adafruit_display_text import label

# --- 1. DISPLAY SETUP ---
displayio.release_displays()

# Force Backlight On
try:
    bl = digitalio.DigitalInOut(microcontroller.pin.GPIO38)
    bl.direction = digitalio.Direction.OUTPUT
    bl.value = True
except: pass

# SPI Init
spi = busio.SPI(clock=micro...
manic glacierBOT
manic glacierBOT
tulip sleet
#

<@&356864093652516868> reminder that there is NO meeting today. Meetings will resume next Monday.

manic glacierBOT
manic glacierBOT
#
[adafruit/samd-peripherals] New branch created: remove-assert
manic glacierBOT
manic glacierBOT
#

Just a heads up:

  • All of my devices are 'hanging' on mounting the Samsung 64 GB EVO card and reporting it as 32 GB. Odd.
    (Maybe is got worse and the device can't handle...)

  • But I am now completely past the soft reboot issue with the Huzzah.
    Added some warmup time to the mounting procedure and them seemed to help. Frankly not sure if it was that or just the samsung. I remember a few of them using the Samsung ok, but don't recall which... I really did not think I'd be going down...

hearty lichen
#

Looking for some CP debugging feedback.
I have mostly esp32s2/3 chips, JLINK looks like a good choice, but I doesn't seem to support these chips - this article seems to indicate that it does - https://learn.adafruit.com/adafruit-metro-esp32-s2/debugging-with-openocd .
Was looking at the ESP-Prog-2 ($15) from Espressif - any feedback about this choice would be welcome.
Thanks crew.

manic glacierBOT
lone sandalBOT
manic glacierBOT
#

@anibarro I'd be curious if the sd cards that did not work for, would work using some steps from my issue:

#10741

Hi, thanks for the link! I'll try when I'm back from holidays.
The SD that didn't give the error, was failing when reading an BMP file and reducing the frequency didn't help, so maybe it needs some time to finish the mounting tasks as you mentioned... Let's see!

manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.1 on 2025-10-09; Adafruit Feather nRF52840 Express with nRF52840

Code/REPL

def eval_test(foo):
    global loops
    bar=1
    eval("print('Hello')")
    eval('print(f"loops is {loops}")')

    # passing a dict for the locals parameter works:
    eval('print(f"foo is {foo} bar is {bar}")', 
         {}, {"foo":foo, "bar": bar}) 

    # Fails with: NameError: name 'bar' isn't defined
    #eval('p...
manic glacierBOT
#

I believe this is a micropython limitation rather than specifically a CircuitPython issue.

% micropython
MicroPython v1.26.1 on 2025-09-11; darwin [Clang 17.0.0] version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> 
paste mode; Ctrl-C to cancel, Ctrl-D to finish
=== def eval_test(foo):
===     global loops
===     bar=1
===     print("foo",foo)
===     eval('print(f"loops is {loops}")')
===     eval('print(f"foo is {foo}")') 
=== 
=== loops=1
=== eval_test(9)
=== 
foo 9
loops is 1
Trace...
manic glacierBOT
#

To Follow up here....I continued to pursue the original line of trouble shooting. I got the original ESP32-S2-DevKitC working as well as the S3.

Update: Unable to Reproduce Original Issue

After extensive recent testing, I can no longer reproduce the timeout/disappearing files issue originally reported.
The TL;DR is I can use the ESP32-S3-DevKitC as we all as the original ESP32-S2-DevKitC now with this Hiletgo reader and Circuit python. I don't believe it was the 64 gb card the whole...

manic glacierBOT
manic glacierBOT
#
manic glacierBOT
manic glacierBOT
#

Regarding the RP2350-USB-A specifically, my understanding is that the USB-A port is not properly pulled-down to act as a host.

Various people reported weird issues with only some devices being detected, and hot-plugging just not working. I found the cause last month. Maybe desoldering R13, like I describe in the article, will help @i-am-me0-0.

However, D+ and D- are not pulled-down anyway, which causes other...

manic glacierBOT
manic glacierBOT
#

i see i forgot to mention this, but i had found your guide @qsantos and have removed R13 already which did help partly.
however i have ONLY somewhat gotten keyboards working in https://github.com/i-am-me0-0/RP2350-USB-to-USB-converter

but when i tried anything with controllers (i tried more than one) i kept getting errors (mostly usb.core.usberror) and crashes which led to me creating this github issue

@samblenny the code u recommended does not run since it imports feather specific pins, i...

manic glacierBOT
#

the code u recommended does not run since it imports feather specific pins...

A bunch of those pins are for the Fruit Jam's HSTX DVI display. For example, in the older fruit-jam-gamepad-tester one, look where it does fb = Framebuffer(320, 240, clk_dp=CKP, clk_dn=CKN,.... If you want to use a different board, you can remove the fb = ... stuff along with all the pins it imports from board. It would probably be easiest to just rely on print() to keep track of gamepad status changes an...

manic glacierBOT
manic glacierBOT
#

Upgraded my Macbook Air M2 to Tahoe 26.2 this afternoon. I had been on Sequoia until today.

I tried four different boards. All of which I could upload boot loader, install CircuitPython and modify code on them.

The BOOT drives report weird values relative to the actual flash. The CIRCUITPY values look within reasonable range.

Board Boot Drive Size CircuitPython Size
Matrix Portal M4 8124 KB ...
orchid basinBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Same problem here !
I do this:

advertise()

while True:
    # Wait for an iOS connection
    while not ble.connected:
        print("not connected")
        time.sleep(1)

    # There can be more than one connection; for a keyboard you usually want one.
    for connection in ble.connections:
        if connection.connected:
            print("Connected. paired =", connection.paired, connection)

            # Force iOS to actually pair/bond
            if not connection.paired:
          ...
manic glacierBOT
manic glacierBOT
slender iron
manic glacierBOT
slender iron
tulip sleet
#

@slender iron still working? have time for a discussion about AirLift heap storage outside VM?

lone sandalBOT
manic glacierBOT
manic glacierBOT
#

is there any place where we can see what status the port has?

There are several places to follow progress at different levels of detail:

  • GitHub: You can follow this repository to get notifications for issues and PRs for everything, including Zephyr work. You can also navigate to the issues page and use its search feature to search for "zephyr". From issues, you can also click on the milestones button (next to New Issue) to see what work is planned for which release. You can also check re...
lone sandalBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2026-01-05; ESP32S3-TOUCH-LCD-2

Code/REPL

cam = espcamera.Camera(
    data_pins=[board.CAM_D0, board.CAM_D1, board.CAM_D2, board.CAM_D3,
               board.CAM_D4, board.CAM_D5, board.CAM_D6, board.CAM_D7],
    external_clock_pin=board.CAM_XCLK,
    pixel_clock_pin=board.CAM_PCLK,
    vsync_pin=board.CAM_VSYNC,
    href_pin=board.CAM_HREF,
    pixel_format=espcamera.PixelFormat.RGB565,
 ...
manic glacierBOT
#

CircuitPython version and board name

Adafruit CircuitPython 10.0.3 on 2025-10-17; FeatherS3 with ESP32S3

Code/REPL

import rtc
import time
from adafruit_featherwing import tft_featherwing_35


r = rtc.RTC()
r.datetime = time.struct_time((2019, 5, 29, 15, 14, 15, 0, -1, -1))
print("set RTC")

print("pre-init")
fw = tft_featherwing_35.TFTFeatherWing35V2()
print("post-init")

Behavior

Auto-reload is off.
Running in safe mode! Not running saved code....
manic glacierBOT
manic glacierBOT
manic glacierBOT
lone sandalBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Just FYI, we are not ignoring this. To summarize, you see the slowdown if the SD card is mounted in code.py and it appears on the host computer as a drive. Is that right?

Yes. But as noted above, 20-30% slowdown is still visible even without a host computer.

Is the host computer Linux? Have you tried Windows? I'm trying to figure out if it's something about the low-level USB polling that the host does for the second drive.

I only have Linux. The system log claims that it stops polling...

manic glacierBOT
#

@bablokb I tried the different solutions. Even putting the radio to sleep did not solve the issue. As long as I remove the RFM9x and use adalogger with nrf52840 (just check everything is working fine), the read/write to sd card works normally. Tried sdcardio, changed the bus speed, but nothing worked.

SD write failed, will retry: [Errno 5] Input/output error: /waste_controller_logs.csv
tulip sleet
#

@slender iron I was wrong about necessity of heap usage when talking to NINA-FW. It's possible to do partial SPI reads and writes and build and parse the messages without doing dynamic allocation. I am reworking the code to do that. So there are no VM vs no-VM heap considerations.

slender iron
#

<@&356864093652516868> The first community meeting of the year is in just under 20. Here is the notes doc: https://docs.google.com/document/d/1XDA3jYN0RWPMOXHo9Wtmsd1KYxSTTbVQ3n7NBdcDr60/edit?tab=t.0

turbid radish
#

4☺️

tidal kiln
#

3.8

turbid radish
#

Just finished posting the links to that in socialz

#

The next newsletter will be in inboxes on January 12th

tidal kiln
#

^^ they've been on show and tell a lot too. the class looks fun. i'd like to take it 🙂

wraith crow
#

The problem is that at various times an app can't necessarily update all locations so they may have to be out of sync

turbid radish
#

Happy New Year everyone

tidal kiln
#

👋

lone axle
#

Thanks for hosting Scott. Happy new year everyone blinka

slender iron
#

Here is the notes document for next Monday’s CircuitPython Weekly Meeting. It is at the normal time of 11am Pacific / 2pm US Eastern here on Discord. Add your hug reports and status updates to the document before the meeting. If you are unable to attend but would still like to contribute, feel free to add your notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/1Kc6iC6-aOjE3SaAg9BfiK8xVNjm9YW0BBSvjk1jHqU8/edit?usp=sharing

manic glacierBOT
#

is there any place where we can see what status the port has?

There isn't a great single spot. You can check: https://github.com/adafruit/circuitpython/issues?q=is%3Aissue state%3Aopen label%3Azephyr like Sam says. (Though I'm not great at always adding an issue. My branches are here too: https://github.com/tannewt/circuitpython/branches

or are there any easy tasks to support the porting?

I'd love for folks to try it and let me know what they are missing.

and as i found somewher...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

@muhammadawais92: thinking about possible issues after your extended tests, I would rule out SPI as the source of the problem. Radio interference seems unlikely, since LoRa is at 433MHz and the SPI bus speed is far below of that. Capacitance is also unlikely since you have a short bus due to stacking and as you said you already tried to change the SPI-speed.

So I still recommend that you swap the SD-card. The fact it works fine in one configuration does not imply it will work in a different ...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

This PR was tested

  1. Download the build artifact
  2. Flashed to my LILYGO T-Dongle S3
  3. Verified the status lights per https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting
  4. Ran the following program to verify board.STEMMA_I2C() now functions
import time

import adafruit_vl6180x
import board
import busio

# print(dir(board))

# T-Dongle display
display = board.DISPLAY
# disables the repl on the display for our own use
# display.root_group = N...
manic glacierBOT
#

@muhammadawais92 Could you try CircuitPython 9.2.9 and see if it makes any difference? The libraries for 9.x and 10.x are currently identical, so you don't need to reinstall the libraries from the 9.x bundle.

My current setup that is working uses 9.2.9. I will switch to 10.0.3 and test if this makes a difference. I will post results on Wednesday.

Thank you so much. I will wait for that, and meanwhile, will try out your suggestions.

supple plank
#

Hi, I have some issues building CircuitPython from source. Is this the right place for that?

stuck elbow
#

yes

supple plank
#

I followed the manual on https://learn.adafruit.com/building-circuitpython/build-circuitpython
Which more or less boils down to the following steps:
git clone https://github.com/adafruit/circuitpython.git
cd circuitpython/
make fetch-all-submodules
make -C mpy-cross
cd ports/raspberrypi/
make BOARD=raspberry_pi_pico

But then I get a lot of errors like this one:
In file included from ../../py/mpconfig.h:103,
from <stdin>:29:
./mpconfigport.h:9:10: fatal error: hardware/platform_defs.h: No such file or directory
9 | #include "hardware/platform_defs.h"

And indeed, in ports/raspberrypi/mpconfigport.h is #include "hardware/platform_defs.h"
And in the entire CircuitPython tree is no file by that name.

What am I doing wrong? Did I forget to include something?

stuck elbow
#

did make fetch-all-submodules finish without errors?

#

you can try running it again

#

or you can do make fetch-port-submodules in the port's directory

supple plank
#

I had already done this, but I've ran both again, and both finish without errors. Is the problem with a submodule?

stuck elbow
#

usually when there are files missing, it's because some submodule failed to be cloned

#

are you doing this with the main branch?

#

you could try if you get the same error on a stable branch

supple plank
#

I've had a few of those, but I could fix them by removing the git repo and the lib directory, and re-running fetch-all-submodules.

#

I will try again with the latest release version.

stuck elbow
#

the main branch sometimes gets the exact versions mixed up when there is fresh development with them

supple plank
#

I've removed the entire circuitpython tree and started fresh again. And this time it build without errors.
Thanks for your help!

#

Oh, I had to manually install huffman in order to compile mpy_cross. It was not included in the requirements-dev.txt.

slender iron
#

@supple plank what os are you using?

supple plank
#

Debian Linux.

serene token
#

Anyone know exactly where the CircuitPython code is for HSTX/DVI?

tiny peak
#

for a starting point, look for stuff called picodvi. There's more to it than that, but picodvi will give you some threads to pull on.

#

if you're using linux and have installed ripgrep (sudo apt install ripgrep), and if you've got an active circuitpython repo with the submodules already fetched, you can do:

$ rg picodvi

from a bash prompt and it will give you tons of stuff about what's spread around where in different files.

#

some of those locations include:

  • shared-module/displayio/__init__.h
  • ports/raspberrypi/common-hal/picodvi/Framebuffer_RP2350.h
  • ports/raspberrypi/common-hal/picodvi/Framebuffer_RP2350.c
  • ports/raspberrypi/bindings/picodvi/Framebuffer.c
  • ports/raspberrypi/boards/adafruit_fruit_jam/board.c
#

You can also use ripgrep so search the circuitpython repo for "hstx":

$ rg hstx
ports/raspberrypi/common-hal/picodvi/Framebuffer_RP2350.c
36:// This is from: https://github.com/raspberrypi/pico-examples-rp2350/blob/a1/hstx/dvi_out_hstx_encoder/dvi_out_hstx_encoder.c
40:#include "hardware/structs/hstx_ctrl.h"
41:#include "hardware/structs/hstx_fifo.h"
369:    uint32_t dma_write_addr = (uint32_t)&hstx_fifo_hw->fifo;
432:        hstx_ctrl_hw->expand_tmds =
441:        hstx_ctrl_hw->expand_tmds =
450:        hstx_ctrl_hw->expand_tmds =
459:        hstx_ctrl_hw->expand_tmds =
469:        hstx_ctrl_hw->expand_tmds =
493:    hstx_ctrl_hw->expand_shift =
501:    hstx_ctrl_hw->csr = 0;
502:    hstx_ctrl_hw->csr =
532:        hstx_ctrl_hw->bit[pins[i]] = lane_data_sel_bits | invert;
serene token
#

@tiny peak Thanks. That should help. Unfortunately I'm currently working in Windows, and I won't have a good Linux system for another couple months, but I'm using MSYS2 and maybe it has ripgrep in its repos. If it doesn't, I'm pretty good with standard grep, and it does have that.

I've seen the HSTX stuff in pico-examples, but it's some form of 8-bit, 640x480 RGB. I've been having a hard time finding HSTX-DVI code for 16-bit 320x240, but I know that's what FruitJamOS is using, so the code for that has to be in there somewhere.

Anyhow, this should help.

tiny peak
#

many IDEs have some kind of multi-file project search feature. Dunno what MSYS2 is, but I think VS Code has something very much like ripgrep built in, maybe?

manic glacierBOT
serene token
# tiny peak many IDEs have some kind of multi-file project search feature. Dunno what MSYS2 ...

MSYS2 is essentially a Linux-like environment for Windows. It has a bash shell, common Linux build tools, GCC and so on. It makes coding in Windows bearable. My typical "IDE" is Vim with a Make based build setup, combined with common Linux command line tools like grep and such. So when Linux isn't an option, I use MSYS2 to give me the programming environment I want to work in.

Anyhow, thanks for the additional references!

orchid basinBOT
manic glacierBOT
#

In order to support your Fire revisioneI I should create a new M5Stack Fire board in CircuitPython with 4MB of PSRAM. Looking at M5Stack all Fire boards after 04/2020 have 8MB, so your is 5+ years old.
Is not a big deal to create a new CircuitPython Fire board with only a different size of PSRAM but my question to @jepler is if it makes sense to create a new CircuitPython board definition for a board that is no longer in production.

manic glacierBOT
lone sandalBOT
manic glacierBOT
slender iron
runic loom
#

hi everyone, I have been playing with CircuitPython and TinyML for quite some time now. Today I managed to convert a tiny ML model (CNN) to plain C (onnx2c) code and incorporate it directly as a module in CircuitPython. It's not a generic approach, I mean a model will have to be compiled in with circuitpython source code. Will share my findings soon. Its a tiny CNN that takes 30x30x1 images and outputs 10 probabilities (basically handwritten digit recognition). Will post my code to github soon. I think it opens up a way for people to train their own models in pytorch and tensorflow and bring them to circuitpython

slender iron
lone sandalBOT
slender iron
#

@devout jolt @fleet hollow what should the minimum i2s output buffer time be? aka how big can it be before being unresponsive

#

(I'm working on zephyr i2s)

devout jolt
slender iron
#

is that stereo 16bit?

devout jolt
#

yes

slender iron
#

so 1024 samples

#

which is 1/20th of a second or so

#

or 5ms

devout jolt
#

50 msec I think

#

(at least it feels like ~50 msec, which is actually too big of a lag for most music gear, but I grade on a curve for CirPy 🙂

slender iron
#

kk, I should be able to do better than that

#

what are the reasons for that buffer? usb writes?

#

I am using a zephyr thread to fill the buffer 🙂

#

should probably add a lock

devout jolt
# slender iron I am using a zephyr thread to fill the buffer 🙂

Yep, originally because we noticed any USB activity was causing horrendous audio glitches. (the default buffer is very small, like 256 or something). We also found that other supervisor-pausing tasks like display updates could glitch the audio too. So a 2kb to 4kb buffer became pretty standard. Still didn't help with full-screen redraws of big screen or a blocking network read but it helped

slender iron
#

I'd be curious how the zephyr port fairs. USB and network will be separate threads

#

screen redraws will be in the CP thread which is different from the audio buffer filling

fleet hollow
fleet hollow
# devout jolt 50 msec I think

I'm calculating ~10ms. Here's my math, but my understanding of the way things are divvied up might be off:

1024 bytes / 2 bytes per sample (16-bit) = 512 samples
512 samples / 2 channels = 256 samples per channel
256 samples per channel / 22050 samples per second per channel = 0.0116 seconds = 11.6ms

I'd have to double check, but I think the buffer is split between the channels. Would be interesting to do a latency test with a GPIO pin and probe.

slender iron
#

the mixer buffer? probably

#

I can't use the buffer from the audiosample directly in zephyr anyway

blissful pollen
#

The mixer buffer is used for both channels if i recall correctly.

#

If display and USB have places the thread can sleep it should really help audio. In theory the audio could even have a "max samples until thread rests" setting to make sure it also isn't the bottleneck