Go Down

Topic: Arduino Uno + Wireless proto shield + Wifly module (Read 27595 times) previous topic - next topic


Its clear the problem hugely lies on my netw?ork since no device is appear to ping another...but wouldn't rule out defectiveness of the wifly since I her no response when I.ping da gate away?....can I get what kind of response to expect when you do so from the wifly serial terminal?.....


Feb 14, 2012, 11:50 am Last Edit: Feb 14, 2012, 11:57 am by sponder Reason: 1
I don't have the unit at hand right now, but tried to test is like a week ago, i remember the response was a reply as you would expect.
Being unable to ping other devices on the network is a huge hint though! Try another router, see if you can ping across the network (from laptop to laptop to smartphone etc.) if that works you can bet your WiFly will start responding to ping / telnet / FTP as well.

edit: i did a quick google on DLINK routers and not being able to ping anything besides the router: read 4 stories, all four of them got solved by disabling the windows firewall. Can you check please turn off the firewall on both laptops and try pinging each other?


I am using Dlink router DSL-2640B....I guess its something to do with the router blocking the computers from pinging each other since turning off windows firewall hasn't solved the problem....


I remember reading several users using their WiFly in an adhoc connection with their laptops. Perhaps you could try that to confirm it's your router (before spending money on a new one)
Wishing i had more time to spend on this, i'm slowly getting somewhere.
Right now i have a sketch where the arduino puts the WiFly in command mode, sends the command to get the IP address, and puts the serial data received on a lcd.
The sketch works, but, the output (also via serial / telnet) contains:

<2.30>get ip a
get ip a

