SparkFun Forums 

Where electronics enthusiasts find answers.

All things pertaining to wireless and RF links
By follower
#111285
StaticDet5 wrote:I posted this on the Arduino forums as well.
Following on from there... :)

The reason I suggested trying the library out is that it handles all the configuration and if the library example sketch doesn't work then we know it's something else.

Could you please try with the "WiFly_Autoconnect_Terminal" sketch from the library and see if it works?

--Philip;
By StaticDet5
#111313
My sincere apologies.

I seem to be having the same issue there.

I get:
WiFly Shield Terminal Routine

But nothing after that. No "Association failed", or "Associated"

I deliberately changed the Credentials.h file to cause deliberate success or failure (I've even reconfigured my home network to open, then straight WEP, in case I was missing a setting). Nothing.

LED's:
I've got a rapid green LED and pretty rapid yellow LED (but is is asynchronous to the green).
That means no IP address (The Green), and that it is sending and receiving data (The Yellow).
I'm not sure what data is being sent, as currently the module is unassociated with the network, AND I'm getting nothing over the serial monitor.

Changing the credentials back to legitimate credentials yields:
WiFly Shield Terminal Routine
On the serial monitor, but nothing further
And a rapidly blinking green LED on the shield (No IP address)

Any thoughts?
#111316
Hello StaticDet5,
try to load the basic terminal sketch. Then step by step, try to connect to the WIFI via the terminal, writting manually the necessary commands. The configuration is quite well detailled in the Wifly datasheet.
By StaticDet5
#111317
I've done that, but maybe you folks could help me.

I've tried using the Arduino Serial Monitor, Multi Terminal (from SourceForge, really nice terminal program), and TeraTerm.
What are the correct settings for the terminal?
I have the normal settings correct, 9600 baud, 8 data bits, 1 stop bit.
Anyone know about Parity (I have it set to off, but I've tried every option I can think of)
How about handshake (I hvae it set off as well, but tried every option)
Mode TX and RX? Carriage Return? Line Feed? Both?
Does it matter if I have Local Echo enabled (I like it enabled)

With the Arduino Serial Monitor (Can I use this, with version 0021)?
Line ending? No line ending?

Do I need to push -enter- after putting in $$$ ? (Tech support said no)

I've literally tried as many of the combinations above as I can think of, with both the Auto Connect sketch and the Terminal Sketch.
I've got the shield attached directly to the Arduino Diecimila, and no wires attached to the shield (naked shield). I have an external brick powering the shield, and the USB cable attached directly to my computer (I'm routinely trying two different computers). I've tried both crystal settings in the program (but my crystal is marked with 14.7456).

I know I'm repeating myself in parts of the post, but I feel like I'm missing something really basic here. I've done continuity tests on the shield and pins. The pins are connected to the chips on the board. I've run other sketches with the Arduino, and they all seem to be fine (including ones that report temperatures over the serial output).

Thank you folks SO much for looking at this for me.
#111318
First of all, try to send a text from arduino to the computer, with Serial.println("Starting test sketch");
if you never show it, there's something wrong.
then i had issue to send data to the Wifly with arduino serial monotor, i had to use a specific application (minicom), but maybe that's because i'm on a mac.
if correctly connected, the Wifly displays a welcome message on the uart, you'll know when it's working
By StaticDet5
#111320
Minicom appears to be unix only. I have a linux system, but I'd be jumping another order of complexity if I bring a third machine into this mix.

I'm getting Serial Prints from the Arduino:
WiFly Shield Terminal Routine

and

WiFly Shield Terminal Routine
Bridge initialized successfully!


But I'm getting no other Serial Communication after that.
The arduino isn't locked up. I've been able to create "noise" on the line by hooking pins up to the shield headers, which is giving me bizarre characters on the terminal. So it's not that the arduino isn't reporting information, it's that no information is being sent to the arduino.

Thanks
#111336
Hi StaticDet5 sorry for my english
, but if i understand right you using arduino program to enter commands?
if yes it will not work get yourself UTF-8 TeraTerm Pro http://jaist.dl.sourceforge.jp/ttssh2/4 ... m-4.67.exe <i think is this one see if it will help
P.S. use CONTROL>BROADCAST COMMAND for entering $$$ you might need to uncheck ENTER KEY selection then try to check it and use any other command from roming networks database i needed to do factoryRESET and save it before i could use a Transparent Terminal Sketch and then other ones. Hope it will help.

By the way i am using Windows 7 and xp .
By StaticDet5
#111339
I've tried using:
TeraTerm
Multi Terminal (from Source Forge)
Arduino Serial Monitor

None of these are producing any results. On the off chance that the WiFly is getting my commands, I've tried the factory RESET command. Still no communication from the board.

Thanks
#111353
StaticDet5 wrote:I've tried using:
TeraTerm
Multi Terminal (from Source Forge)
Arduino Serial Monitor

None of these are producing any results. On the off chance that the WiFly is getting my commands, I've tried the factory RESET command. Still no communication from the board.

Thanks
did you tryed pro tetraterm with ENTER KEY checked off?
Add me on SKype if you using it name lmasss
By follower
#111389
StaticDet5 wrote:On the off chance that the WiFly is getting my commands, I've tried the factory RESET command.
I seem to recall people who having issues with a non-responsive unit had the problem solved by doing that, so it's unfortunate that had no effect.

Given what you've tried, unless we're missing something really obvious it sounds like it might be a hardware issue. My final two suggestions:
  • If you feel up to it, you could try the hardware-based factory reset (instead of the software one you've already tried).
  • Get back in touch with tech support and let them know you've still had no success.
--Philip;
By StaticDet5
#111419
Spark Fun has been pretty helpful in keeping me sane. They're a little slower than you folks to respond (which is probably good, all around), but they also been giving me ideas to try.

They're going to take a look at the board as well, and see if it's the board. I'll let folks know what the issue was, once they get back in touch with me.

Thanks everyone!
By racine_20
#112479
follower wrote:
racine_20 wrote:Could you implement most functions to use Wifly with UDP protocol for the next release please ?
Existant functions are for TCP protocol ....
Did you have anything specific in mind? And do you know if the WiFly module is capable of it?
Another idea if you want, Try to use another method for getting IP and other parameters from Wifly , because, to use parsed *char is very very slow ....
Can you please explain this request further?

Thanks for your feedback.

--Philip;
Hi Philip,

Thx for your support,
About UDP proto, yes wifly module is totally capable ..... In my mind, I propose to create functions for sending, receiving UDP packet just simply. This protocol haven't need to create a directly connection with client, because it's a connection less protocol.

About method, such as "Get IP", your method is to fetch the result of wifly command "get wlan ip", char by char. And this method is very very slow, try to measure the time taken by your method, You will see what I mean. Can you just call ip (or another data) directly in register of wifly module ?

Thx Philip,

-- Ben
By follower
#112485
Hi Ben...
racine_20 wrote:About UDP proto, yes wifly module is totally capable
I discovered after reading your post that the user manual has been updated with the details about this--I must've missed that revision. :)
I propose to create functions for sending, receiving UDP packet just simply.
From looking at the documentation it seems like the data is just feed into/read from the UART so there might be some issues with being able to detect when packets end etc. I don't anticipate getting the time to work on this functionality in the near future but feel free to work on it yourself.
About method, such as "Get IP", your method is to fetch the result of wifly command "get wlan ip", char by char. And this method is very very slow, try to measure the time taken by your method,
By my timing it takes about half a second. Is this what you mean by slow?
Can you just call ip (or another data) directly in register of wifly module ?
Unfortunately all the interaction with the WiFly module is via the serial interface--there's no direct register communication. If you are running version 2.19 or later of the firmware you might be able to change the code to use the "get ip a" which sends less data. Increasing the serial speed might help too (not yet fully supported). But if half a second is too slow I don't anticipate those approaches being that much faster.

--Philip;
By racine_20
#112507
Plop,
I discovered after reading your post that the user manual has been updated with the details about this--I must've missed that revision. :)
It's no big deal ;)
it seems like the data is just feed into/read from the UART so there might be some issues with being able to detect when packets end etc.
Ok with this, but it hasn't solution to make easier the use of udp proto ? damn :)
I will try to enhanced my skill about UART R/W :p , I am beginner about this kind of plateform
By my timing it takes about half a second. Is this what you mean by slow?
Definitively, Yes !! :) Especially just for one "data". But the main cause come from the only serial interface, definitively !

I waiting your next release with impatience ;)
Thx for your great contribution Philip !

