|
Forum Index : Microcontroller and PC projects : Connecting to a WiFi Network
| Author | Message | ||||
| Bizzie Senior Member Joined: 06/07/2014 Location: AustraliaPosts: 194 |
Hi all, I am trying to include the country code in my web mites (repeater problem seems it may help from the notes. At the moment the web mite has these options > option list WebMite MMBasic Version 5.07.08RC4 OPTION WIFI Telstra174895, ************, WebClock OPTION TELNET CONSOLE ON > Trying this I get a syntax error > OPTION WIFI "Telstra174895","***************","WC","AU" Error : Syntax Because of the length I could not enter the command at the prompt. So I placed the following as the first line (only line) of the program. It looks like this > OPTION WIFI "Telstra174895","**********","WC","255.255.255.0","10.0.0.212","AU" > It runs without error "I think" BUT nothing changes (Name does not change.) So I believe this command has not worked. What am I doing wrong? Rob White |
||||
| ville56 Guru Joined: 08/06/2022 Location: AustriaPosts: 584 |
Hi Rob, in the > OPTION WIFI "Telstra174895","**********","WC","255.255.255.0","10.0.0.212","AU" > there is the IP-address missing. You specified netmask and gateway but no IP. should look something like > OPTION WIFI "Telstra174895","**********","WC",IP_ADDRESS,"255.255.255.0","10.0.0.212","AU" > eidt: please check if you have the latest firmware version as the country codes have been implemeted rather recently. Edited 2026-08-25 18:09 by ville56 73 de OE1HGA, Gerald |
||||
| Bizzie Senior Member Joined: 06/07/2014 Location: AustraliaPosts: 194 |
Thanks Gerald, I am/was bit confused . Is the gateway the local address of my router or the WAN IP? Still not sure it is correct the host name did not change. > > D:\Rob\Mites\APA102\untitled.bas Uploading using: 'target port\COM7:38400 s\webmite Upload started NEW > autosave Progress: 1/13 Upload completed 1 Saved 292 bytes > Time taken: 3056mS RUN > list ' Option EXPLICIT Option DEFAULT NONE Dim A1 As string = "Telstra174895" Dim A2 As string = "************" Dim A3 As string = "WC" Dim A4 As string = "10.0.0.212" Dim A5 As string = "255.255.255.0" Dim A6 As string = "10.0.0.138" Dim A7 As string = "AU" WEB connect A1,A2,A3,A4,A5,A6,A7 > option list WebMite MMBasic Version 5.07.08RC4 OPTION WIFI Telstra174895, ************, WebClock OPTION TELNET CONSOLE ON Rob White |
||||
TassyJim![]() Guru Joined: 07/08/2011 Location: AustraliaPosts: 6600 |
The gateway is the local address or internal IP of your router. Routers tend to remember things and sometimes this gets in the way. Try using a different IP for the webmite to see if the router accepts the new name. There might be a way to clear the cache in the router but I am not keen to recommend deleting things. Jim VK7JH MMedit |
||||
| ville56 Guru Joined: 08/06/2022 Location: AustriaPosts: 584 |
in our small home networks it usually is. The gateway is the device which routes your local network traffic (source or destination) to some other network(s). We mere mortals usually only have one router, it's this one. the following variables explained are: your networks SSID (the name of your WLAN network) Dim A1 As string = "Telstra174895" the password complementing the SSID Dim A2 As string = "************" the nodename you assign to the Pico (part of the local DNS name), overriding what is eventually specified in the routers database Dim A3 As string = "WC" the IP address you assign to the Pico. Make sure there is no collision. Dim A4 As string = "10.0.0.212" the netmask, specifying you have a class C network with 253 possible nodes (as IP .0 and .255 are special cases) Dim A5 As string = "255.255.255.0" the gateway's IP address (= your router) Dim A6 As string = "10.0.0.138" the country code to obey local restricitons on the radio channels and other RF related stuff. Dim A7 As string = "AU" !!Note! ... I'm almost sure this feature was implemented after version 5.07.08RC4. As I already wrote, please UPDATE to the latest version or try to leave that parameter out. Note: a search helped ... was implemented in V6.02.01 the following statement will connect to the WLAN network, but IIRC only if there is not already a connection established. Anyway, the settings should be stored in flash. WEB connect A1,A2,A3,A4,A5,A6,A7 seems to me too that nothing has changed ... Hint: you may try OPTION WIFI "SSID","password" as minimum to see if the routers DHCP is enabled and set up correctly. If that doesn't work IMHO something is wrong with the router Conclusio: So please use OPTION WIFI with all your parameters on the commandline and try not to connect from withtin the program as you do now, at least until you get reliable connections. The connection will then be established immediately and also again on power up or CPU RESTART as OPTION WIFI parameters are kept in flash. Also read/check the return message at connect/startup. With some routers (as with my Fritz!Box) you will only succeed on every 2nd connection request. This is one of the strange behaviours you may encounter. In real life you can trap a connection error (MM.INFO(WIFI STATUS) <> 1) in the program and e.g. issue a CPU RESTART. But again, please update the firmware first, as I don't even have your old version to play with. The latest version can be found on github. V6.03.02b0 is available at https://github.com/UKTailwind/PicoMite/releases/tag/PicoMite-V6.03.02b0. It has beta state and runs without any problems on my Webmites, but you can look up for V6.03.01 (last stable) in the same repo tree. Note: if you want to delete the info which is kept in the Pico about your network settings you can type OPTION WIFI "","","" hope this helps ... Gerald Edited 2026-08-26 15:37 by ville56 73 de OE1HGA, Gerald |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |