Perhaps the existing Wifi.Connect command might be extended to optionally allow specifying static IP parameters rather than the router always defaulting to dhcp, eg:
WIFI.CONNECT SSID$, password$ [, BSSID$] [,Static_IP$, SubnetMask$, DefaultGateway$]
Specifying IP parameters from the script
- Electroguard
- Posts: 836
- Joined: Mon Feb 08, 2021 6:22 pm
- Has thanked: 268 times
- Been thanked: 317 times
-
- Posts: 17
- Joined: Tue Feb 09, 2021 7:01 pm
- Location: Budapest, Hungary
- Has thanked: 61 times
- Been thanked: 2 times
Re: Specifying IP parameters from the script
I highly agree this idea. As an addition, I recommend some modification, to add time server, and the time zone into the script, autorun program too.
Without any knowledge, I tried to understand the internals of the installation procedure. I checked the contents of data-min.zip, and created my special version.
I have more locations, where my ESP-s will located, so I wrote tiny program, that (at the first run) scans the accessable AP-s, and connects the best fitting one. It would make integration easier, to define the autorun program, and the default time zone plus time server in config.ini - that should be stored seperately on the PC, outside of the data-min.zip and flashed into each module. Before flashing, the Annex Toolkit extracts data-min.zip, just insert/overwrite into the newly created compressed file to be flashed.
Without any knowledge, I tried to understand the internals of the installation procedure. I checked the contents of data-min.zip, and created my special version.
I have more locations, where my ESP-s will located, so I wrote tiny program, that (at the first run) scans the accessable AP-s, and connects the best fitting one. It would make integration easier, to define the autorun program, and the default time zone plus time server in config.ini - that should be stored seperately on the PC, outside of the data-min.zip and flashed into each module. Before flashing, the Annex Toolkit extracts data-min.zip, just insert/overwrite into the newly created compressed file to be flashed.