can't set IP

Recurrent H/W and software problems
Stuart
Posts: 126
Joined: Fri Feb 19, 2021 7:46 pm
Has thanked: 5 times
Been thanked: 20 times

Re: can't set IP

Post by Stuart »

Yes thank you, I must pay more attention. And read up on the modes so I know what distinguishes them.

I last touched an 8266 almost two years ago. I'm sure I understood this better then.
Stuart
Posts: 126
Joined: Fri Feb 19, 2021 7:46 pm
Has thanked: 5 times
Been thanked: 20 times

Re: can't set IP

Post by Stuart »

For anyone curious about the flash modes and which to use, this post explains quite a lot:

https://www.esp32.com/viewtopic.php?t=1250#p5523

Short version: it depends on which flash chips the board manufacturer selected for the fabrication. For an S20, use DOUT as per earlier in this thread. This is the slowest mode and I had to set the baud rate to 57600 to flash successfully.
User avatar
cicciocb
Site Admin
Posts: 1900
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 407 times
Been thanked: 1271 times
Contact:

Re: can't set IP

Post by cicciocb »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Tue Jan 24, 2023 4:44 pm For anyone curious about the flash modes and which to use, this post explains quite a lot:

https://www.esp32.com/viewtopic.php?t=1250#p5523

Short version: it depends on which flash chips the board manufacturer selected for the fabrication. For an S20, use DOUT as per earlier in this thread. This is the slowest mode and I had to set the baud rate to 57600 to flash successfully.
For info, there is an old post on that subject on the forum
[Local Link Removed for Guests]
Stuart
Posts: 126
Joined: Fri Feb 19, 2021 7:46 pm
Has thanked: 5 times
Been thanked: 20 times

Re: can't set IP

Post by Stuart »

I now have the same problem I had on an 8266, with an ESP32. This looks a bit harder than the 8266 problem.

Problem: can flash 1.48.22 to a chip (see logs below), but can't set the IP and can't change the config via 192.168.4.1, though can see the config page on a phone, despite doing everything right (I think!). I sometimes feel I'm in a parallel universe. I would be grateful if anyone could point out what I did wrong.

What I did:

- fresh download of toolkit 1.1 beta (from link in Cicciocb first posting, believed to be updated as the latest, I couldn't find a definitive latest version)

- into new folder under Ubuntu 22.04

- run using root privileges (sudo) to stop it hanging on the java problem (but see listing)

- holding pin 0 to ground when booting, using a wire (EN and Boot buttons on the board don't seem to do anything)

- with serial monitor on

- 'read module info' gives the following:
--------------------------------------
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 3c:61:05:30:2e:34
Uploading stub...
Running stub...
Stub running...
16 (100 %)
16 (100 %)
Read 16 bytes at 0x1000 in 0.0 seconds (13.0 kbit/s)...
Hard resetting via RTS pin...
exit_code:0
--------------------------------------
- then doing a full flash including data, entering my SSID/pw info for the wlan

- pressing ok on the SSID/pw box gets me this error

"net.lingala.zip4j.exception.ZipException: java.io.FileNotFoundException: esp32-data-min.zip (No such file or director)"
followed by a gazillion java traceback lines
(there is a file called esp32-data-min-32.zip - but renaming it just caused a java bounds exception)

- But the flash proceeds and the serial monitor shows
--------------------------------------
Annex initializing...

BLE support enabled
module Type 0 Display 255 SD_Card 0 {does it think there is a display? There isn't}
OK
No SD cards found. Reverts to FFAT
FFat Mount Failed
Formatting FFAT ...
Format completed.


Annex32 BLE CAN 1.48.22

(C) ciccioCB 2022
Personal use only, commercial use strictly prohibited

Chip revision 1 Freq 240
STARTING


Switched to AP Mode ESP3C:61:05:30:2E:35
IP address: 192.168.4.1
--------------------------------------
- so, perhaps it worked even though it didn't set an accessible IP address.

- It should have found a 192.168.1.x IP, but didn't, so I accessed the 4.1 address via a recent android phone (thanks Bugs for the tip) which does get me to the config page into which I enter the wlan details

- clicking 'save' then does nothing, the unit is not accessible under the wlan IP and reloading the 4.1 ip on the phone shows a blank config.

I also tried the web flasher under chrome, which worked well, though it does not seem to have a way to set the IP. It looks like a great tool though.

Result: one up-to-date chip that can't be accessed.
Stuart
Posts: 126
Joined: Fri Feb 19, 2021 7:46 pm
Has thanked: 5 times
Been thanked: 20 times

Re: can't set IP

Post by Stuart »

I have now solved this problem, and learned a slightly surprising lesson. I was working with the chip installed in a test board I had built to check out how best to use some i2c i/o expanders that I was planning to use to extend a project. The only things connected to the chip were the i2c connection sockets (unpopulated), which were on pins 21 and 22 (adjacent to, but not connected to, Tx and Rx). These have 10k pullups on them as you might expect.

Removing the chip from the test board and reflashing it connected only to the usb cable solved the problem.

So it seems that not only pins 0, Tx and Rx are involved in booting and flashing, but potentially any other pins and particularly 21, or 22, or both.
Stuart
Posts: 126
Joined: Fri Feb 19, 2021 7:46 pm
Has thanked: 5 times
Been thanked: 20 times

Re: can't set IP

Post by Stuart »

The final piece of this tale of incompetence is to note that the root cause was a copper strip that I had not cut and was therefore inadvertently connecting 3.3v to D2/GPIO9. I don't think this would have mattered on the base chip but on the Vroom board, as luck would have it, it is used apparently by the flash memory. It did not seem to affect the flashing process, or normal operation, but did interfere with setting the IP in some way.
AndyGadget
Posts: 222
Joined: Mon Feb 15, 2021 1:44 pm
Has thanked: 120 times
Been thanked: 132 times

Re: can't set IP

Post by AndyGadget »

We learn by our mistakes.
(I've learnt a lot over the years :¬)
Post Reply