#Hi, I'm working on adding board support

1 messages · Page 1 of 1 (latest)

soft frigate
#

Note that there were changes to the settings style for mpconfigboard.mk and sdkconfig between 8.x.x and 9.0.0. Make sure you are using the style for the branch you are compiling on.

#

Do you have an Adafruit board that does do web workflow correctly?

balmy shadow
#

Some microcontroller boards have a shorter WiFi range than would be expected, Try placing the board as close the router as possible and then power cycle/reset the board.

vast garnet
# soft frigate Note that there were changes to the settings style for `mpconfigboard.mk` and `...

Hi, i branched off 9.0.0-alpha.6 tag and I think I'm using the new style, but honestly I haven't found any precise documentation for those changes and just looked at other people's mpconfigboard.mk and sdkconfig. Unfortunately, I don't have any other board at my disposal, but this board that I'm working on supporting is almost the same as Hardkernel's ODROID GO which does, as far as I know, does support Web Workflow. I used CIRCUITPY_CREATOR_ID and CIRCUITPY_CREATION_ID from ODROID GO because I see that Web Workflow needs these variables to be set and I still didn't register Creation ID for this board but I don't think it should cause a problem since those are valid IDs. I would like to attach my compilation log and link to my fork where you can see all the changes. Thanks!

https://github.com/adafruit/circuitpython/compare/main...lovrojakic:circuitpython:board-support-for-vidi-x

GitHub

CircuitPython - a Python implementation for teaching coding with microcontrollers - Comparing adafruit:main...lovrojakic:board-support-for-vidi-x · adafruit/circuitpython

vast garnet
#

Thank you for your suggestion!

#

Is it possible that Web Workflow somehow depends on one of these REPL functions because when compiling I get a warning about them being defined but not used. Still, I get no errors, and the REPL works just fine over serial connection.

[713/775] Building C object esp-idf/console/CMakeFiles/__idf_console.dir/esp_console_repl.c.obj /home/lovro/circuitpython/ports/espressif/esp-idf/components/console/esp_console_repl.c:479:13: warning: 'esp_console_repl_task' defined but not used [-Wunused-function] 479 | static void esp_console_repl_task(void *args) | ^~~~~~~~~~~~~~~~~~~~~ /home/lovro/circuitpython/ports/espressif/esp-idf/components/console/esp_console_repl.c:375:18: warning: 'esp_console_common_init' defined but not used [-Wunused-function] 375 | static esp_err_t esp_console_common_init(size_t max_cmdline_length, esp_console_repl_com_t *repl_com) | ^~~~~~~~~~~~~~~~~~~~~~~ /home/lovro/circuitpython/ports/espressif/esp-idf/components/console/esp_console_repl.c:354:18: warning: 'esp_console_setup_history' defined but not used [-Wunused-function] 354 | static esp_err_t esp_console_setup_history(const char *history_path, uint32_t max_history_len, esp_console_repl_com_t *repl_com) | ^~~~~~~~~~~~~~~~~~~~~~~~~ /home/lovro/circuitpython/ports/espressif/esp-idf/components/console/esp_console_repl.c:329:18: warning: 'esp_console_setup_prompt' defined but not used [-Wunused-function] 329 | static esp_err_t esp_console_setup_prompt(const char *prompt, esp_console_repl_com_t *repl_com) | ^~~~~~~~~~~~~~~~~~~~~~~~

vast garnet
#

I also thought about it being a firewall problem, but I have never had a problem accesing a webserver from on local network and I have also tried to connect it to my phone's hotspot.

soft frigate
soft frigate
soft frigate
#

i will see if I can load your actual build on something similar

#

what module are you using, if any?

#

ESP32-WROVER-blah-blah, etc.

vast garnet
vast garnet
#

lovro@pop-os:~$ python3 esptool/esptool.py flash_id
esptool.py v4.7-dev
Found 1 serial ports
Serial port /dev/ttyUSB0
Connecting......
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting.......
Detecting chip type... ESP32
Chip is ESP32-D0WD (revision v1.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 4c:11:ae:e6:53:28
Uploading stub...
Running stub...
Stub running...
Manufacturer: c8
Device: 4017
Detected flash size: 8MB
Hard resetting via RTS pin...

soft frigate
#
  1. commented out everything in board.c because the board I am using does not have a display
#

I installed the build on an Adafruit Feather ESP32 V2, which is 8M flash 2M PSRAM. I can get to the wifi workflow after creating a settings.toml manually in the REPL

#

I suspect various things:

#

settings.toml is not quite right

#

your local wifi does not support mDNS for some reason

#

do you have zero other ESP32 boards?

#

not sure if the freq change in 2. above is necessary (the size change certainly is), but I seemed to have trouble when I didn't do that

#

the module is an ESP32-PICO-MINI-02

vast garnet
#

Hi @soft frigate , thank you for taking the time and trying!
I don't have any other ESP32 boards (I'm still a student and this is for a university project), but I could probably borrow some, if not then buy...

