(not tested by me)
pinMode(6, OUTPUT); // Set digital pin 6 as OUTPUT to power WiFly shield VIN Pin digitalWrite(6,HIGH); // trigger relay to power WiFly shield VIN delay(200); //allow WiFly time to boot ... digitalWrite(6,LOW); // Power down WiFly
Adhoc mode is controlled through GPIO-9. It is a good idea to connect pin 24, GPIO-9 to a switch or jumper connected to a pull up. When GPIO-9 is driven high at power up the module will be in Adhoc mode. If GPIO-9 is then toggled low 5 times, the initial factory default configuration will be RESTORED. This is useful for cases where the module is mis-configured and is no long responding.
set wlan join 1 set wlan ssid Sitecom set wlan chan 0 save reboot
From command mode, the module is configured for adhoc mode using the join command. You will also need to set the ssid and channel.
(join 4 is for adhoc)
set wlan join 4 set wlan ssid Ultimaker set wlan chan 1
Turn off DHCP and set the IP address and netmask so other devices know where to connect to the adhoc WiFly GSX. Since auto IP fixes the first two bytes of the IP address you want to use the netmask of 255.255.0.0 so that other device connecting to the module can be reached. Alternatively you can set the netmask to a smaller subnet if the other device’s IP addresses are begin statically to the same subnet as the adhoc device
set ip address 169.254.1.1 set ip netmask 255.255.0.0 set ip dhcp 0 save reboot
Be sure to save your configuration, then upon reboot the module will be in adhoc mode.
set ip host 192.168.2.99 save reboot