I'm trying to follow the youtube video(http://www.youtube.com/watch?v=Ybn-K8ZZCPE
) to directly connect
waspmote wifi sensors with my Motorola smartphone(android 2.2) without wifi router
, but didn't succeed.
I put wifi module in socket 0 of waspmote board. Note there is no SD card in my waspmote board and the wifi module is combined with expansion board when I get it from box. By following checklist, I upload WaspWIFI_14_android_example program in waspmote IDE to waspmote board successfully via USB connection to my PC.
But my Motorola smartphone(android 2.2) is unable to find a wifi network called "ANDROID". Even I manually add SSID "Network SSID = ANDROID, Security = Open", it just prompts that "ANDROID" is not in range.
I guess I use the wrong program, in which there are no code to set ESSID. Also, the parameters of "WIFI.setUDPclient("255.255.255.255",12345,2000)" are not right for me.
I can use X-CTU to look at the profile settings of XBee Pro s2 module by plugging it into gateway USB interface. Can I do the same thing to Waspmote wifi module?
My questions are:
Q1: What is the correct program for me to implement android video demo?
Q2: Is it OK to implement without SD card?
Q3: Does the waspmote board with wifi module function like an access point?
Q4: Can I use X-CTU to look at the profile settings of Waspmote wifi module by plugging it into gateway USB interface? Or is some other approach to do that?
My current waspmote board with wifi module look like this:
WaspWIFI_14_android_example program is shown below:
// Specifies the message that is sent to the WiFi module.
// Initialize the accelerometer
// First, initialize the WIFI API and the connections with the waspmote
// Then switch on the WIFI module on the desired socket.
// If we don't know what configuration had the module, reset it.
// 1. Configure the transport protocol (UDP, TCP, FTP, HTTP...)
// 2. Configure the way the modules will resolve the IP address.
// 3. Configure how to connect the AP.
// 3.1 Call join giving the name of the AP.
// Switches on green led to show us it's connected.
// 4. Creates UDP connection.
// 5. Now we can use send and read functions to send and
// receive UDP messages.
// 6. Send data to the IOS smartphone
// Reads data to the IOS smartphone
// Waspmote acts depending on the answer.
uint8_t period = (WIFI.answer - 48) * 10 + (WIFI.answer - 48);
// Switches on a lamp with intensity= period %