#circuitpython-dev

1 messages · Page 13 of 1

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0-beta.1 on 2022-10-01; Raspberry Pi Pico W with rp2040

Code/REPL

# see https://github.com/bablokb/pico-sleepcurrent/
# directory cp-timer

Behavior

Compared to the Pico, the Pico-W has substantially higher current consumption. You can find some graphs here: https://github.com/bablokb/pico-sleepcurrent/.

  • light-sleep: about 21mA vs. 17mA
  • deep-sleep: about 17mA vs. 7mA

(both figures with T...

manic glacierBOT
#

This PR fixes #6988

Changes seems to have been made in ca9523b814b6467ddf7626fa9cfe24d3a60d6e37 to address this, but it is still wrong.

ret is defined as mp_uint_t and is therefore never less than zero, this uses the same solution as line 1060 in the same file.
Also the value in received is now a negative number, and must be converted to a positive number before being raised to match up with errno.ETIMEDOUT and errno.EAGAIN.

tulip sleet
#

@onyx hinge note just above

manic glacierBOT
onyx hinge
#

@tulip sleet do you have any idea about how to make GPIO23 have a known value (I'm still trying to figure out if high or low) during deep sleep on rp2040, without user code intervention? I am not familiar with that code.

tulip sleet
# onyx hinge <@329766224093249548> do you have any idea about how to make GPIO23 have a known...

before going into deep sleep, reset_pins() (?not sure of the name) is called, which eventually calls something port-specific. In Espressif there is a special-case routine espressif_board_reset_pin_number() which can be added to board.c which will do whatever special-case pin resetting you want to (a pin number is passed in and it returns true or false saying whether it handled it or not). The same mechanism could be added to raspberrypi

#

but I don't know if pin state is preserved in deep sleep on RP2040, have to look at the datasheet for that.

#

in Espressif, this is all quite complicated: there is a "hold pin state" mechanism for sleeping

#

I would think they would have handled this in the pico-sdk already for the pico w ??

onyx hinge
#

I think it must not be handled, otherwise it wouldn't use 10mA more

#

and yes I also don't know what rp2040 deep sleep can do, I should go browse a datasheet

tulip sleet
#

also in Espressif, some pins are pulled down on reset, and some are pulled up. There is not uniformity, so board designers have to be careful.

onyx hinge
#

gpio_put(WL_REG_ON, false); // off OK setting that GPIO false turns off the regulator

manic glacierBOT
onyx hinge
#

ugh I'm really not set up to test deep sleep

tulip sleet
onyx hinge
#

yes current testing in deep sleep specifically

#

but just having a convenient way to make the device not just enter fake deep sleep too

brazen hatch
#

wasn't there the need for tinyuf2 to be updated?

tulip sleet
#

if you have a reasonable ammeter you can just break the red wire in a USB cable and put it in series, and also cut the data lines so it doesn't do fake deep sleep

onyx hinge
#

and if we are only entering fake deep sleep then we'd need the wifi to not actually be reset ugh

tulip sleet
#

if you have a some kind of USB breakout that could help

onyx hinge
#

I have one, I just haven't learned to use it

tulip sleet
#

oh, then you are all set. download nrfconnect appimage. load the PPK2 app, set it to source mode, plug in usb to data/power jack plug in header, connect it to ground/+5 on the picow (be careful to disconnect picow USB), set it to 5v in the app with slider, move GUI switch underneath voltage slider to on, press start

#

I had trouble with version 3.12.0 of nrfconnect recently, try 3.11.1 first

onyx hinge
#

the VOUT and GND of the 4-pin header go to the pico?

tulip sleet
#

yes, can you power pico via some pads, or could you use a USB breakout that you can plug the A end of the cable into?

onyx hinge
tulip sleet
#

the PPK2 can act as a series ammeter with external power (e.g. a battery), or it can supply 1A or so itself (subject to current limitations of the USB port it is plugged into)

#

i labeled the wires on the 4-pin breakout on mine, since it's kind of confusing otherwise

crimson ferry
#

I had wondered in a prior issue / PR about whether we might want to expose Pico W GPIO23 / WL_ON to user code. User may want to turn wifi off but not be in a sleep mode, to run non-wifi code but still reduce power. This may not be feasible and mess something else up, but if it could work, it would be cool.

#

Similar thought about whether user code should (could?) be able to de-init wifi or similar on espressif (for power and / or getting back to a cleaner state).

manic glacierBOT
onyx hinge
#

I saw that

#

@crimson ferry yeah the user can't just power cycle the wifi module willy nilly

#

I mean, I could be wrong and you're welcome to prototype/try it but my gut feel is that it is not going to make anything better

jaunty juniper
# brazen hatch wasn't there the need for tinyuf2 to be updated?

but I think it's the edgest of cases: you must have used dualbank while the drive is not extended to switch the firmware to OTA1, and then reformatted in extended mode, which would then make the extended partition use OTA0, which would be overwritten by tinyuf2 sparky
it would be nice to have tinyuf2 updated before 8.0 goes stable nonetheless

onyx hinge
#

Left is the last 2 half-second LED blinks, then the mash at the right is deep sleep (no time alarm, no pin alarms)

#

@tulip sleet assuming this graph means anything it's still clearly visibly doing "something" during deep sleep, but what "it" is I can't tell you

#

last is zoomed way in on the sleep part of the trace

tulip sleet
#

if the cyw43 is not really sleeping maybe it is looping and sort of sleeping, and doing something periodically

#

like turning radio on and off?

onyx hinge
#

nothing is being done to put the cyw43 into any sleep mode at all

#

at least not outside the sdk, it's vaguely possible (but I don't think so) that the sdk could do something

jaunty juniper
#

@tulip sleet I'm not clear on what default we settled on for the OTA1/extended drive ? (new unformatted board)

tulip sleet
onyx hinge
brazen hatch
#

I will test rn if you guys want me to

onyx hinge
#

Just forcing WL_REG_ON to false makes a big difference

tulip sleet
brazen hatch
#

alright brb

tulip sleet
#

it hasn't built yet though

#

I can make a build for you quick

#

unless you are already going to do it

onyx hinge
#

@tulip sleet ```diff
diff --git a/ports/raspberrypi/common-hal/alarm/init.c b/ports/raspberrypi/common-hal/alarm/init.c
index 31fa58aab3..d94049dcd2 100644
--- a/ports/raspberrypi/common-hal/alarm/init.c
+++ b/ports/raspberrypi/common-hal/alarm/init.c
@@ -204,6 +204,11 @@ void common_hal_alarm_set_deep_sleep_alarms(size_t n_alarms, const mp_obj_t *ala
void NORETURN common_hal_alarm_enter_deep_sleep(void) {
bool timealarm_set = alarm_time_timealarm_is_set();

+#if CIRCUITPY_CYW43
+#define WL_REG_ON 23

  • gpio_set_dir(WL_REG_ON, GPIO_OUT);
  • gpio_put(WL_REG_ON, false);
    +#endif
    // If there's a timealarm, just enter a very deep light sleep
    if (timealarm_set) {
    // Prune the clock for sleep
manic glacierBOT
tulip sleet
brazen hatch
brazen hatch
tulip sleet
#

🙂 I guessed that's what you meant

brazen hatch
#

Just flashed it, kinda unfamiliar with the code, just running it adapting the ssid and passwd

#

Seems like I needed to load adafruit_minimqtt
did load from latest bundle
but got AttributeError: 'MQTT' object has no attribute 'check_msg'

#

seems like the script he gave us isn't the same as the one he ran?
or am I too sleepy?

#

Fresh from my toasty keyboard

#

I did swap it to _wait_for_msg and now it's on the while True

manic glacierBOT
brazen hatch
#

I am testing the first script of the issue? Right?

onyx hinge
# manic glacier

@tulip sleet we need to draw the line somewhere for the next beta but this is affecting liz and it'd be nice if it was fixed.

tulip sleet
#

Fine with me to include. If I release tomorrow vs tonight, not a big difference

jaunty juniper
#

ah, adding .env to my ESP32S3 Box on latest sent it into a boot loop, I'll look into it later and open an issue if it doesn't match another. It doesn't do it on a FeatherS3 (latest)

onyx hinge
#

@jaunty juniper ouch! that would be good to get to the root of, but if you had longer keys that could sure be related

#

otherwise let us know what you figure out about it. You can probably redact the file with any alphanumeric just changed to 'x' if it's sensitive.

brazen hatch
#

I am not quite sure how to raise that error, it's 1 am, my brain is shutting down, imma look at it tomorrow if you guys haven't done it already, sorry.

onyx hinge
#

of course @brazen hatch -- see you around

jaunty juniper
onyx hinge
#

OK, you can open an issue anytime

tulip sleet
#

@onyx hinge I will merge the errno one anyway

tulip sleet
#

@onyx hinge should I wait until morning for shakeouts? All the PR's so far have seemed good to go.

#

long dotenv is only one left

onyx hinge
#

@tulip sleet I am not likely to do any testing before morning

tulip sleet
#

I can test the .env easily

manic glacierBOT
onyx hinge
#

@tulip sleet I did toss it on my rp2040 for a quick test. ```>>> len(os.getenv('sz9'))
512

tulip sleet
#

maybe I will do a wifi smoke test on pico w before I do a release; if that's good, will release

onyx hinge
#

OK, I appreciate your diligence about releases as always!

#

👋 I'm headed out for now

tulip sleet
#

good night, thanks for all the fixes; the release notes are done except for the recent merges

manic glacierBOT
orchid basinBOT
manic glacierBOT
#

This reduces power consumption during true deep sleep.

In my measurements with ppk2 and a program that irrevocably entered deep sleep (no time alarm or pin alarm), power usage as measured on a ppk2 decreased from ~10mA to ~1mA.

Closes: #7047 (or at least improves on the status quo)

ppk graph, before (right hand side represents deep sleep):
image
zoomed in on the right:
![imag...

manic glacierBOT
tulip sleet
#

https://blog.adafruit.com/2022/10/13/circuitpython-8-0-0-beta-2-released/
NOTE that, on the Pi Pico W only, replacing versions earlier than beta.2 will erase and reformat CIRCUITPY, due to a change in the flash partition sizes. Save your work first!

Adafruit Industries - Makers, hackers, artists, designers and engineers!

From the GitHub release page: This is CircuitPython 8.0.0-beta.2, a beta release for 8.0.0. It is relatively stable, but there will be further additions and fixes before final release. Warning: The…

midnight ember
#

Adafruit Feather S2 & S3 WiFi is rock solid right now. Thank you for all the hard work getting that one hammered out.

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

For waveshare_esp32s2_pico

Building main results to:

1390736 bytes used,   51056 bytes free in flash firmware space out of 1441792 bytes (1408.0kB).
     92 bytes used,    8100 bytes free in 'RTC Fast Memory' out of 8192 bytes (8.0kB).
   4112 bytes used,    4080 bytes free in 'RTC Slow Memory' out of 8192 bytes (8.0kB).
      0 bytes used,   32768 bytes free in 'Internal SRAM 0' out of 32768 bytes (32.0kB).
 244743 bytes used,   50169 bytes free in 'Internal SRAM 1' out of 294...
manic glacierBOT
#

CircuitPython version

8.1 latest git on equivalent of Adafruit Huzzah ESP32, but really a lilygo/ttgo t-sim7000g.

I'm just trying this board out and have been seeing this issue regularly while pasting in things to the web Serial Terminal, doesn't matter if using mDNS or IP to access, but comes up with this console error and there is no way to re-enable the websocket. Refreshing once doesn't resolve, but after 3times works (maybe websockets on device are not being closed corr...
manic glacierBOT
tulip sleet
#

@onyx hinge I am looking at the "why did raspberrypi changes build espressif boards" issue, but are you already looking at that?

onyx hinge
#

@tulip sleet I think the short version is, the script is wrong. I was working on making the script more easily runnable locally, and faster by parallelizing the code to find build flags. I haven't started fixing any bugs

#

but I think the short version is, if it sees ports/PORT/common-hal/FOO modified, then it rebuilds anything anything with module FOO enabled, not just those within PORT

tulip sleet
#

I tried to run it locally. There is an f missing on the f-string you added for the set-output changes, but mainly when I give a common-hal file, it just sits. If I listed raspberrypi/audio_dma.c in CHANGED_FILES, it works. Did you rewrite it or you're saying the original script is not right.

#

I think just removing common-hal here might do it:

        module_pattern = re.compile(
            r"^(ports/[^/]+/common-hal|shared-bindings|shared-module)/([^/]+)/"
        )
#

I cannot think of a case where you want to recompile other ports if common-hal has changed without shared-bindings changing.

onyx hinge
#

it 'just sits' because it's doing lengthy work of getting all board compile flags

#

removing the first alternative of that first group I think will fix the immediate problem

tulip sleet
#

so that would be parallelized in shared_bindings_matrix.py?

onyx hinge
#

because it'll just build "all in port PORT" instead of "all with module FOO"

#

yes I want to do is parallelize get_settings_from_makefile

tulip sleet
#

ok, 1.5 minutes to do that, I see. Are you working on that now or should I submit a simple PR for this other thing?

onyx hinge
#

I think go ahead and submit the simple change.

manic glacierBOT
#

At least some Espressif boards print out bootloader startup info on hard reset. We can turn this off, but I wasn't sure if it had been turned on deliberately at some point.

I am not sure if it confuses Thonny sometimes. Thonny sometimes crashes hard the first time I try to connect to an ESP32 board.

It does help you see that the board is boot-looping if it resets before CircuitPython prints anything.

@MicroDev1 @UnexpectedMaker and anyone else -- do you have an opinion?

rst:0x1...
#

I see a little Thonny 4.0.1 flakiness on ESP32 V2, but in general it seems to work. On Linux, it crashed immediately when first started, but then worked fine after restarting. I have seen that several times. CLosing this for now. We can open more specific issues if something arises that seems due to CircuitPython.

onyx hinge
#

@tulip sleet I think I'm close to PR'ing my changes so maybe not merge yours for a bit?

#
Using files list on commandline
Adding docs/boards to build based on changed files
Building docs: False
Would set GitHub actions output build-doc to 'False'
Building boards:
  raspberry_pi_pico_w
Would set GitHub actions output boards-aarch to '[]'
Would set GitHub actions output boards-arm to '["raspberry_pi_pico_w"]'
Would set GitHub actions output boards-riscv to '[]'
Would set GitHub actions output boards-espressif to '[]'
manic glacierBOT
#

This runs faster, is more correct (I hope!) and is easier to test locally.

Frozen modules:

$ GITHUB_OUTPUT=/dev/null ./tools/ci_set_matrix.py  frozen/Adafruit_CircuitPython_MIDI 
Using files list on commandline
Adding docs/boards to build based on changed files
Building docs: False
Building boards:
  zrichard_rp2.65-f

Port-specific changes to shared modules:

$ GITHUB_OUTPUT=/dev/null ./tools/ci_set_matrix.py  ports/raspberrypi/common-hal/ssl/SSLSocket.c 
Using fil...
onyx hinge
#

oops we crossed. I added a revert of #7055 to #7057

tulip sleet
#

a common-hal change or a bindings change should only affect that port

onyx hinge
#

@tulip sleet what's a path that you're wondering about? I can show you what it results in with my change.

#
$ GITHUB_OUTPUT=/dev/null ./tools/ci_set_matrix.py  ports/raspberrypi/common-hal/ssl/SSLSocket.c 
Using files list on commandline
Adding docs/boards to build based on changed files
Building docs: False
Building boards:
  raspberry_pi_pico_w``` isn't this the case you're wondering about?
tulip sleet
#

sorry, i am testing it by hand, and it's working right. I didn't see the logic change you made in the makefile-based determination logic, which fixed what it did before.

#

hurrah for @functools.cache !!

onyx hinge
#

it's down at new lines 152ff that "specific to port & module" is handled

#

boo for accidental mentions

tulip sleet
#

yes, I missed those changes the first time I looked, ok, is good!!

manic glacierBOT
onyx hinge
#

OK, thanks for checking -- it's easy to overlook something

tulip sleet
#

i think so too, can link it

onyx hinge
#

yes I checked and that now just builds stm boards

manic glacierBOT
crimson ferry
#

@onyx hinge can we not turn the wifi module off for light sleep and fake deep sleep, as long as there's a way to turn it back on? I'm think something like asyncio with time alarms, where the wifi module is off while waiting for tasks.

tulip sleet
digital shoreBOT
onyx hinge
#

@crimson ferry My understanding is that until a pico-sdk bug is fixed we CANNOT power cycle & re-initialize the wifi coprocessor without re-initializing CircuitPython. https://github.com/raspberrypi/pico-sdk/issues/980 "The second call to cyw43_arch_init() hangs." If that is a wrong or incomplete understanding (or once they fix it), then we have more options available.

GitHub

I have code which is linked using the CMake cyw43_arch_threadsafe_background link_library. The code can call cyw43_arch_init(), cyw43_arch_deinit() and later cyw43_arch_init() again. The second cal...

tulip sleet
#

has anyone used a QT Py ESP32-C3 with CircuitPython recently? beta.2 is just bootlooping on mine(repeats ESP-ROM:esp32c3-api1-20210207)

blissful pollen
crimson ferry
#

thanks dan and jeff, i’ll look at that issue more… maybe what I’m really after, when that is fixed, for pico and espresif, is a Wi-Fi deinit in the user API

manic glacierBOT
#

This doesn't work yet. It needs https://github.com/adafruit/Adafruit_CircuitPython_Ticks/pull/8 in order to even fail (rather than skipping the tests). After that, some tests fail and one loops/hangs indefinitely.

We should fix the failures (probably mostly through changes in Adafruit_CircuitPython_asyncio) and then incorporate this patch so that we know if asyncio works.

tulip sleet
#

I'll bisect

slender pivot
tulip sleet
slender pivot
#

Ok, thanks for your prompt response

tidal kiln
slender pivot
#

If I have minor suggestions to make should the PR touch index.html directly? I am a bit of a git noob which is why I ask

tidal kiln
#

you can open an issue as a general way to make a suggestion

#

and discussion there can help answer that

slender pivot
#

Ok, my change is just some typos on the landing page such as "built in interpreter" --> "built-in interpreter", and things like that

#

I can make the changes and open PR directly if it is allowed

#

Meaning no need to open issue for discussion as changes are minor. If necessary, we can discuss under the open PR?

#

Does this seem feasible or do you have a better suggestion? Open to ideas

tidal kiln
#

yah, for minor things like spelling, can just make a pr

slender pivot
#

Great, thanks for your help @tidal kiln

onyx hinge
#

"-fno-branch-probability" saves ~400 bytes on trinket m0. I wonder how bad it is for performance.

manic glacierBOT
onyx hinge
#

just can't catch a break with esp-idf can we 😦

tulip sleet
#

well, that fix is in the latest v4.4 I am using, so it doesn't appear to be that

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0-beta.2 on 2022-10-14; LOLIN S3 16MB Flash 8MB PSRAM with ESP32S3

Code/REPL

import board
help(board)

Behavior

object is of type module
name -- board
board_id -- lolin_s3
BUTTON -- board.BUTTON
BOOT0 -- board.BUTTON
IO0 -- board.BUTTON
D0 -- board.BUTTON
IO1 -- board.IO1
A0 -- board.IO1
D1 -- board.IO1
IO2 -- board.IO2
A1 -- board.IO2
D2 -- board.IO2
IO3...

manic glacierBOT
manic glacierBOT
tulip sleet
#

@onyx hinge could we video about asyncio yield?

onyx hinge
#

@tulip sleet sure! will 10-15 minutes from now be OK? I'm trying to see if I can make the doc build go

tulip sleet
#

sure, I will eat some lunch

onyx hinge
#

OK

#

yeah maybe running an old python version isn't gonna be enough 😦

onyx hinge
#

@tulip sleet ping me when you're ready

tulip sleet
#

sure, will be a few minutes

#

@onyx hinge ok

onyx hinge
#

Amelia channel OK?

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0-beta.2-dirty on 2022-10-14; Raspberry Pi Pico W with rp2040

Code/REPL

import board
from digitalio import DigitalInOut, Direction, Pull
led = DigitalInOut(board.LED)
led.direction = Direction.OUTPUT
led.value = True
gp0 = DigitalInOut(board.GP0)

Behavior

Traceback (most recent call last):
  File "", line 7, in 
ValueError: GP0 in use

Description

DigitalInOut is initializing ...

midnight ember
#

@tulip sleet your post about the beta 2 release in the circuit Python forum should probably be pinned and replace the currently pinned beta 1.

midnight ember
marble notch
#

oh shoot you're right

#

sorry about that

midnight ember
#

😉 no worries

onyx hinge
#

@tulip sleet Adafruit_CircuitPython_asyncio doesn't work with python3.9 because select.poll isn't compatible: ``` File "/home/jepler/src/circuitpython/frozen/Adafruit_CircuitPython_asyncio/asyncio/core.py", line 169, in wait_io_event
for s, ev in self.poller.ipoll(dt):
AttributeError: 'select.poll' object has no attribute 'ipoll'

tulip sleet
onyx hinge
#

no, the core tests run Python3 with python3's asyncio as reference, not with 'our' asyncio

tulip sleet
manic glacierBOT
#

CircuitPython version

adafruit-circuitpython-adafruit_qtpy_rp2040-en_US-7.3.3.uf2
adafruit-circuitpython-raspberry_pi_pico-en_US-7.3.3.uf2

Code/REPL

import time
import busio
import board
import adafruit_mcp9808
import microcontroller, digitalio, time
import storage

d = digitalio.DigitalInOut(microcontroller.pin.GPIO21)
i2c = busio.I2C(scl=board.GP1, sda=board.GP0)
mcp = adafruit_mcp9808.MCP9808(i2c)
try:
    storage.remount("/", False)
    can...
onyx hinge
#

@proven garnet if you're around can you please take a look at this run? The error isn't related to my change in an obvious way, but the most recent builds on main didn't have a problem, so .. I'm puzzled.

A clone of CircuitPython is down in ./build_deps/ and it has a submodule named nvm.toml. Hmmmm, it IS a recent change that nvm.toml is moved, and maybe it's moved to a place that it's being populated by the CI?

This build script is different than e.g., requests, fairly radically, not sure which one is 'more current'

#

er I take back the thing I was saying about a recent change, I was thinking of nina-fw

tulip sleet
#

Screencast based on a workshop originally presented at PyCon India, Chennai, October 14, 2019.

Code samples at: https://gist.github.com/dabeaz/f86ded8d61206c757c5cd4dbb5109f74

This workshop is about the low-level foundations and abstractions for asynchronous programming in Python. It's a bit unusual in that rather than starting with tradi...

▶ Play video
onyx hinge
#

(12) SET OPERATION 9 TO GO TO OPERATION 2.

#

I tried to fix the CI of asyncio..

random junco
#

I think Tekktrik is moving this weekend

onyx hinge
#

oh, could be. I think the CI is green but it really merits a look by someone who is more conversant with it.

manic glacierBOT
#

With other changes, this test segfaults on Unix, which may give good light to test by:

$ MICROPYPATH=frozen/Adafruit_CircuitPython_asyncio/:frozen/Adafruit_CircuitPython_Ticks/ ./ports/unix/micropython-coverage asyncio_crash1.py 
Traceback (most recent call last):
  File "frozen/Adafruit_CircuitPython_asyncio//asyncio/core.py", line 241, in run_until_complete
  File "asyncio_crash1.py", line 13, in crash
ZeroDivisionError: division by zero
Segmentation fault
# SPDX-Fil...
sharp jacinth
#

How hard would it be to replace the build of circuitpython on a rp2040 stamp with an identical build that just appears as a different USB name on the PC?

jaunty juniper
sharp jacinth
#

ooooh

timber mango
#

@prime flower hey brother, can you accept my friend request? id like to ask you about something if thats alright?

sharp jacinth
#

Most folks around here don't do DMs

timber mango
#

fair enough, i just need to talk to him about something privately.

prime flower
timber mango
#

thats why i was hoping to talk to you privately.

cunning crypt
# timber mango it's neither, it's regarding something completely different.

Good evening,

It's generally considered rude to DM someone without their permission, and nobody has any requirement to accept your DMs. It's particularly fishy when someone joins a server and, on the same day, asks a specific person to accept their messages. Especially when that's the only messages you've made on the sever.

As this is the #circuitpython-dev channel, it's generally presumed that anything brought up in this channel, hence the comments about code or community.

If you have a more personal, urgent matter, you can contact one of us moderators and we can then contact the person in question. This allows us to make sure nobody's getting spammed, while also allowing more information to be passed without it being public. Additionally, we can set up non-public spaces so people don't have to accept permanent friend requests.

#

So, in short:
If you have something code related, it should be in a channel.
If you have something community related, you can talk to a moderator or #help-with-community
If you have something personal, you can talk with a moderator and we can go from there.

timber mango
cunning crypt
#

And yet so far you have not made any indications of what you want to talk about. As I said, you can DM one of the mods (Oh look, I'm conveniently available), and we can pass on the information and see if the other party is willing to talk about it.

You have to understand that we are here to protect our community members - and unwanted DMs are so frequent, and so outright dangerous, that people can't just accept them.

#

And at the end of the day, if someone says "No" you have to accept that.

prime flower
#

@timber mango nope! I don’t accept DMs. You can talk the matter over with @cunning crypt and they can pass it to me. Thanks!

timber mango
#

that's totally understandable, and i apologize if i annoyed you in anyway.

#

@cunning crypt may i dm you?

cunning crypt
proven garnet
onyx hinge
#

@proven garnet OK I think the immediate fire is put out but either this library is an oddball and it would be good to bring it in line; or this is common and it'd be good to correctly deal with the problem.

proven garnet
#

Yeah, just caught up, interesting that it's just happening now, I'm about to make a junk PR to a library and see what happens.

#

I tagged you on it just for an easy link if you need

#

Yup, looks like this is gonna be an issue.

#

Your fix looked good though. I think adabot can fix this pretty quickly. Even better is turning this into that composite action!

#

I can get an adabot patch tonight, probably within an hour if you (or anyone) wants to review; I can run it after. Also happy to wait a day since it is the evening, but this sounds way better than moving furniture.

#

No worries either way, I'll have it ready tonight though.

#

I'll also prioritize that composite action since this would be awesome for this sort of thing. I think I was just about ready to PR it too.

orchid basinBOT
proven garnet
#

That's weird I could have sworn the CI failed when I submitted that PR a little while ago, but now it shows as passing.

#

@onyx hinge no need to respond now but curious if anything changed in the last little bit, since the library CI is passing now for the test PR.

spiral elk
#

I think I'm gonna close the ESP32-CAM PR and open a new one once I've tried my code on updated esp-idf. Its sat for a long time and needs directory/device-name renames anyhow.

#

I'm suspecting the issues I've been having with the camera modules are due to wrong settings in sdkconfig

#

Been trying to build the example code from espressif but I think my idf install is somehow hosed.

foggy lake
#

Is it possible to clear the UART buffer?

jaunty juniper
foggy lake
#

@jaunty juniper looks like what I'm looking for. Thanks

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0-beta.2-9-g5192082e6 on 2022-10-16; Raspberry Pi Pico W with rp2040
Board ID:raspberry_pi_pico_w

Code/REPL

import wifi

wifi.radio.connect("SSID", "Password")

Behavior

Running code that does not connect to wifi does not cause a problem.
After running code that connects to wifi (without raising any exception) when I dismount the CIRCUITPY volume, I cannot remount it. I have to nuke the flash an...

manic glacierBOT
#

I get a similar behavior on picoW with an empty code.py, on Mac, but I was not able to find a way to reproduce the problem consistently. After pressing reset:

  • sometimes the board shows up on USB.
  • sometimes it doesn't.

When it doesn't come back, the code isn't running (at least with a code that blinks the LED).
Booting in safe mode seems to always make the board come back.
I can't reproduce the issue on a pico.

manic glacierBOT
#

Since this is going to require directory/board id renaming as well, I'm going to close this and start with a fresh PR after cleaning up my build environment and trying against the current esp-idf. I'm suspecting the camera issues are probably due to my cargo-culting sdkconfig and having some setting wrong so going to experiment with that.

I tried building the espressif sample code but was unable to get it working in VS Code and didn't have much time to devote to it for a while (white-sand ...

orchid basinBOT
manic glacierBOT
#

Confirmed the bug.
Though I experienced some different results.
Serial was also inaccessible.
lsusb was hanging alright.

Though sometimes it just appeared fine.

Usb negotiation seems to fall apart due to the lag of connecting to the wifi.
Journal:

xhci_hcd 0000:01:00.0: ERROR: unexpected setup address command completion code 0x24.
xhci_hcd 0000:01:00.0: ERROR: unexpected setup address command completion code 0x24.
usb 1-1.2: device not accepting address 10, error -22
manic glacierBOT
manic glacierBOT
ornate breach
ornate breach
#

np! I was looking to see if there was a good Hacktoberfest issue to work on and noticed it 🙂

manic glacierBOT
#

I was searching around for what to do for Unknown Error 205 on discord and kept finding this issue. Here's what I did to work around it on my mesh network (Google Nest WiFi):

  1. Use the app WiFi Analyzer on my Android phone to scan and create a dump.
  2. Look through the generated .XML for the BSSIDs and signal strength of all my access points. I chose the one with the highest (closest to zero) level in decibels.
  3. Add the BSSID as follows to the radio connect command:
          ...
tulip sleet
#

@analog bridge are you testing beta.2 on your C3 board? This is my highest priority thing, but if you think you have a lead on it, go ahead. I have to be afk for a while. Thanks.

ornate breach
#

If I recall right, we moved away from devices.h usage.

analog bridge
#

Can you test on a 4MB s2/s3 board?

tulip sleet
#

will do

ornate breach
tulip sleet
ornate breach
#

yeah skerr92

tulip sleet
# ornate breach yeah skerr92

Post comments pointing to what you think closes these issue in the issues, and I can close them from there. That will get the xref directly in. I will see all these here or in my email and will close them.

#

starting with the tilegrid above -- thanks!

tulip sleet
manic glacierBOT
tulip sleet
#

(i was testing the wifi scanning problem on this board.)

manic glacierBOT
analog bridge
#

@tulip sleet Can you do a custom build on it with

-CIRCUITPY_ESP_FLASH_FREQ = 40m
+CIRCUITPY_ESP_FLASH_FREQ = 80m
manic glacierBOT
#

The PR mentioned above (PWM audio) mentioned not using high drive strength. The work here is choosing which pins to enable for high drive strength on nRF according to the datasheet.

Another possible idea is a drive_strength property, but that's more work, and we need to come up with a consistent API. Also it probably would not fit on the small SAMD21 boards (SAMD are already pegged at high drive strength anyway).

#6978 (strong drive for SAMD PWM) is also related.

tulip sleet
#

in ports/espressif/Makefile

#

there are two patches in our version of esp-idf, both having to do with sdkconfig params. it would be interesting to back those out (and compensate if necessarY). One for JTAG serial, and one for the workaround you mentioned the other day

#

(and then deleted)

manic glacierBOT
#

First off let me say that I'm a complete amatuer here.

I was porting circuitpython to non-adafruit boards. I able to get it to work on M5-ATOM by rewriting Huzzah32. I also got it to work on M5-STAMP-c3u by rewriting QTYPY-esp32-c3. They worked rather well with REPL and Workflow. However, since the last update none of them work. I get a boot up message that ends with "Serial console setup" and nothing more. The ESP32 chip that goes with those are very basic, while the chip that goe...

analog bridge
#

one for the workaround you mentioned the other day
(and then deleted)
I forgot, which one is this?

manic glacierBOT
analog bridge
#

Oh okay, I deleted that comment as I found your commit message:

This was necessary to get CircuitPython not to boot-loop when starting up and then disabling the SPI flash cache during filesystem_init().
tulip sleet
#

right, there seemed to be something depending on that even without SPI RAM being present

manic glacierBOT
analog bridge
#

@tulip sleet does adafruit_feather_huzzah32 work with 8.0-beta2?

tulip sleet
#

i will test

analog bridge
tulip sleet
#

@analog bridge HUZZAH32 does not work - hangs after "Serial console Setup". reconfirmed it works on beta.1. testing qt py esp32 in a minute. Also will test an S2 board with no PSRAM

#

QT Py ESP32 PICO works with beta.2

analog bridge
#

Neradoc tested Feather ESP32 V2 and it also works, both QT Py ESP32 PICO and Feather ESP32 V2 have 8MB flash

#

meanwhile huzzah32 and the esp32c3 boards tested so far boards have 4MB flash

tulip sleet
#

ESP32S3 with 8MB flash and no PSRAM works

analog bridge
#

I did a custom build for microS2 with 4MB flash and it also works, note: the chip is still 16MB, I defined 4MB in firmware to restrict the size

tulip sleet
#

by using the 4MB .csv?

analog bridge
jaunty juniper
#

feather ESP32-S2 has 4MB (plus 2 PSRAM) and seems fine

analog bridge
#

so, the conclusion I am reaching is that this issue is present on esp32/esp32c3 boards with 4MB flash

tulip sleet
#

Both Feather S3 8mB/none and 4MB/2MB work with beta.2

#

is your c3 board different in some way than the qt py c3? I have a qt py c3, and I also have an Espressif ESP32.C3-DevKitC-02, not tested yet

analog bridge
#

microC3 uses ESP32C3-MINI-1 module with the ESP32-C3FN4 chip, I believe this chip is the same as on QT PY C3

tulip sleet
#

that espressif c3 doesn't work either, has 4MB flash

analog bridge
#

I did a DEBUG=1 build of the microC3 and I get the following: (not sure if these were present earlier)

SHA-256 comparison failed:
Calculated: ccb0d00bac7e84e1d90a12e4f75f4ab6c5f7e71bb209afd5819c4c9557a6db71
Expected: c9cf160580940ec7801c73b16423824e72ad12055c732e83ce66332240af42a7
Attempting to boot anyway...
tulip sleet
#

we could compare the generated build-*/esp-idf/sdkconfig for these boards between beta.1 and beta.2 and see if there is a difference

#

I have to go to the store but will be back in an hour or so.

manic glacierBOT
manic glacierBOT
#

Given this issue has had a few PRs merged on it (see above), is it safe to have this one closed?

Could you check on the missing modules mentioned in the second task? If they are present then we could close, otherwise need to add them too.

It appears only fontio has been captured in the shared_bindings_matrix.py https://github.com/adafruit/circuitpython/blob/main/docs/shared_bindings_matrix.py#L67

The wiznet and socket have not been captured.

proven garnet
# onyx hinge weird, I don't know what's up.

Gotchya, it's still worth addressing, but if it isn't occurring right now then maybe I can finish up that composite action stuff and get that out with the fix. Two birds, one PR.

manic glacierBOT
#

There isn't really a timeline right now of when the nRF7xxx chips are set to be released, but there have been some big updates to the nRF software baseline that will need to be updated in the nRF submodules that would enable it's support.

nRF in the latest nRFx added preliminary support for Matter and a preview to the nRF7 series chips.

This is more of a long term task, and here are a few things that I think would be in that process up bring support for the nRF7 series into CircuitPy...

ornate breach
#

Curious, do we have Matter support for the ESP32 in circuitpython?

manic glacierBOT
tulip sleet
ornate breach
#

there appears to be python matter libs

#

I'm just curious if it's worthwhile looking into

manic glacierBOT
blissful pollen
ornate breach
#

the only real support we would get with the nRF7 chips is being a wifi coprocessor since that's the intended end use.

#

I am inclined to think that adding some basic Matter support might be worth while.

tulip sleet
ornate breach
#

it's listed as a wifi coprocessor for the public release documentation

#

"The nRF7002 is a companion IC, providing seamless Wi-Fi connectivity and Wi-Fi-based locationing (SSID sniffing of local Wi-Fi hubs). It is designed to be used alongside Nordic’s existing nRF52® and nRF53® Series Bluetooth Systems-on-Chip (SoCs)"

tulip sleet
#

as for the nRF SDK, we don't use it. We use only the nrfx lower-level library, which calls the SoftDevice. The nRF SDK has a lot of convenience stuff, but we didn't use it.

#

aha

ornate breach
#

it works essentially like the Pico W WiFi coprocessor

#

Matter is one of the primary protocols they are pushing on it because it's the major IoT standard major tech is pushing.

tulip sleet
#

we looked at it; zephyr had issues about dynamic assignment of pins to functions. We brought that up, they are moving in the direction of making that possible, but I don't know where it is. Zephyr is complicated and very Linux "inspired"

#

.

ornate breach
#

that's understandable. I imagine building without Zephyr might be an undertaking

#

I imagine like all things, it isn't impossible; just a bit more trivial.

tulip sleet
#

it's not possible to omit zephyr -- it provides the BLE stack, the RTOS, etc.

ornate breach
#

hmm, I would imagine that you would have the nRF7 loaded with it's base firmware and then you would communicate over a serial interface like SPI

tulip sleet
#

(afk to eat dinner)

ornate breach
manic glacierBOT
#

I guess to extrapolate on the updated issue description;

the nRF7002 is just a companion/coprocessor so running circuitpython on it isn't really possible from my view. With this in mind, for there to be support for using the nRF7002, a specific firmware would need to be made to be loaded on the nRF7002 that is separate from circuitpython and not dependent on circuitpython. This would be to avoid the Zephyr issues with circuitpython.

Additionally, a SPI library would need to be defined s...

#

This should work substantially like Python. Two tests are added.

>>> try:
...     1/0
... except Exception as e:
...     raise RuntimeError("I am sad")
Traceback (most recent call last):
  File "", line 2, in 
ZeroDivisionError: division by zero

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 4, in 
RuntimeError: I am sad 
tulip sleet
ornate breach
#

I'm still waiting to see if Nordic will be able to get me a nRF7 DK which would be helpful for making some initial progress. I'm hoping I can get one by the end of the year

#

looks like the DK at least uses QSPI to communicate

tulip sleet
#

the physical protocol i'm not worried about, it's the messages

ornate breach
#

yeah, they also appear to use some control pins

#

HOST IRQ = P0.23

COEX_REQ = P0.28

COEX_STATUS0 = P0.30

COEX_STATUS1 = P0.29

COEX_GRANT = P0.24

#

so that will have to be considered as well

onyx hinge
#

busy day in here!

tulip sleet
#

HCI is kinda standard for Bluetooth, but I don't know of such a standard for wifi (e.g., the Pico W CYW43 uses a bespoke protocol, I think).

ornate breach
#

i guess we'll have to wait to see what new info they release. there doesn't appear to be much about wifi other than it's shipping with Matter spport

#

using Matter seems like it might be okay. though that might actually get implemented on the nRF7 itself.

tulip sleet
ornate breach
manic glacierBOT
#

(Split off from #7060)

Some but not all ESP32 boards are hanging when loaded with 8.0.0-beta.2.

Feather HUZZAH32 (WROOM) hangs. Feather ESP32 V2 and QT Py ESP32 (Pico module) do not. @MicroDev1 notes the former is 4MB, the latter two are 8MB (also latter two have PSRAM).

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371 
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
...
kind river
#

I'd guess that Matter runs on the Zephyr TCP/IP stack that has drivers for the nRF7 WiFi and the internal 802.15.4/thread stack

ornate breach
#

It runs on top of the zephyr application on the chip it’s on

#

Looks like there would need to be some support in the Adafruit Bluefruit app for the QR code portion of setup

#

Or maybe an Adafruit Matter app for matter setup that is independent

manic glacierBOT
manic glacierBOT
#

This bug will only appear on VERY early wifi connections. Under something like ljinux which does it like 5s in the boot, it will never happen.

A temporary mitigation would be to just time.sleep for a while till usb has init'ed.

Also, the drive is just fine, the board is just failing usb negotiation.

Hi Bill88t, thanks for the explanation and mitigation. you've got me progressing again!

manic glacierBOT
#

Based on what you've described, I know where in the core the fix is likely to go, in case someone else wants to try picking up the issue & making a fix.

The file is ports/raspberrypi/common-hal/wifi/Radio.c in the functioncommon_hal_wifi_radio_connect. Instead of using cyw43_arch_wifi_connect_timeout_ms, it will need to be changed to use the async connect function follo...

manic glacierBOT
#

@MicroDev1 I did a bisect on this, testing on a Feather HUZZAH32 (ESP32 WROOM module) and the critical commit is different than #7060.

The first commit that causes the problem is https://github.com/adafruit/circuitpython/pull/7000/commits/7d8ff20dac8dfd030466610f9ed9a2afe29f07bc, the first commit #7000, in your storage extension PR. I don't know what the issue is, but I also tested that same commit on Feather ESP32 V2, and it works on that board. So there's something different about the b...

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0-beta.2-9-g5192082e6 on 2022-10-16; Raspberry Pi Pico W with rp2040

Code/REPL

import wifi

print()
print(f"ipv4_gateway    : {wifi.radio.ipv4_gateway}")
print(f"ipv4_subnet     : {wifi.radio.ipv4_subnet}")
print(f"ipv4_address    : {wifi.radio.ipv4_address}")
print(f"ipv4_dns        : {wifi.radio.ipv4_dns}")

Behavior

ipv4_gateway    : 192.168.0.1
ipv4_subnet     : 255.255.255.0
ipv4_a...
analog bridge
#

@tulip sleet does the huzzah32 hang with storage extension off?

tulip sleet
#

I'm guessing it will not, based on the bisect commit.

#

i can do a quick test

tulip sleet
analog bridge
#

I don't have a huzzah32 or any other 4MB esp32 available for testing, this is a very specific issue.

tulip sleet
#

do you have some idea of what it might be? I can test for you. My first thing would be to look at the partition .csv files to see if they're unusual compared with the others.

#

could possibly be related to PSRAM as opposed to 4MB/8MB? Though I don't see an obvious reason.

analog bridge
#

yesterday I tested 4MB partition.csv on microS2 and storage extension worked fine

#

could USB play a role?

tulip sleet
#

yes, it's peculiar to the plain ESP32, so I wonder what's different. Could be a low-level thing due to hw otr ESP-IDF internal differences

#

could turn off USB or microS2, though it's a bit hard to test then (have to enable UART console or debug prints). I haven't yet built a debug version to get a backtrace or anything. Finished the bisect late last night here.

#

i am going out shopping in a bit, will be back in an hour or two.

analog bridge
#

I'll test with CIRCUITPY_USB=0 and 4MB partitions.csv on microS2

tulip sleet
#

It is not going to find a partition that matches app/ota_1, so the data in _partition[1] is not useful.

#

but there is no test for CIRCUITPY_STORAGE_EXTEND = 0 in your initial commit, so I'm confused why turning it off would make a difference.

#

ok, I am going out. ttyl!

analog bridge
#

@tulip sleet I think you found the bug 👍
<=4MB no-uf2 partition tables don't have ota partitions

#

also in Makefile the condition to use no-uf2 partition table seems wrong:

-UF2_BOOTLOADER ?= $(if $(filter $(IDF_TARGET),esp32s2 esp32s3),1)
+UF2_BOOTLOADER ?= $(CIRCUITPY_USB)
brazen hatch
# manic glacier

I am doing this now
It already works async, I just need to tweak the cases a bit more.

onyx hinge
#

awesome thanks @brazen hatch !

brazen hatch
#

yea something is very wrong with the return codes of cyw43_wifi_link_status

manic glacierBOT
#

Breaking Change: ESP32/ESP32C3 boards having 4MB flash will loose CIRCUITPY data post https://github.com/adafruit/circuitpython/commit/f86377e0f1024cd4bf1a17fffc9d67e9d9d83ab9

Fixes in this PR:

  1. Added ota partitions in 4MB-no-uf2 partition table.
  2. Changed the name of 2MB-no-uf2 partition table to 2MB-no-ota-no-uf2 as it is too small for ota support.
  3. The UF2_BOOTLOADER condition in Makefile now depends on CIRCUITPY_USB instead of IDF_TARGET.

Fixes #7070. Thank...

analog bridge
proven garnet
#

@onyx hinge I finalized the composite actions, hoping we can roll them out to a test library this week! @idle owl, that's the repo I transferred to you yesterday.

tulip sleet
# analog bridge <@329766224093249548> can you test #7073

sure, I will. We might discuss whether to shrink CIRCUITPY or just disable dualbank in 4MB as well. Some people might complain about the reduction in size of CIRCUITPY. I will discuss that in an internal mtg today and we can talk about it in the regular Monday public meeting as well.

Should

    _partition[1] = esp_partition_find_first(ESP_PARTITION_TYPE_APP,
        ESP_PARTITION_SUBTYPE_APP_OTA_1,
        NULL);

check that the partition was not found and act accordingly?

#

i mean, we already made a decision not to have OTA on those boards, though maybe that was before dualbank was a possibility.

#

hmm, well, the whole point of extended storage is to make a larger CIRCUITPY possible; I missed the point there.

#

so ok to have an OTA partition that can be reused

#

@analog bridge how would you feel about the default, at least on some boards, to be that the OTA partition is part of CIRCUITPY instead of by-default reserved for dualbank? I know Limor's feeling is that use of dualbank is rare, so if we can make it available, but not the default, then those who want it can set up their boards that way, and most people, who don't need it, can benefit from a larger CIRCUITPY initially?

analog bridge
tulip sleet
#

ah great, ok, I did not realize that

#

so my only remaining q is about the _partition[1] above

analog bridge
#

the only reason to have "no eligible OTA app slot" is incorrect partition table as we witnessed

#

otadata partition may be corrupted though

tulip sleet
#

maybe safer to check for _partitition[1] being NULL in supervisor_flash_read_blocks() before trying to call esp_partition_read() ?

#

I should just put this in a review

#

I'll do that, mention it in a review

manic glacierBOT
blissful pollen
tulip sleet
random junco
tulip sleet
#

both ESP32 and ESP32-C3 were not working, but for diff reasons

manic glacierBOT
analog bridge
blissful pollen
#

Ah okay. Well still holds when a fix is found for that still feel free to ping me about it

tulip sleet
#

i wonder if the compilation change is actually causing this error to manifest in a different way.

#

so go ahead and test c3 on this new PR too

manic glacierBOT
tulip sleet
#

@analog bridge ehh, I was making comments on the commit, not the new PR (which doesn't even have that file, so I can't put in review comments about it).

tulip sleet
#

(could not understand why I was not seeing "Start a Review") 🙂

analog bridge
#

@tulip sleet what should be done if it is null? we cannot raise an error in that part of code I believe? should we revert to less storage but than how will the user know?

tulip sleet
#

just use partition 0, or maybe go into safe mode with a new safe mode condition code?

manic glacierBOT
blissful pollen
#

Quick question that probably is too short for in the weeds: Has anyone ever done any work on optimizing the display on CP? Just noticed the Arduino eyeball project runs at 50ish FPS with full refreshes and the equivalent CP code is about 5 FPS.
(I could add this to in the weeds but I'm missing today)

tulip sleet
#

safe mode errors are sometimes "here's this bad thing that happened". or it could be an assert which would require debugging but at least it would be clear what the error is

manic glacierBOT
tulip sleet
#

see supervisor/shared/safe_mode.h

#

it could also check for _partition[0] being NULL. Could do that right after the find_partition calls and then just go into safe mode. have to prevent recursive safe_mode happenings.

#

it's ok by me to open an issue to fix this as opposed to fixing this now

#

i am just thinking about someone who somehow gets circuipython loaded (maybe by .bin) on a chip with a wonky partition table

analog bridge
#

also no bonus fixes with #7073... tested on microC3 and #7060 is still present

analog bridge
#

my opinion would be to check partition-table during build instead of runtime

manic glacierBOT
solar whale
random junco
#

yes

#

Thank you

#

1pm my time, need more coffee!

stuck elbow
#

time is an illusion

random junco
#

@tulip sleet: Can you speak to the core in today's meeting?

tulip sleet
#

sure

random junco
#

thanks!

manic glacierBOT
proven garnet
random junco
#

I'm trying to work on typing in the adafruit_avrprog.py library. How can I tell the type for spi_bus and rst_pin in this code:

    _spi = None
    _rst = None

    def init(self, spi_bus, rst_pin) -> None:
        """
        Initialize the programmer with an SPI port that will be used to
        communicate with the chip. Make sure your SPI supports 'write_readinto'
        Also pass in a reset pin that will be used to get into programming mode
        """
        self._spi = spi_bus
        self._rst = DigitalInOut(rst_pin)
        self._rst.direction = Direction.OUTPUT
        self._rst.value = True
blissful pollen
blissful pollen
#

If you can't find a sample let me know. I've seen it around but don't have one handy offhand

random junco
#

I will if I can't find it, appreciate it

manic glacierBOT
proven garnet
#

It's more difficult to tell about pin arguments, but a good tell is how it gets used: if it has .switch_to_input() or .value used, it's probably a digitalio.DigitalInOut. If it gets turned into a digitalio.DigitalInOut like it does here, it's probably a microcontroller.Pin.

random junco
proven garnet
#

No problem! There are a couple of exceptions like drivers for GPIO extenders that define their own DigitalInOut class, but otherwise you can bank on the above.

tulip sleet
#

@analog bridge I was waiting for the artifacts but one build is stuck doing a network fetch. Also a few boards are failing due to size considerations. I will build HUZZAH32 from your repo and test it.

manic glacierBOT
#

@biffobear can you test with the artifacts from this PR? they should be ready in an hour or so. If you're not familiar with how to get artifacts from a PR build let me know and I'll add more verbose instructions.

I'm happy to test for you, but I've never got artifacts from a PR build before. So I will appreciate your instructions.

Also note that I won't be able to perform the tests for about 12 hours from the time of this post.

analog bridge
#

#7052 addressed the log level issue in -opt and -debug sdkconfigs

tulip sleet
#

i saw something about that last night, but didn't have a chance to check it yet.

analog bridge
#

I'll push a commit to fix it

tulip sleet
idle owl
thorny jay
manic glacierBOT
onyx hinge
#

thanks for that ^^ dan

tulip sleet
#

I should probably put it in a guide

modern wing
#

Good afternoon, happily lurking.

lone axle
onyx hinge
#

That message I think is about the label being newly assigned, it's not a count of labeled issues.

modern wing
#

welcome back 🙂

idle owl
#

Thank you 😊

onyx hinge
#

@deʃhipu for implementing PNG support for adafruit_imageload
💯

stuck elbow
#

@lone axle ouch, sorry, I was meaning to get back to it, but life happened

blissful pollen
#

I’m out for an appointment so can’t edit the notes doc for in the weeds but I had a general question if anyone has done any performance on displayio speeds. More if it’s worth me poking at.

lone axle
#

No worries. I have a followup one in for the last few bits. I am super excited to have the functionality in displayio 🎉

errant grail
#

I never settle for being a single point of failure. I usually bring on multiple points.

manic glacierBOT
onyx hinge
#

@analog bridge if you're motivated, i'm sure that PR could use someone "kicking the tires" as it were -- I only wrote some basic tests and ran on the host, didn't even put it on a device yet.

manic glacierBOT
stuck elbow
onyx hinge
#

as long as there's a clear and reliable way to create compatible files it's a great step forward

analog bridge
onyx hinge
#

particularly, I'm expecting that there are other places that the code for chaining needs to be added -- or, alternately, a better way to centralize the chaining.

lone axle
onyx hinge
#

This 'echo' thing is very weird for today's computers but made a lot of sense in the days when you would hook 16 VT-100 terminals to your one UNIX server. And Linux dutifully copied this way of working with serial connections.

tulip sleet
#

or teletypes!

onyx hinge
#

green-screen VT terminals were a thing during my university time, so that's the model I think back to

tulip sleet
#

interesting we don't really use terminals anymore, or we use them the other way around

#

delayed echoing can be maddening if you don't see your typing right away

stuck elbow
#

it's fine with vim, drives you crazy with emacs

idle owl
#

"If I do say so myself" 😂

#

Jeff came up with CowBell, if his hubris did not make that obvious.

gilded cradle
#

I wondered

idle owl
#

(It's a name completely worth the hubris. So well done.)

stuck elbow
#

CowBell™ (now with more hubris)

modern wing
#

CowBell+, the new streaming subscription service 🐄

stuck elbow
modern wing
#

Kattni: "I had covid, and I'm working on sharing...." oh no please, don't share covid "...the experience on my blog." whew. 🌡️ 🙂

stuck elbow
#

Nurgle is the god of generosity

onyx hinge
#

Happy Birthday @minor plume !

minor plume
onyx hinge
#

it still has more RAM than the pico though

minor plume
random junco
#

@onyx hinge - I agree on the Lucy Peanuts desk, first thing that came to me too

tulip sleet
#

i had an IBM Z50 for a while, that I could run some kind of UNIX on. But I sold it on to the next collector

turbid radish
#

@lone axle did you get your newsletter weekly report in?

onyx hinge
stuck elbow
#

I did look at some things briefly

#

one surprising thing was that enabling async dma transfers didn't help much

tulip sleet
#

the base pixel-writing routine does a lot of work

stuck elbow
#

it's mostly cpu-bound

midnight ember
#

didn't intend on missing the meeting but things happen :/

idle owl
#

@random junco

gilded cradle
#

I think the last time optimizations were done in CP 4.1.0

idle owl
#

Tim was talking

analog bridge
#

Thanks!

idle owl
#

@lone axle I would type it out. I think Paul couldn't hear you.

lone axle
#

I have tested a few scripts that try to show which things are fast and which things are slower. But never gone further than that to figure out where improvements can be made. @blissful pollen

blissful pollen
#

On my phone while waiting for an appointment. Just comparing the arduino eyes project to CP it’s about 1/10th. Just more wondering if someone had hit a hard limit already

lone axle
ember iris
#

Of late sometimes discord doesn't pipe the audio for everyone sometimes. I've found refreshing my page get's the audio to work if I notice someone isn't making audio but others are responding

onyx hinge
#

@blissful pollen I'd love to chat with you about this sometime that's convenient for us both

stuck elbow
#

one thing that could potentially help with displayio would be running the rendering in the background on the second core on devices that have two cores

ember iris
#

cheers all

onyx hinge
#

👋

random junco
#

really sorry @lone axle

lone axle
# random junco really sorry <@382939733107408897>

No worries! I am quite suspicious of my tab crashing immediately before that (it cut off while the topic was being introduced) being related some how. Maybe it doesn't send out "person re-joined" events correctly in all cases internally when a client comes back.

#

I think you heard me before when I read my hug and status so it was only after that crash that you didn't.

onyx hinge
#

If I was working on optimizing displayio I'd look at how e.g., displayio_tilegrid_fill_area has to make multiple conditional function calls for each pixel. And figure out how to change things so that instead of common_hal_displayio_bitmap_get_pixel being called (say) 32 times for an area, a new call could do 32 pixels at once. This would eliminate a lot of function call/return, the type-check if statements, etc. The same would be done for the "pixel shader" step, it would work with a group of pixels in one call, not a call per pixel... Probably it should become a call "per row, up to some maximum pixel width". But that's just based on gut instincts, not on actual profiling or anything.

blissful pollen
analog bridge
#

Any suggestions regarding the coproc API? PR #6902

import coproc
with open("Program_A.bin", "rb") as f:
  a = coproc.Coproc(buffer=f.read(), address=0x500007fc, length=1024)
with open("Program_B.bin", "rb") as f:
  b = coproc.Coproc(buffer=f.read(), address=0x500007fc, length=1024)

coproc.run(a)
coproc.halt(a)
coproc.run(b)
# OR
a.run()
a.halt()
b.run()
#

@onyx hinge ^

onyx hinge
#

@tulip sleet @idle owl do we have enough uncategorized issues in the core that we should do a bug triage session this week? I am guessing that the 8.0.0 list has had all the stuff booted from it that can reasonbly be deferred. Or, I can unilaterally go label the unlabeled issues if nobody's done it yet.

blissful pollen
idle owl
analog bridge
tulip sleet
blissful pollen
proven garnet
#

I think I asked before but asking again since there's still time for new contributors - do we want to share our participation in Hacktoberfest on their Discord server? Do we think we have the capacity for an influx if we publicize we're looking for help?

#

Sorry meant to bring it up in the meeting

onyx hinge
#

@analog bridge I haven't really thought about it since writing that feedback on the PR last month. I think it would be helpful to me to talk about a couple of 'real' uses of this functionality because right now it feels very abstract and instead of being helpful I immediately jumped to "here are some potential sources of trouble" which doesn't really help you move the PR forward

#

Again, with pio, we had a number of interesting and well motivated examples that were in the pico examples and in their manuals .. are any of those potentially applicable to the risc v co-processor? Like, a bit banged i2c or neopixel, say.

analog bridge
ember iris
onyx hinge
#

oh you have updates to the PR incoming? that's excellent news!

proven garnet
#

Not sure what it was like last year though since I was solely on the contributing side haha

analog bridge
manic glacierBOT
#

If you pull the power plug abruptly, you are going to get corruption. The same would be true if you pulled the plug on your desktop computer, or pull a USB drive out while it was being written. Modern filesystems are more robust and can be recovered more easily, so it's less of an issue.

To erase and reformat CIRCUITPY, follow the directions here.

If you have a battery-powered datalogger, the best technique is to monitor the battery voltage in your monitoring loop, and stop writing when...

proven garnet
ember iris
proven garnet
#

@lone axle mind if I use your PR as guinea pig for so CI changes? I'd get something into main and use yours (which we know should pass CI) to test the new build and release changes.

#

Specifically the one for imageload

#

It might mean it sits for a little bit, while the new CI gets any wrinkles ironed out.

proven garnet
#

Thanks!

random junco
#

@turbid radish If I did anything wrong or need to change anything, just let me know. Thanks!

onyx hinge
#

@lone axle there's a lot less RAM on the rp2040 than on an esp32s2 with psram. if large json responses are needed, we should really look into "json streaming with visitor pattern" so the whole json data doesn't have to fit in RAM. https://github.com/adafruit/circuitpython/issues/5512 -- the portalbase way of saying 'set this label from this json path' would fit well with it.

GitHub

Occasionally we have trouble where we want to deal with a big json file, and are interested in a small portion of the total data. One pattern for doing this is exemplified by the visitor pattern as...

lone axle
onyx hinge
#

ah, well, a similar thing would be needed, because RAM is RAM and we like to use it.

#

@proven garnet this looks fishy

      pattern: "bundles/*"
      github-token: ${{ inputs. }}```
inputs dot what?
random junco
#

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/1YtDimxJ-FXu-88WqLRq-TFmE1q-xTAp-OIEiUpwkFGw/edit?usp=sharing

lone axle
#

@onyx hinge Would it be expected to raise a memory error if it ran out trying to return a response? I was not getting an error on the circuitpython side. It seemed to think that the response was returned successfully, on the client side it knew the content-length, but believed that it had received 0 bytes.

onyx hinge
#

huh! yes I would have expected a MemoryError in that kind of situation. I guess I only assumed that was part of what was happening

lone axle
#

I'll get an issue created with everything I found about it.

onyx hinge
#

OK

#
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
MemoryError: memory allocation failed, allocating 158208 bytes
```Just reading a big file into memory gives a MemoryError. But .. you're working with HTTP server, not HTTP client?
#

Is the limit above or below 8kB?

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0-beta.1-21-gfc549fe34 on 2022-10-07; Raspberry Pi Pico W with rp2040

and

Adafruit CircuitPython 8.0.0-beta.2 on 2022-10-14; Adafruit Feather ESP32-S2 TFT with ESP32S2
Board ID:adafruit_feather_esp32s2_tft


### Code/REPL

```python
import json
import ssl

from secrets import secrets  # pylint: disable=no-name-in-module
import time
import microcontroller
import socketpool
import wifi
import adafruit_...
lone axle
manic glacierBOT
idle owl
#

@lone axle Hey. So, I'm working with the LTR-303 and 329 (which are basically the same thing except 303 has an int pin and interrupt capabilities). The int pin is broken out to the header on the 303. My assumption was, you create an object with the pin, and then poll the pin and then do something with that. I seem to be wrong, or not understanding it properly, because in the example, "interrupt capability" is simply enabled, with no pin assigned, and evidently used. Here is the example. https://github.com/adafruit/Adafruit_CircuitPython_LTR329_LTR303/blob/main/examples/ltr303_advancedtest.py

#

I guess what's confusing me is, if you're not polling that pin, and the interrupt capability is an internal thing, why is the pin broken out to the header?

#

Or maybe it's an internal thing that you can also poll if you wanted to?

lone axle
idle owl
#

(I'm writing the guide for this, and want to make sure I'm understanding it properly, and explaining what needs to be explained, and avoiding what doesn't.)

lone axle
#

As far as I can tell that example that you linked enables the mode so that the sensor will flip the INT pin high and low for you to notice, but the example doesn't actually poll it. So it's enabled but ignoring it if I understand correctly.

idle owl
#

Uff.

#

That's what confused me.

lone axle
#

I think in order to use it (beyond just enabling) you'd need to connect this pin to an IO on your microcontroller:

idle owl
#

That's what I thought

lone axle
#

then set up a DigitalInOut with which ever pin you connected and then you'd be able to pull it's value to see the change.

idle owl
#

Exactly what I thought

#

I was even prepared to wire it up that way over here for testing.

ember iris
#

Looking at the code, it reads to me that you can set the conditions on the LTR-303 so it toggles the pin under specific light conditions. That way, if your board is suppose to change behavior when the light changes, that pin can be a simple way to identify that the light has changed without requiring your code to constantly check the LTR-303

idle owl
#

But then there was no pin in the code.

idle owl
#

Am I understanding what you're saying correctly?

ember iris
idle owl
#

(Sorry I'm being redundant here, simply trying to understand.)

manic glacierBOT
#

Working under the hypothesis that the consistent ~10 sec time it takes is a timeout somewhere taking over I wrote this script to try the request from CPython and output the results:

import requests
import time

link = 'http://192.168.1.132:80/testsize'
before = time.time()
request_from_link = requests.get(link, timeout=60)
print(f"took {time.time()- before}")
print(request_from_link.headers)
print(request_from_link.content)

Even though the timeout is set higher in the r...

lone axle
#

Yep, I believe you're understanding is right. It would need to be physically connected to an IO on the microcontroller and have code somewhere "watching" it in order for it to make any real difference.

idle owl
#

(Dealing with brain fog, so things are more difficult to grasp at the moment. 😕 )

ember iris
#

(No problem I'm lifting my head out of a mountain of code and very slowly re-realizing how to word things)
Yes, if you're going to change your device behavior on the interrupt it should be connected, but looking at the example I think it's just showing it's an alternate option to interact with the LTR-303, not a required way to engage with the LTR-303

idle owl
#

Ok.

#

I think I'll ask Limor why the code does nothing physically with the int pin, so I know from the author what the reasoning was. I was going to include an example in the guide using the int pin, but there isn't one, not really anyway. So that might not end up happening.

ember iris
#

I think it's presence in the advanced test is to test that those commands are being set

idle owl
#

Either that, or update that example if she wants me to. But I'm basically certain that won't be the answer.

#

Fair enough ok

#

Welp, it's snowing here.

#

Thanks @lone axle and @ember iris . It seems I was right in what I was thinking, and now I can ask Limor a smarter question, which is always better.

lone axle
#

yep, you're welcome 👍

ember iris
onyx hinge
#

@lone axle should probably try decreasing the 8192 in the file down to something like 2048 or lower: ``` def _send_file_response(self, conn, filename, root, file_length):
self._send_bytes(
conn,
self._HEADERS_FORMAT.format(
self.status, MIMEType.mime_type(filename), file_length
),
)
with open(root + filename, "rb") as file:
while bytes_read := file.read(8192):
self._send_bytes(conn, bytes_read)

lone axle
#

I'll give it a try

lone axle
ember iris
ember iris
manic glacierBOT
onyx hinge
manic glacierBOT
#

I tested this successfully with a Pico W using the slightly modified version of code from the issue:

print(f"ipv4_gateway    : {wifi.radio.ipv4_gateway}")
print(f"ipv4_subnet     : {wifi.radio.ipv4_subnet}")
print(f"ipv4_address    : {wifi.radio.ipv4_address}")
print(f"ipv4_dns        : {wifi.radio.ipv4_dns}")

wifi.radio.connect(secrets["ssid"], secrets["password"])

print("---------------------")
print(f"ipv4_gateway    : {wifi.radio.ipv4_gateway}")
print(f"ipv4_subnet     ...
onyx hinge
#

@lone axle OK I reproduced the "2920 problem" without requests. I still think a smaller buffer might be in order there -- 8192 bytes can be a lot of heap -- but there's clearly a core problem.

#

send(2921 bytes) waits awhile, says it succeeded, but nothing is received on the other end

lone axle
#

@onyx hinge changing to a smaller buffer size inside httpserver does seem to fix it! I was able to return the 2921 sized file.

And for what it's worth it seems consistently faster than it was before. Taking about 1/4 to 1/3 the amount of time to transfer same data as old version (plus succeeding on 2921). I'll PR httpserver.

onyx hinge
#

OK please file a core issue though, the 2921 thing is real

lone axle
#

Is it expected to get [Errno 112] EADDRINUSE when resetting with soft reset by saving a file and/or ctrl-c / ctrl-d on the pico w? I've noticed I get that most times when it resets for those reasons. microcontroller.reset() fixes it when it comes back up from that.

#

made one here. I'll change the title to include the 2920 reference though.

onyx hinge
#

EADDRINUSE with a server? sort of. I'm not clear on the details. There's supposed to be a socket call that you can make to change the behavior. maybe CP should always make it implicitly; I haven't checked if espressif port does this, or done servers on espressif much either https://stackoverflow.com/questions/3229860/what-is-the-meaning-of-so-reuseaddr-setsockopt-option-linux

lone axle
manic glacierBOT
#

Similar to @fomayguy's results, I did it in boot.py, then again in code.py:

boot.py output:
#### boot.py ####
None
None
None
None
Connecting..........
192.168.6.202
192.168.4.1
255.255.252.0
1.1.1.2

#### code.py ####
192.168.6.202
192.168.4.1
255.255.252.0
1.1.1.2
Connecting...
192.168.6.202
192.168.4.1
255.255.252.0
1.1.1.2

We should retest this when we have a code mechanism to disconnect (e.g., wifi.radio.enabled = False or wifi.radio.stop_station()) to...

idle owl
#

@ember iris @lone axle The final decision is to use that example, but show wiring an LED directly to the interrupt pin, to see when it's high and low. Thanks again!

lone axle
#

Nice, I like that idea. Makes it possible for user to see what it does without adding any complexity to the code.

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.0.0-beta.2-9-g5192082e6 on 2022-10-16; Raspberry Pi Pico W with rp2040

Code/REPL

>>> import board
>>> import pulseio
>>> p = pulseio.PulseIn(board.GP26)
Traceback (most recent call last):
  File "", line 1, in 
ValueError: GPIO29 in use
>>> import digitalio
>>> d = digitalio.DigitalInOut(board.GP26)
>>>

Behavior

PulseIn is confusing GP26 with GP29? But DigitalInOut is OK.

Description

_N...

ember iris
manic glacierBOT
proven garnet
manic glacierBOT
#

There are a variety of uses cases for wanting to: disconnect; turn off STA (and/or AP); even deinit wifi (we don't have that currently).

• reduce resource consumption (power, ram)
• re-initialize from code without a hard reset as an escalation when network issues arise
• disconnect from one SSID to reconnect to another
• disconnect from an SSID generally to reconnect to an AP at a specific BSSID and/or channel
• turn off STA to run AP-only (TBD future for PiCow)
• ?
• profit
;-)

#

Recording some notes:

I did a debug build and added some logging to catch where it's hanging:

V (639) esp_image: loading segment header 4 at offset 0x1838cc_cache_and_start_app
D (778) boot: configure drom and irom and start
V (783) boot: d mmu set paddr=00010000 vaddr=3c130000 size=301864 n=5
V (789) boot: rc=0
V (791) boot: i mmu set paddr=00060000 vaddr=42000000 size=1194156 n=19
V (798) boot: rc=0
D (800) boot: start: 0x40382394
I (814) cpu_start: Pro cpu up.
D (815) efus...
manic glacierBOT
#

RV32IMC: the base 32-bit instruction set, with "M" (integer multiplication & division) and "C" (compressed instruction) support. Notably, without "F", it would be software floating point.

RV32GC: "G" is "Shorthand for the IMAFDZicsr_Zifencei base and extensions" and "C" is compressed again. That alphabet soup says there's support for things like atomic instructions, single and double precision floating point arithmetic, and a few others.

So RV32GC is strictly a superset of IMC. https://...

onyx hinge
#

it has two good test results as far as I understand the responses.

blissful pollen
#

if he's not here i can approve it in a couple min

onyx hinge
#

Thanks!

proven garnet
manic glacierBOT
#
  • Fix large send() requests on stream packets. Now, they will correctly send only part of the buffer. Typically, 2920 bytes (2×MSS) can be sent on an idle socket, or 1460 bytes (1×MSS) on a socket that's recently seen a transmission. This has always been according to the documentation of send but previously send was expected to act like sendall by e.g., adafruit_httpserver.
  • Add sendall(), compatible with CPython, to send a whole buffer with multiple underlying send calls.
  • Whe...
onyx hinge
#
[tio 19:50:25] tio v1.32
[tio 19:50:25] Press ctrl-t q to quit
[tio 19:50:25] Connected
^[]0;🐍
``` I just got an incomplete status bar message escape code with tip-of-main. I had been at the REPL ">>>" prompt but stopped & re-started my terminal program. Can't reproduce it.
#

though the fact that it says "^[" makes me wonder if somehow it was still the stty echo problem that's a linux bug. I'm gonna choose "not caring" on my bingo card

manic glacierBOT
manic glacierBOT
#

CircuitPython version

Current `main` branch as of 10/17/2022. https://github.com/adafruit/circuitpython/commit/6e350a65cf6fa625aa4f2f213ad4e733dffc85f7

Code/REPL

This works: `make BOARD=raspberry_pi_pico_w`

This doesn't: `make BOARD=raspberry_pi_pico_w CFLAGS=-DMICROPY_DEBUG_PRINTERS=1`

Behavior

Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
../../extmod/ulab/code/numpy/poly.c:15:10...
manic glacierBOT
#

I mostly enable it on a file by file basis by manually making DEBUG_print be defined appropriately.

diff --git a/ports/raspberrypi/common-hal/socketpool/Socket.c b/ports/raspberrypi/common-hal/socketpool/Socket.c
index 37c37445de..1c73eb23e4 100644
--- a/ports/raspberrypi/common-hal/socketpool/Socket.c
+++ b/ports/raspberrypi/common-hal/socketpool/Socket.c
@@ -56,8 +56,8 @@
 
 #define MICROPY_PY_LWIP_SOCK_RAW (1)
 
-#if 0 // print debugging info
-#define DEBUG_printf DEB...
#

I have a simple setup with an RP2040 feather controlling some neopixels and am trying to get it to reliably deep sleep when not in use. I have a vibration switch between GND and A2, and am sleeping until the vibration switch gets triggered using

pin_alarm = alarm.pin.PinAlarm(pin=board.A2, value=False, pull=True)
alarm.exit_and_deep_sleep_until_alarms(pin_alarm)

This works great and my current consumption goes from ~28mA to ~2mA once it gets to sleep. But if I happen to tr...

manic glacierBOT
#

Tested forcing disconnection by setting power management with very aggressive parameters. IPv4 address shows None several minutes after a successful connection + IP transactions. First re-attempt at an IP transaction after Ipv4 = None gets the expected Errno 2, but code can successfully re-connect and perform IP transactions. Rinse, repeat.

Closing, fixed by #7075. There may be nuances, but the code in this area is changing rapidly, so anything new that arises should be a separate is...

manic glacierBOT
manic glacierBOT
#

wifi disconnection

After fresh reset, IPv4 properties populate immediately after connection, and de-populate immediately (to None) after a disconnect is triggered by wifi.radio.stop_station().

>>> wifi.radio.ipv4_address, wifi.radio.ipv4_gateway, wifi.radio.ipv4_subnet, wifi.radio.ipv4_dns
(None, None, None, None)
>>>
>>> wifi.radio.connect(secrets["ssid"], secrets["password"]) ; wifi.radio.ipv4_address, wifi.radio.ipv4_gateway, wifi.radio.ipv4_subnet, wifi.radio.ipv4_dn...
manic glacierBOT
midnight ember
#

@onyx hinge thank you for the hug report during the meeting. I’ve been hashtagging circuit Python on twitter to submit stuff to the newsletter. I assumed that was a valid way to submit? Is there a different preferred method? Finding the newsletter on GitHub through searching I’ve found to be slow and often frustrating. Then I think I have to make a pr which gives me anxiety. Does the newsletter have its own repo I can fork? I LOVE the google doc format the meeting uses. It works phenomenally well. If it was as simple as that to submit to the newsletter I’d definitely use that method instead.

thorny jay
# midnight ember <@426200547024961539> thank you for the hug report during the meeting. I’ve been...

That would be a question for @turbid radish.

My preferred way to contribute is to tag #CircuitPython when I am microblogging my project (that is very useful as I am only blogging there an nowhere else except gist).

I think if you send to cpnews@adafruit.com it will reach Anne (and Mister Lady Ada) or whoever is on duty, that would be how I contribute for project I am not the author.

I don't think I ever touched the newsletter on the github (maybe once I had to remove an entry because of a misunderstanding and it was not a CircuitPython project at all). First I am lazy, and I did not feel right to self-promote one of my project in someone else newsletter (even if it is a PR that could be refused), I prefer a human to decide if it is worst it or not... even if most of the time I hope to benefit from the newsletter publicity. 🙂

I am not sure the Google Doc workflow is right for the newsletter... but I can think or more convoluted way to produce a newsletter, where there would be "news snippets" (a picture, a description, a link, a few keyword) and then building the newsletter would be about selecting the one to talk about, the order, and some highlight. Maybe this is more or less what is happening, and some news/projects make it to the newsletter, other to the blog.

#

🏗️ 🚧 🧱 sorry for the wall of text.

random junco
thorny jay
manic glacierBOT
#

I think this is a question of which chip/module pins are mapped to which Feather edge pins. It sounds like the FeatherS3 does not match pins with the capabilities needed with what the FeatherWing expects. We discussed this in discord. I think you have the pin info you need now, so closing. Please reopen if this is an issue that can be addressed in the circuitpython core.

manic glacierBOT
#

I'm happy to test for you, but I've never got artifacts from a PR build before. So I will appreciate your instructions.

Click on the "Details" link on a board build below. ![image](https://user-...

Hi Dan,

Thanks for taking the time to post these instructions. I didn't get to use them this time, but I've stored them for future reference and I'll play with them a bit, so I can learn a new skill.

midnight ember
#

So I forked the newsletter, do not recommend. It was like 4GB. Then read on the newsletter github page they recommend editing the draft in markup from the site, not forking it. That should be easier to work with as I prefer using github site over submitting nailbiting PR's anyway.

random junco
#

Sorry! I send in a PR every week, never thought about editing it straight in markup on Github

manic glacierBOT
#

@MicroDev1 Since the failure is happening very early, in startup.c, it's not CircuitPython code that's failing. So I would suspect something about our sdkconfig or build process. I'm not sure what I will do next, but I may try to build a simple ESP-IDF example for the C3 and look at its sdkconfig and build log. If you have some ideas or have something to try yourself, let me know. Thanks.

brazen hatch
#

My uni got enterprise.
Basically you need username and password for it.

manic glacierBOT
#

I've got a project that goes in to deep sleep and waits for a button press to do something, but having to wait for 1 second to make sure I don't want to boot in to safe mode kills the project. It would be really great to make the safe mode boot behavior configurable to give the option for projects that spring to life more when they wake from sleep or even when they get connected to power. For most of my projects there's an early phase when I'm very thankful for features like this that prot...

midnight ember
tulip sleet
manic glacierBOT
random junco
midnight ember
#

Coming from you Dan that's good enough for me. 🙂

random junco
#

I don't understand what they mean by create a PR to track low code or non-code contributions though

tulip sleet
#

@midnight ember I can transfer the issue, but it still is a pin mapping thing. Is there something the library can do about it.

#

for the localtime thing, is there a place to contribute an example that could be a PR? I'm not sure what a no-code PR would be.

midnight ember
#

I honestly don't know because I can't trace the physical pins easily to compare the pinout from the physical ESP chip vs Adafruit board that is working. I have no idea why it's not working. Could be user error sure, I've had my fair share of making mistakes lately especially with the lora board wiring. All I know is it's not working, no one in discord can explain why, so I really don't know what to do. There's an incompatibility that exists somehow and it's over my head.

tulip sleet
#

I think if you compare the colorful pin diagram for the Feather S3 (s2?) vs our similar Feather, you can see what the differences are. The peripheral we are working only works on certain pins or certain sequences.

#

see what the pins are with our Feather, and then try to use the same on the UM Feather. But it may be that some pins are not exposed, since the Feather does not have enough room to break out all the pins

midnight ember
#

the pretty pin diagram only shows the pinouts which could be coming from any gpio out of the esp chip. i need to verify each pinout of the esp is the same. while i'd love to take UM at his word i really do need to verify the routing.

tulip sleet
#

the pin diagram labels which GPIO is which. It should be correct. I don't think UM would let a mistake stand, because someone writing code depending on the diagram would say "GPIO13 isn't working", etc.

#

you could just toggle each pin as GPIO to verify the routing

#

just in the REPL, etc.

midnight ember
#

ok so if the pins are all 100% correct, then has to be a software bug, hence the bug report?

tulip sleet
#

I wouldn't call it a bug, it's that the pins the featherwing needs and takes from our feather are not the same as the pins on the UM Feather

midnight ember
#

but he said they're the same... this is the dilemma

#

something doesn't add up

tulip sleet
#

i didn't know he said they were the same; his board was first, and we didn't try to copy his board

#

when we did our own layout

midnight ember
#

oh i didn't know that, thought it was the other way around

tulip sleet
#

just put the diagrams next to each other and look

midnight ember
#

well he said it was the same in the UM discord when i asked him. again, i have no way to verify. i guess i could toggle each gpio, will probably have to do that.

#

i have and they match up!

#

hopefully you can see why this is confusing, something doesn't add up.

tulip sleet
#

yes, I would say to toggle each one, on each board

#

ok now I understand; I was making no assumptions about pin matchup. Which one is this? FeatherS3 or S2?

midnight ember
#

UM FeatherS3

#

compared to Feather M0 & ESP32-S2 & S3 since that's what i know works with the matrix featherwing.

tulip sleet
#

it would be good to compare the board files in CircuitPython as well. There could be a typo in one or the other

midnight ember
#

didn't think of that.

tulip sleet
#

and it could be something about how protomatter is detecting the board type, maybe there is a bug in the compile-time flags

midnight ember
#

i know the arduino part of the library has variants explicitly in it but couldn't find something like that in the CP side.

tulip sleet
#

so protomatter is being compiled incorrectly for the FeatherS3 but not our Feather. But are you saying it works on the Adafruit Feather ESP32-S3, and not on the UM FeatherS3?

#

like and like?

midnight ember
#

was looking through arch.h and that was over my head.

#

correct.

#

i have video demos to prove it, was confirming they work because they're not specifically listed in the rgb matrix featherwing guide.

#

so was doing a nice thing to have those added as confirmed working.

#

dynobot you vex me.

#

if there's a mislabeled pin on the M0/M4/RP2040/ESP32-S2/ESP32-S3 feathers it would have to exist on all of them. because the matrix featherwing works with all of them, it only doesn't work with the UM FeatherS3.

analog bridge
#

What would be the place to put code that is shared between multiple modules at the shared-bindings level?

#

Example: microcontroller.nvm and alarm.sleep_memory have very similar code in shared-bindings

proven garnet
#

Any PR you submit with the hacktoberfest-accepted label will count. So either an empty commit or even a junk commit you submit should be good, we should draft it to prevent merging, and we'll just slap that label on it

tulip sleet
#

seems like that might be fine; its entries are not tied to module names

proven garnet
#

So either of those options should work @midnight ember

#

Get that sweet Hacktoberfest cred

#

I can help you with that if you submit the PR 🙂

midnight ember
#

I don’t see how I could turn that into a pr other than submitting it as a class for the time library. I don’t want to cheat and do a junk pr. Would rather everything be up to snuff. If it’s not good enough to be accepted by hacktoberfest then it’s not good enough.

tulip sleet
#

if you find a guide it could be put in, it could be a PR to the learning guides repo

#

it could even be a PR to that as an example that might be used in the future

idle owl
#

@tulip sleet Good afternoon. Jeff will be back in about an hour. Are you interested in doing a bug triage session then?

tulip sleet
tulip sleet
#

did Jeff suggest one?

idle owl
#

Yesterday, yes. I'm following up on that.

tulip sleet
#

I think he saw about half a dozen that had no milestone, but they are all gone now

idle owl
#

Alright that works too.

tulip sleet
#

I would like to talk to you about where to put the "CircuitPython limitations" information. I think it belongs somewhere, either in guides or rtd or both.

idle owl
#

We can talk about that, sure

tulip sleet
#

we keepp bumping into S3 BLE limitations for instance.

#

okee, video or audio is fine

idle owl
#

Let's vid.

proven garnet
manic glacierBOT
#

Possibly unrelated: When leaving out pins C14 and C15 from the key matrix, a much quicker press of many keys at once (quicker and more keys than the aforementioned "quickly pressing eight keys simultaneously") can stop the detection of any further events. Even if row_pins and column_pins each are fewer than ten pins. Increasing max_events doesn't help. Weirdly though, decreasing it to max_events=8 seems to prevent this problem when pins C14 and C15 are left out. So it seems that `keyp...

old smelt
jaunty juniper
#

yeah, can't start a service, so no HID, no UART server (no bluefruit app), etc. but you can connect to another board or send advertisement between boards like adafruit_BLE_radio does for example

glad mantle
#

so I've been trying to set up a build environment on linux following this guide:
https://learn.adafruit.com/building-circuitpython/linux

ultimately I need to create a .uf2 for a pcb with an embedded rp2040

I think I'm stuck on installing the toolchain or adding it to my PATH correctly

Adafruit Learning System

How to build CircuitPython yourself on different platforms

jaunty juniper
#

@glad mantle what problems are you encountering ?

#

like errors ?

glad mantle
#

so when I just went to do a test build I get an error about no such file or directory "arm-none-eabi-gcc"

#

since that was file in the example in the tutorial, I'm not sure I got the right toolchain

jaunty juniper
#

that would be that step:

export PATH=/home/$USER/bin/gcc-arm-none-eabi-10-2020-q4-major/bin:$PATH
glad mantle
#

I think I may have made another error

#

that precipitated this

#

I used the cortex a build, because I believe I misread the description

#

cortex a should be for the "normal" pi boards, right?

#

not the rp2040 based boards

jaunty juniper
#

yeah it's the linux Raspberry Pis

glad mantle
#

ok

#

so I need the cortex-m toolchain

jaunty juniper
#

the RP2040 is M

glad mantle
#

ok.... let me see if all of that makes a difference and I'll check back later if I'm still stuck

#

thanks

lone sandalBOT
candid sun
#

i wanted to see if anyone had any thoughts here on this issue that i'm investigating from the forums: https://forums.adafruit.com/viewtopic.php?p=944133 . basically, it's this project for the pyportal (https://learn.adafruit.com/using-microsoft-azure-iot-with-circuitpython) that throws an error "no module named 'ssl'" while importing the azureiot lib and i've been getting the same error on cp7 and 8. it looks like ssl is not a built-in module on the pyportal, so would that be causing that issue? and if so, are there plans to add it to the pyportal?

Adafruit Learning System

Monitor your plant's vitals by combining CircuitPython with Microsoft Azure IoT

glad mantle
#

ok... so I got the (hopefully) correct toolchain now, and extracted that into a folder

#

and then I thought added the correct thing to my bash profile

#

but it still doesn't seem to be pointing to it correctly

#

or whatever the right terminology is

candid sun
jaunty juniper
#

unless there is a bug in the library with imports

#

which seems to be the case since the import ssl has been added but is not used I think ?

candid sun
#

yes, i was also trying the esp32spi simpletest for azure but am getting another error when esp.get_time() is called (returning 0)

jaunty juniper
#

yeah that's part of the API, esp.get_time() must be in a try/except, it takes a few seconds before it starts returning correct values

candid sun
#

okay, thank you. i'll put in a try/except and see if i can get further with the simpletest at least. i've only used azure with native wifi previously

jaunty juniper
#

ah and the error has changed from ValueError

#

I saw that recently, lemme check

#

yeah it's an OSError now

#

yeah the try/except is there, but the error has changed

#

it makes sense, since a value error implies a value passed by the caller, but now we have to update things 😉

candid sun
#

so i added a try/except for OSError and was able to get the time (woo!) but the same ImportError: no module named 'ssl' occurred when it tried to import IoTCentralDevice..

glad mantle
#

I'm still getting this error if I try to just make one of the boards that are already in circuit python:
FileNotFoundError: [Errno 2] No such file or directory: 'arm-none-eabi-gcc'

proven garnet
glad mantle
#

nothing

#

no error, just nothing

#

gives me a new line

jaunty juniper
proven garnet
#

You'll need to follow @jaunty juniper's advice, and add the location of that file to your path,

glad mantle
#

I did... at least to the best of my ability

#

so that may be where I have messed up

jaunty juniper
#

did you start a new shell ?

glad mantle
#

I restarted the computer

#

if that does it

#

I added this to my .profile

#

export PATH=/home/ziptyze/bin/gcc-arm-none-eabi-10.3-2021.10/bin:$PATH

#

if that looks correct

jaunty juniper
#
  • I woud check it's correct by looking at what's in it
  • I would check that your shell correctly uses .profile by adding an echo in it or something
glad mantle
#

you may have to point me in the right direction for doing those things

#

I am more of a hardware guy, so this is all pretty new to me

jaunty juniper
#

well first what does this do ?

ls /home/ziptyze/bin/gcc-arm-none-eabi-10.3-2021.10/bin
#

is there arm-none-eabi-gcc in there ?

glad mantle
#

it is

jaunty juniper
#

ok then what does this do ? do you see the gcc-arm path in it ?

echo $PATH
glad mantle
#

nope

jaunty juniper
#

so what is your shell ?

#
echo $SHELL
glad mantle
#

/bin/bash

jaunty juniper
#

is there a /home/ziptyze/.bash_profile ?

glad mantle
#

originally no

#

then I made one

#

which didn't seem to make a difference

#

so then I got rid of it

jaunty juniper
#

is there a .bashrc ?

#

ah

glad mantle
#

yes, there is that

jaunty juniper
#

try putting it there

glad mantle
#

at the end of everything that's in there?

#

there are 117 lines of stuff in that file

jaunty juniper
#

meh anywhere

glad mantle
#

k

#

did that and saved

#

closed the terminal

#

and now reopening

#

ok.... now if I do the echo $PATH it shows that line in there

jaunty juniper
#

progress !

glad mantle
#

yes! it compiled a uf2 for a pico

#

now to set one up for my board

#

it was not quick....

#

thank you for all of your help

jaunty juniper
#

ah keyboards !

midnight ember
#

quick someone hide that before jepler sees it and takes on another keyboard project

tulip sleet
glad mantle
# jaunty juniper ah keyboards !

yeah, we now have two 60%'s that have embedded rp2040s. currently we are using qmk firmware, but we want to give the option for circuit python as well, particularly because we put a qwiic/stemma connector on it. I'm very interested to see what people can do with it

#

I had honestly never used python before the picos/2040 came out, and I tried using one of the pro micro footprint rp2040 boards on one of our macro pads when 7 was still in beta, and I was impressed how quickly I was able to get a working keyboard going using the default libraries and very little prior knowledge

#

now switching our lineup to rp2040s instead of 32u4's is a no-brainer, both with capability and price

glad mantle
#

is that somewhere else, or is that guide not up to date

jaunty juniper
#

yeah the pico doesn't have a lot of defaults

#

look at the feather RP2040

glad mantle
#

both of those boards should have a status led though, and I don't see it defined on either

#

I'm curious about that because my board has no status led, so I want to make sure it's not defined somewhere else and I'm wasting a pin

#

looks like it is defined in the pins.c file though

#

so I don't know if it needs to be defined both places

jaunty juniper
glad mantle
#

so even though it's on there, it'

#

it's not setup by default to be used for the status?

#

it's just there if people feel like turning it on

jaunty juniper
#

if it's defined that LED will be used as a monochrome status LED

glad mantle
#

but in the default uf2, then no?

jaunty juniper
#

I think it should be defined in the pico now that I think about it, don't know if there was a reason to omit it

glad mantle
#

well... just making sure I understand it correctly I guess

jaunty juniper
#

if you don't have an LED, you don't need to do anything about it

glad mantle
#

the way it's defined in the pins.c file is just giving it an extra way to be called in code right?

#

like you can refer to it as led or gp25

jaunty juniper
#

pins.c defines names for python access to pins

#

and default busses

glad mantle
#

so if it has two definitions you can use either?