-- Ben
#112642
Hi,

I am trying to load data from server to Arduino as client with Wifly and keep updating but it always crushes after some minutes. The length of time until crashing is really random. Does anyone know why it causes or any solution for it? I am stacking it for few weeks and couldn't find a solution yet :( If anybody can help me out I really appreciate it.

Here is the code:
Code: Select all
#include "WiFly.h"
#include "Credentials.h"

byte server[] = { 66, 249, 89, 104 }; // Google
Client client(server, 80);

void setup() {
  Serial.begin(9600);
  WiFly.begin();

  if (!WiFly.join(ssid, passphrase)) {
    Serial.println("Association failed.");
    while (1) {
      // Hang on failure.
    }
  }  

  Serial.println("connecting...");
  update();
}


int updateCounter=0;

void update(){
  
  client.flush();
  Serial.flush();
  Serial.println();
  Serial.println("updating...");
 
 //*****it will crushe here******//
  
  if (client.connect()){
    Serial.println();
    Serial.println("connected!");
    updateCounter++;
    Serial.print(updateCounter);
    Serial.println(" times");
    Serial.println();
    
    client.println("GET /notFound HTTP/1.0"); //getting Not Found page
    client.println();
  }
  else{
    Serial.println("connection failed");
  }
}


void loop() {
  if (client.available()) {
    char c = client.read();
    Serial.print(c);
    }
 
  if (!client.connected()) {
    Serial.println();
    Serial.println("disconnecting.");
    client.stop();
    update();
  }
}


Thanks advance
  • 1
  • 2
  • 3
  • 4
  • 5
  • 7