Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : [array%()]
Author | Message | ||||
Dinosaur Guru Joined: 12/08/2011 Location: AustraliaPosts: 311 |
Hi All Could someone please give me some guidance on declaring and using the following array. Using it without the Array works by displaying the various SSID's I have tried various combinations of declaring and using it , but to no avail. Nothing like FreeBasic anyway. It seems like the only routine I can use to confirm the availability of the target SSID, without actually trying it and creating an error Regards Regards Hervey Bay Qld. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9122 |
DIM a%(1024) web scan a%() longstring print a%() if linstr(a%(),"MySSID") then ..... BUT you can only use web scan when you are connected to a network - this is a limitation of the WebMite Edited 2023-11-19 20:54 by matherp |
||||
Dinosaur Guru Joined: 12/08/2011 Location: AustraliaPosts: 311 |
Hi All Thanks matherp. I guess the 1024 is max characters. The reason I want to us this, is because none of the WEB commands have any feedback. The screen (if it was fitted) would show the error. Using OPTION WIFI SSID$, PassWd$ at boot up may or may not succeed, (Pico & Pi Zero racing each other) if it doesn't, then I can take action to reboot and try again. I have it all working now on a Rpi-Hotspot, but it has to work unattended and recover from power shutdown. Regards Hervey Bay Qld. |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Longstring packs 8 characters into each 64 bit integer so I think a%(1024) can hold 8k characters. edit Web Scan seems to output 91 characters + CR or CRLF per line so 12 integers / line. You can size the array to suit the maximum entries you are likely to get. Edited 2023-11-19 22:31 by phil99 |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6099 |
MM.INFO(WIFI STATUS) will tell you if you are connected. VK7JH MMedit MMBasic Help |
||||
Dinosaur Guru Joined: 12/08/2011 Location: AustraliaPosts: 311 |
Hi All Go looking for bread crumbs and find a whole loaf of bread. Thanks for the replies. The easiest is MM.INFO(WIFI STATUS) There are some traps though. I have DHCP on Manual and Fixed IP address on the Zero. If there is any PC looking to connect using DHCP Auto, Wifi Status will still return 1 but WEB MQTT Connect will report that Wifi is not connected. This happened because I am using my Desktop to connect to the Pico. So turning the Wifi off on that solved that. Once again many thanks. Edited 2023-11-20 06:14 by Dinosaur Regards Hervey Bay Qld. |
||||
Print this page |