I'm new to arduino so my question may sound stupid. I bought a wifi shield which says that the chip is RN-171 I/RM. I followed this tutorial: http://cairohackerspace.blogspot.co.il/2011/05/beginners-guide-to-connecting-and.html Here's my init function:
boolean initSettings()
{
wifi.SendCommand("set wlan auth 4",">",bufRequest, REQUEST_BUFFER_SIZE);
//wifi.SendCommand("set wlan key <value>","AOK",bufRequest, REQUEST_BUFFER_SIZE);
wifi.SendCommand("set wlan channel 0",">",bufRequest, REQUEST_BUFFER_SIZE);
wifi.SendCommand("set wlan join 1",">",bufRequest, REQUEST_BUFFER_SIZE);
wifi.SendCommand("set dhcp 1",">",bufRequest, REQUEST_BUFFER_SIZE);
wifi.SendCommand("save",">",bufRequest, REQUEST_BUFFER_SIZE);
wifi.SendCommand("reboot",">",bufRequest, REQUEST_BUFFER_SIZE);
}
And I have my credentials configured in the Credentials.h file. When I run this code, I get the following output:
Starting WebTime - Please wait. RAM :1133 Arduino Rx Pin (connect to WiFly Tx):2 Arduino Tx Pin (connect to WiFly Rx):3 Started WiFly, :WiFlySerial v1.08 RAM:1133 MAC: 00:06:66:55:03:0a Leaving current wifi ... 0 Credentials Set, Joining CastleWiFi Configure WebTime Settings... DateTime:1970-1-1 0:0:14 PST Initial WiFi Settings : IP: 10.0.0.9:2000 Netmask:
255.255.255.0 Gateway: 10.0.0.138 DNS: 10.0.0.138 RSSI: (-44) dBm battery: 3058 After Setup RAM:1133 Aim your browser at ( /status and /auto optional): 10.0.0.9:2000 Loop RAM:1136 Leaving current wifi ... 0 Credentials Set, Joining CastleWiFi Configure WebTime Settings... Leaving current wifi ... 0 Credentials Set, Joining CastleWiFi Configure WebTime Settings... Leaving current wifi ... 0 Credentials Set, Joining CastleWiFi Configure WebTime Settings... Leaving current wifi ... 0 Credentials Set, Joining CastleWiFi Configure WebTime Settings... Leaving current wifi ... 0 Credentials Set, Joining CastleWiFi Configure WebTime Settings...
It continues endlessly, and I can't access the arduino through the ip and port, it results in an endless spinner...
Can anybody help? Thank you.
leaving current wifi ... 0 Credentials Set
. Did you try putting your credentials in theinitSettings
e.g.wifi.SendCommand("set wlan key <value>","AOK",bufRequest, REQUEST_BUFFER_SIZE);
??? – Phil Vallone Sep 2 '14 at 11:57