thus, the output doesn't only contain the IP address, but also the string we send, a few newline chars, and then the IP address.
The good news is that i can see the string, including a part of the IP address (the lcd isn't big enough to show the complete string of chars lol.)
Once i find the time to read up on parsing incoming serial data, (im sure there are plenty of examples online?..) i can try to parse the data to show only the IP address.
Would you be interested in testing / trying / reviewing / commenting on that code?


I did a google search for your router model and it seems that there are a number of hits for the same problem: Google: DSL-2640B unable to ping

I started reading through them but haven't found any solutions yet. Maybe you'd have better luck.


Hi guys...yah as u said the problem is my router not allowing devices to ping each other so i tried to change its configuration and it seems it doesn't support such protocol (icmp)...so i decided to use adhoc mode for the time being before i get hold of another advanced router..thanks guys for the help...let u know how i progress...

Sponder...did da function that u said u gonna use to read from the wifly work correctly i.e readFromWifly()...what do u want to display on the lcd...the commands and the response or the response alone?...if the characters are too long for the lcd you can make them to scroll left to right..(i believe there is such a function in the lcd library) or write a function to scroll up (worked 4 me)....


Feb 16, 2012, 10:28 am Last Edit: Feb 16, 2012, 10:30 am by sponder Reason: 1
Well, like i said, i have trouble using any WiFly library. But as DHunt pointed out to me, you can also simply write all the commands to the WiFly module through the serial link.
I would like to display just the IP address on the lcd, but like i said in my previous post, the output of the get ip command is "get ip \n \n <IP address>\n" instead of just the ip.
but hey, at least i can see some output, so it's just a matter of parsing the output before displaying it to the lcd. (right now everything in the serial buffer is shown on the lcd)
I hope to find some hours here and there upcomming weekend, so i can read up on parsing serial data on the arduino. (But since it's carnaval over here i dont think i can find those hours..)
I want the parsing out of the way before i'm even going to try to connect to a server, since once connected to a server i would like to let the server send a command, which in turn gets parsed (and executed) on the arduino.
did you allready connect your unit with a adhoc connection?  Where you able to ping /telenet / FTP with it?


Yah with the adhoc mode i was able to ping and telnet successfully....but will be getting another router soon because am looking to send commands to arduino from quite a long range....

Yah me too am planning to do the same but first i tried to see if the app can be able to send the commands to the arduino but am getting unknownHostException.(Thrown to indicate that the IP address of a host could not be determined.) which is weird since i was able to ping and telnet the host(wifly)..Are you familiar with java?...maybe you can help. I am also looking for opinions in other forums and am also rechecking my code.



As soon as you solve one problem you run into another..thats the order of the day when dealing electronics...

I was able to ping and telnet successfully but the app couldnt communicate with the wifly shield...i am just running the terminal sketch that allows commands to be sent through the terminal...To implement server/client communication aren't we supposed to upload some kind of server/client sketch to the wifly?....I think my problem could be the wifly not accepting the connection in the first place from the app....hence the app throws unknownHost Exception....am i right?..


On the app i have this line of code and it seems it cannot get past the first of these two lines below...The output of the second line is never shown as the connection to the host i.e wifly shield is never made... I declared the host name as "WiFly-GSX" ( default device id of wifly) and port  as 2000. I changed the port number but still same result.

Code: [Select]

Socket clientSocket = new Socket(host, port);
System.out.println("Connected to " + host + " in port " + port);


Heey guys...i was able to send messages to arduino but now I ran into another problem....I am using the adhoc connection between wifly and my PC but after successful connection the wifly just goes off completely(no LED blinkng)...strange isnt it?......I tried to reset to default factory setting to cancel any unnnecessary commands that i may have passed to the wifly accidentally but the problem still persists...but after leaving it without power for a while it goess on again...what could be the problem?...


I have been playing with exactly the same config.    I got a bit sick of the wifly lib as it didn't seem to work.    So I went native and just talked to it direct.   Here is some code I am playing with.  Might help?

#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3);   // got a display on this....
void setup() {
  //setup ports
  delay(2000); // 2 second delay to let the screen initalise if it has only just been powered up
  mySerial.write("Hello Max");

  //exit CMD mode if not already done
  //set into CMD mode

  //set authorization level
  Serial.println("set wlan ssid AccessPonteID");

  //set passphrase
  Serial.println("set wlan phrase SillyPassword");

  //set DHCP
  Serial.println("set ip dhcp 1");

  //set join
  Serial.println("set wlan join 1");

  //set Auth
  Serial.println("set wlan auth 4");

  //set passphrase
  Serial.println("set wlan tx 0");
  //set localport
  Serial.println("set i l 80");
  //disable *HELLO* default message on connect
  Serial.println("set comm remote 0");

  //save config

void loop() {
   if (mySerial.available()){

   if (Serial.available()){
     int sl = Serial.read();



HI guys,

Thanks Max for the share. I am currently past the connection stage and am dealing with reading data from the wifly to the arduino to be displayed on an LCD. When I open tera term terminal that I used to configure the wifly device, it displays the message that i send from a windows app ( I didn't do anything to let this happen). However, instead of getting the message on the terminal I want it be displayed on the LCD. As shown below is the output on the terminal. The message sent to the wifly is "Testing 1...2...3".
Code: [Select]

WiFly Shield Terminal Routine
Bridge initialized successfully!
Entering command mode.
Set wlan join level to 4
Set wlan ssid to wifly-GSX
Set wlan channel to 1
Set ip address to
Set ip netmask to
Set ip dhcp to 0
Joining 'wifly-GSX'

*OPEN*Testing 1...2...3*CLOS*

I tried using SPI_Uart_ReadByte(char address) but couldn't figure out which address to read from SC16IS750 register and also wasn't sure if this is the correct way. I hoped to do something lcd.print(spi_uart.ReadByte(arbitrary value));

Any help?..


I tried using SPI_Uart_ReadByte(char address) but couldn't figure out which address to read from SC16IS750 register and also wasn't sure if this is the correct way. I hoped to do something lcd.print(spi_uart.ReadByte(arbitrary value));

I'm a bit confused as to what WiFly hardware you have as I thought you had a serial interface module. Do you have a WiFly module with SPI support?


I am also a bit confused as I read before that the wifly shield uses spi_uart bridge to communicate with the arduino so i thought I should be dealing with this kind of communication model.

This is my understanding on how the data I am sending would go through, pardon me if I am wrong. When the data is received by the wifly it gets through its uart, spi_uart bridge, arduino's spi then LCD's parallel interface pins.

If the data is already displayed on the terminal, does it mean it has already been passed to arduino and all i should care is finding a way to display it on the LCD?.

I am also trying something similar to the Wifly_Webserver example but the arduino 1.0 doesn't support the LCD library that I am using (LCD4Bit_mod).


Go Up