I have a few questions:

  1. How can I find the frequency of flash and psram? How do I find the size correct sizes?
    Attached screenshot is from https://www.espressif.com/sites/default/files/documentation/esp32-wrover-b_datasheet_en.pdf and I'm not sure which flash do I have, but python3 esptool/esptool.py flash_id returned Detected flash size: 8MB, so I went with that...

  2. Can you tell me how to correctly create settings.toml?
    I tried setting the settings.toml with REPL and with Thonny, using this tutorial https://learn.adafruit.com/circuitpython-with-esp32-quick-start/setting-up-web-workflow. Both times the board connected to WiFi without any problems so I assumed everything was done correctly.

  3. About mDNS, I'm 100% sure that my local network supports it because i tried to start it manually and something interesting happened, firstly when trying to ping the board or curl the mDNS didn't work, but when I started mDNS manually with REPL, then it resolved, but i still got "Connection refused" on the actual webserver. It's like the init part of code didn't properly start the mDNS and Web Workflow. I tried playing with supervisor thru REPL, but I didn't get far... Do you know of any way to manually restart Web Workflow webserver or check the status of it? I attached the log of me starting mDNS and pinging before and after so you can maybe better understand what I meant.

balmy shadow
soft frigate
#

👆 I was also thinking you might not be using plain http://

balmy shadow
#

Well I wasn't having any luck reproducing this using ESP32 boards but I seemed to have stumbled on the same problem with a Pico W board. I was testing out a new board build using the Pico W which seems suspiciously coincidental, since that's a similar scenario to what @vast garnet was doing. It's getting late tonight so I'll hold off until tomorrow but I'm going to try a fresh Pico W. It's just a wild guess but I'm wondering if there's some networking problem being introduced by switching the USB vid/pid on a single device (single MAC address). Network caching of device information somewhere? I vaguely remember having netbios or some other windows network cache issues that caused problems back when I had to deal with such things.

#

On the Pico W, WiFi appears to be fully functional except for Web Workflow. The device shows up on the Web Workflow page of other CP boards running on the network. I can ping the Pico W from my host PC. I can run a script on the Pico W which goes out to the national weather service and get's 7 days worth of forecasts. I'll update with what I find during tomorrow's testing 😁

balmy shadow
#

A second Pico W seems to be behaving the same way so I started rolling back the firmware version. When I got back to 9.0.0.alpha.2 the web workflow page started to function although it usually doesn't fully populate and the chrome debug console indicates an "err_connection_reset" usually on welcome.js. Occassionally, the favicon.ico will fail to load with the connection reset message as well. If I hit the screen refresh button enough times, I can get a fully populated/functional page for the device using alpha.2.

balmy shadow
#

Scott put a web workflow fix in the SD card PR which has been stalled. The fix was an update to supervisor/shared/background_callback.c. I went ahead and grabbed that update and Web Workflow started behaving much better.

#

@vast garnet Can you try building/testing your firmware replacing supervisor/shared/background_callback.c with this file?

vast garnet
#

Compiling right now, I'll come to you with results in a few minutes! Thanks @balmy shadow

vast garnet
#

Tried a few times, didn't change anything, now I'm trying 9.0.0.alpha.2

vast garnet
#

What is this "%29"?

balmy shadow
#

I'm not too surprised, I still haven't seen the issue on my esp32 boards. I was hoping the pico w issue I was seeing was related but apparently you're running into something different.

#

Where is the "%29" from?

#

You might try bringing up the "Developer tools" screen and selecting the Network panel (on Chrome ctrl-shift-i or F12). The panel should tell you what modules are running and some error info, perhaps that will give us a clue as to what's going on.

vast garnet
balmy shadow
#

hmm, not seeing any clues....

vast garnet
#

Everything looks fine

#

I checked tcpdump if i got some icmp-port-unreachable messages which would indicate a firewall problem, but nope

#

It's like the mdns and webserver didn't start properly

#

And aren't listening

#

Is there any way to debug them or reload them from REPL?

vast garnet
balmy shadow
#

Not that I'm aware of, maybe the Adafruit folks will have some ideas. I guess the next thing I might try is building the firmware without the display init code in board.c in case you're bumping into some sort of limited memory issue. I think the only thing you need in the board.c file would be the #include "supervisor/board.h"

vast garnet
#

And #include "mpconfigboard.h" maybe?

balmy shadow
#

mpconfigboard.mk looks like your board has 8MB of RAM though, so that may not be of much help...

vast garnet
#

Could that information be wrong?

#

And all wrover-b have 8MB of psram soo...

balmy shadow
#

I don't know, but you could import gc, then type gc.mem_free() in the REPL and that should give you an idea if your memory is tight

#

I get confused about how memory is used in CP though, so that could be goose chase

vast garnet
#

Oh, I have a question that I wanted to ask, whats the difference between these two firmware images?

vast garnet
vast garnet
balmy shadow
#

I looked at the esp32 feather_huzzah which didn't have that include so I would say no. If it's needed you'll find out pretty quick when compiling