pimoroni / enviro

MIT License
101 stars 79 forks source link

enviro indoor pico #148

Closed foxalite closed 1 year ago

foxalite commented 1 year ago

1: With original firmware (0.0.2) I'm unable to connect to to pico by wifi, seem the dns server don't work.

2: Upgrade to firmware rev (0.0.9) I can setup the device (provisioning). After reset the device doe's nothing, no light etc. and I can't connect with thonny, so no log available.

3: Fresh flash with 0.0.9 without provisioning, I can connect to the device and setup de config.py. After save and restart de device, still doe's nothing, and still unable to connect with thonny.

4: Repeat step 3 without restart the device, and run main.py, device send 1 (one) time the datas to the mqtt broquer, and nothing more.

What's wrong ?

ZodiusInfuser commented 1 year ago

Hi @foxalite! That's a new one to me... Are you able to access the files on the Pico and post what the log.txt says?

foxalite commented 1 year ago

Hi @foxalite! That's a new one to me... Are you able to access the files on the Pico and post what the log.txt says?

No, I'm unable to connect to the pico with thony (see point 3) I can connect only without provisioning or with filesystem only .

Other thing I do, just try to blink onboard led with thony (with gpio 0) without succes (btw this don't work with a single pico w board also). But this work with arduino, so I think the pico is OK.

ZodiusInfuser commented 1 year ago

The LED on Pico W is not connected to GPIO0, but rather attached to the WiFi chip. It can be tested with this code:

import time
import machine
led = machine.Pin("LED", machine.Pin.OUT)

while True:
    led.off()
    time.sleep(1)
    led.on()
    time.sleep(1)

Could you try flashing the board with this version of micropython? https://github.com/pimoroni/pimoroni-pico/releases/download/v1.19.10/pimoroni-picow_enviro-v1.19.10-micropython.uf2

It's the same version as used by Enviro, but without the file system. You should try and nuke the board before doing this though: https://datasheets.raspberrypi.com/soft/flash_nuke.uf2

foxalite commented 1 year ago

Hi ZodiuInfuser, Same issue than v1.19.12

And thank you for the pin, seems the official documentation is wrong https://datasheets.raspberrypi.com/picow/PicoW-A4-Pinout.pdf

ZodiusInfuser commented 1 year ago

Sorry, could you elaborate on "same issue than v1.19.12"? Are you saying you're not able to interact with it even after flash_nuke and putting v1.19.10 on? Have you unplugged power after flashing? If so then I'm thinking that the board may be faulty, so it could be worth messaging support@pimoroni.com to ask for a replacement.

That official pinout is correct, they've just chosen a colour that's hard to read. It actually says WL_GPIO0, which is GPIO0 on the WiFi chip.

foxalite commented 1 year ago

Sorry for the misunderstanding, I was talking about this version pimoroni-picow_enviro-v1.19.12-micropython.uf2. that I also tried. Yes, I have unplugged the board.

I am able to access the board in all case before provisioning, but not after. Another thing after power on the LED just light 1 or 2 sec in yellow and nothing more.

Anyway Thanks a lot for your help and your time.

EDIT After a provisioning and reset with poke to renter in provisioning mode I got this log:

2021-01-01 00:00:02 [error / 121kB] > missing or corrupt config.py no module named 'config' 2021-01-01 00:00:02 [info / 119kB] > entering provisioning mode 2021-01-01 00:00:02 [info / 113kB] > auto detecting board type 2021-01-01 00:00:02 [info / 111kB] - indoor 2021-01-01 00:00:02 [info / 109kB] > going into access point mode 2021-01-01 00:00:05 [info / 107kB] - 192.168.4.1 2021-01-01 00:00:05 [info / 105kB] > starting dns server... 2021-01-01 00:00:05 [info / 103kB] > starting catch all dns server on port 53 2021-01-01 00:00:05 [info / 101kB] > creating web server... 2021-01-01 00:00:06 [info / 96kB] > waiting for a client to connect 2021-01-01 00:00:02 [info / 119kB] > entering provisioning mode 2021-01-01 00:00:02 [info / 118kB] > auto detecting board type 2021-01-01 00:00:02 [info / 116kB] - indoor 2021-01-01 00:00:02 [info / 114kB] > going into access point mode 2021-01-01 00:00:05 [info / 112kB] - 192.168.4.1 2021-01-01 00:00:05 [info / 110kB] > starting dns server... 2021-01-01 00:00:05 [info / 108kB] > starting catch all dns server on port 53 2021-01-01 00:00:05 [info / 106kB] > creating web server... 2021-01-01 00:00:05 [info / 101kB] > waiting for a client to connect 2021-01-01 00:00:24 [info / 95kB] - client connected! (b'\x90xA\xbe?\xe3',) 2021-01-01 00:00:24 [info / 93kB] > running provisioning application... 2021-01-01 00:00:24 [info / 91kB] > starting web server on port 80 2021-01-01 00:00:33 [info / 108kB] > GET /canonical.html (301 Moved Permanently) [326ms] 2021-01-01 00:00:35 [info / 78kB] > GET /wrong-host-redirect (200 OK) [93ms] 2021-01-01 00:00:36 [debug / 89kB] > parsed template: enviro/html/header.html (took 19 ms) 2021-01-01 00:00:36 [debug / 93kB] > parsed template: enviro/html/footer.html (took 7 ms) 2021-01-01 00:00:36 [debug / 91kB] > parsed template: enviro/html/welcome.html (took 317 ms) 2021-01-01 00:00:36 [info / 88kB] > GET /provision-welcome (200 OK) [502ms] 2021-01-01 00:00:37 [info / 73kB] > GET /images/pirate-logo.svg (200 OK) [819ms] 2021-01-01 00:00:37 [info / 99kB] > GET /images/logo-indoor.svg (200 OK) [909ms] 2021-01-01 00:00:37 [info / 93kB] > GET /images/guide-qr-code.svg (200 OK) [980ms] 2021-01-01 00:00:37 [info / 84kB] > GET /images/photo-indoor.jpg (200 OK) [1081ms] 2021-01-01 00:00:37 [info / 78kB] > GET /canonical.html (301 Moved Permanently) [564ms] 2021-01-01 00:00:38 [debug / 94kB] > parsed template: enviro/html/header.html (took 20 ms) 2021-01-01 00:00:38 [debug / 88kB] > parsed template: enviro/html/header-mini.html (took 9 ms) 2021-01-01 00:00:38 [debug / 79kB] > parsed template: enviro/html/footer.html (took 7 ms) 2021-01-01 00:00:38 [debug / 77kB] > parsed template: enviro/html/provision-step-1-nickname.html (took 305 ms) 2021-01-01 00:00:38 [info / 74kB] > GET /provision-step-1-nickname (200 OK) [662ms] 2021-01-01 00:00:39 [info / 102kB] > GET /images/pirate-logo.svg (200 OK) [460ms] 2021-01-01 00:00:39 [info / 98kB] > GET /images/logo-indoor.svg (200 OK) [529ms] 2021-01-01 00:00:39 [info / 94kB] > GET /images/guide-qr-code.svg (200 OK) [610ms] 2021-01-01 00:00:41 [info / 77kB] > GET /canonical.html (301 Moved Permanently) [249ms] 2021-01-01 00:00:44 [info / 101kB] > GET /canonical.html (301 Moved Permanently) [87ms] 2021-01-01 00:00:44 [info / 77kB] > POST /provision-step-1-nickname (301 Moved Permanently) [337ms] 2021-01-01 00:00:45 [debug / 90kB] > parsed template: enviro/html/header.html (took 20 ms) 2021-01-01 00:00:45 [debug / 85kB] > parsed template: enviro/html/header-mini.html (took 9 ms) 2021-01-01 00:00:45 [debug / 101kB] > parsed template: enviro/html/footer.html (took 10 ms) 2021-01-01 00:00:45 [debug / 98kB] > parsed template: enviro/html/provision-step-2-wifi.html (took 317 ms) 2021-01-01 00:00:45 [info / 96kB] > GET /provision-step-2-wifi (200 OK) [678ms] 2021-01-01 00:00:46 [info / 91kB] > GET /networks.json (200 OK) [989ms] 2021-01-01 00:00:46 [info / 84kB] > GET /images/pirate-logo.svg (200 OK) [1128ms] 2021-01-01 00:00:46 [info / 78kB] > GET /images/logo-indoor.svg (200 OK) [1238ms] 2021-01-01 00:00:46 [info / 75kB] > GET /images/guide-qr-code.svg (200 OK) [1303ms] 2021-01-01 00:00:47 [info / 107kB] > GET /canonical.html (301 Moved Permanently) [171ms] 2021-01-01 00:00:50 [info / 85kB] > GET /canonical.html (301 Moved Permanently) [88ms] 2021-01-01 00:00:53 [info / 106kB] > GET /canonical.html (301 Moved Permanently) [91ms] 2021-01-01 00:00:56 [info / 84kB] > GET /canonical.html (301 Moved Permanently) [96ms] 2021-01-01 00:00:59 [info / 107kB] > GET /canonical.html (301 Moved Permanently) [77ms] 2021-01-01 00:01:01 [info / 80kB] > POST /provision-step-2-wifi (301 Moved Permanently) [300ms] 2021-01-01 00:01:01 [debug / 89kB] > parsed template: enviro/html/header.html (took 65 ms) 2021-01-01 00:01:01 [debug / 84kB] > parsed template: enviro/html/header-mini.html (took 9 ms) 2021-01-01 00:01:01 [debug / 94kB] > parsed template: enviro/html/footer.html (took 11 ms) 2021-01-01 00:01:02 [debug / 91kB] > parsed template: enviro/html/provision-step-3-logging.html (took 351 ms) 2021-01-01 00:01:02 [info / 89kB] > GET /provision-step-3-logging (200 OK) [730ms] 2021-01-01 00:01:02 [info / 87kB] > GET /images/guide-qr-code.svg (200 OK) [661ms] 2021-01-01 00:01:02 [info / 84kB] > GET /images/logo-indoor.svg (200 OK) [723ms] 2021-01-01 00:01:02 [info / 80kB] > GET /images/pirate-logo.svg (200 OK) [800ms] 2021-01-01 00:01:03 [info / 108kB] > GET /canonical.html (301 Moved Permanently) [235ms] 2021-01-01 00:01:06 [info / 86kB] > GET /canonical.html (301 Moved Permanently) [274ms] 2021-01-01 00:01:09 [info / 107kB] > GET /canonical.html (301 Moved Permanently) [103ms] 2021-01-01 00:01:11 [info / 77kB] > POST /provision-step-3-logging (301 Moved Permanently) [423ms] 2021-01-01 00:01:12 [debug / 85kB] > parsed template: enviro/html/header.html (took 20 ms) 2021-01-01 00:01:12 [debug / 79kB] > parsed template: enviro/html/header-mini.html (took 8 ms) 2021-01-01 00:01:12 [debug / 97kB] > parsed template: enviro/html/footer.html (took 22 ms) 2021-01-01 00:01:12 [debug / 94kB] > parsed template: enviro/html/provision-step-4-destination.html (took 407 ms) 2021-01-01 00:01:12 [info / 91kB] > GET /provision-step-4-destination (200 OK) [756ms] 2021-01-01 00:01:12 [info / 76kB] > GET /images/logo-indoor.svg (200 OK) [95ms] 2021-01-01 00:01:13 [info / 98kB] > GET /images/pirate-logo.svg (200 OK) [485ms] 2021-01-01 00:01:13 [info / 91kB] > GET /canonical.html (301 Moved Permanently) [407ms] 2021-01-01 00:01:13 [info / 89kB] > GET /images/guide-qr-code.svg (200 OK) [641ms] 2021-01-01 00:01:16 [info / 106kB] > GET /canonical.html (301 Moved Permanently) [277ms] 2021-01-01 00:01:19 [info / 86kB] > GET /canonical.html (301 Moved Permanently) [87ms] 2021-01-01 00:01:22 [info / 108kB] > GET /canonical.html (301 Moved Permanently) [103ms] 2021-01-01 00:01:26 [info / 79kB] > GET /canonical.html (301 Moved Permanently) [350ms] 2021-01-01 00:01:26 [info / 102kB] > POST /provision-step-3-logging (301 Moved Permanently) [493ms] 2021-01-01 00:01:26 [debug / 86kB] > parsed template: enviro/html/header.html (took 33 ms) 2021-01-01 00:01:26 [debug / 81kB] > parsed template: enviro/html/header-mini.html (took 9 ms) 2021-01-01 00:01:26 [debug / 91kB] > parsed template: enviro/html/footer.html (took 8 ms) 2021-01-01 00:01:26 [debug / 89kB] > parsed template: enviro/html/provision-step-4-destination.html (took 401 ms) 2021-01-01 00:01:27 [info / 86kB] > GET /provision-step-4-destination (200 OK) [636ms] 2021-01-01 00:01:27 [info / 90kB] > GET /images/pirate-logo.svg (200 OK) [586ms] 2021-01-01 00:01:27 [info / 81kB] > GET /images/guide-qr-code.svg (200 OK) [721ms] 2021-01-01 00:01:27 [info / 78kB] > GET /images/logo-indoor.svg (200 OK) [811ms] 2021-01-01 00:01:29 [info / 105kB] > GET /canonical.html (301 Moved Permanently) [198ms] 2021-01-01 00:01:31 [info / 74kB] > POST /provision-step-4-destination (301 Moved Permanently) [367ms] 2021-01-01 00:01:31 [debug / 72kB] > parsed template: enviro/html/header.html (took 72 ms) 2021-01-01 00:01:31 [debug / 87kB] > parsed template: enviro/html/header-mini.html (took 9 ms) 2021-01-01 00:01:31 [debug / 78kB] > parsed template: enviro/html/footer.html (took 8 ms) 2021-01-01 00:01:32 [debug / 75kB] > parsed template: enviro/html/provision-step-5-done.html (took 326 ms) 2021-01-01 00:01:32 [info / 73kB] > GET /provision-step-5-done (200 OK) [855ms] 2021-01-01 00:01:32 [info / 81kB] > GET /canonical.html (301 Moved Permanently) [582ms] 2021-01-01 00:01:32 [info / 76kB] > GET /images/pirate-logo.svg (200 OK) [671ms] 2021-01-01 00:01:32 [info / 72kB] > GET /images/logo-indoor.svg (200 OK) [732ms] 2021-01-01 00:01:33 [info / 105kB] > GET /images/guide-qr-code.svg (200 OK) [809ms] 2021-01-01 00:01:35 [info / 85kB] > GET /canonical.html (301 Moved Permanently) [98ms] 2021-01-01 00:01:39 [info / 65kB] > GET /canonical.html (301 Moved Permanently) [91ms] 2021-01-01 00:01:42 [info / 90kB] > GET /canonical.html (301 Moved Permanently) [91ms] 2021-01-01 00:00:06 [info / 84kB] > entering provisioning mode 2021-01-01 00:00:06 [info / 115kB] > auto detecting board type 2021-01-01 00:00:06 [info / 113kB] - indoor 2021-01-01 00:00:06 [info / 111kB] > going into access point mode 2021-01-01 00:00:09 [info / 109kB] - 192.168.4.1 2021-01-01 00:00:09 [info / 107kB] > starting dns server... 2021-01-01 00:00:09 [info / 105kB] > starting catch all dns server on port 53 2021-01-01 00:00:10 [info / 103kB] > creating web server... 2021-01-01 00:00:10 [info / 118kB] > waiting for a client to connect

foxalite commented 1 year ago

Problem solved. This append when the module is powered by usb on my computer port. The module never wake up and I'm not able to connect with thony because: dmesg: [39251.199179] usb 1-2: new full-speed USB device number 121 using xhci_hcd [39251.199494] usb 1-2: Device not responding to setup address. [39251.407727] usb 1-2: Device not responding to setup address. [39251.615168] usb 1-2: device not accepting address 121, error -71 [39251.615327] usb usb1-port2: unable to enumerate USB device

So no more /dev/ttyACM0.