thanks a lot for this library – after a bit of experimentation, it works like a charm.
One thing, though: I’m trying to use the library to download data from a FTP server in passive mode, which requires opening two client connections at once, one control and one data connection. Opening the second connection hangs at Client.connect(). Is it possible that the library supports only one connection at a time? Or am I doing something wrong here?
This is the code snippet:
Client control(DWD_HOSTNAME, FTP_PORT);
if(!control.connect()) {
Serial.println("Could not connect to DWD");
return false;
}
EXPECT("220");
// login dialog
SEND("USER " DWD_USERNAME); EXPECT("331");
SEND("PASS " DWD_PASSWORD); EXPECT("230");
// open passive-mode connection
SEND("PASV"); EXPECT("227");
char pasv_ip[20];
uint16_t pasv_port;
if(!parsePassive(msg, pasv_ip, pasv_port)) { control.stop(); return false; }
Client data(pasv_ip, pasv_port);
DEBUG("Trying to connect to "); DEBUG(pasv_ip); DEBUG(":"); DEBUGLN(pasv_port);
if(!data.connect()) {
DEBUGLN("Could not connect to passive IP / port");
control.stop(); return false;
}
DEBUGLN("Connected to passive IP / port");
…and this is the relevant console output, with my comments:
Server says: 220 DWD-FTP-Server: ftp-outgoing.dwd.de [141.38.3.180] (4)
Message from server OK // EXPECT("220") succeeded
Server says: 331 Password required for gds40131
Message from server OK // EXPECT("331") succeeded
Server says: 230 User gds40131 logged in
Message from server OK // EXPECT("230") succeeded
Server says: 227 Entering Passive Mode (141,38,3,180,132,104).
Message from server OK // EXPECT("227") succeeded
141.38.3.180 // IP number for data connection parsed out of the above reply
33896 // Port number for data connection parsed out of the above reply (132*256+104)
Trying to connect to 141.38.3.180:33896
I got my Wifly Shield for 2 weeks+ already and i’m still figuring out how to get it to work.
I’ve read everything in this forum and downloaded all the alpha libraries. (Currently using the alpha 2)
I have my Wifly Shield mounted on a MEGA 1280 and re-circuited the 10,11,12,and 13 pins to 53,51,50,52.
I’ve tried the WiFly Auto Connect sketch which i got from the SoundBox page and results show that i can’t associate with my network.
and i’ve tried the WiFly library included sketch and still it can’t associate with my network.
My router is using WEP 128 encryption. Changed the “set w a” from 3 to 1, even used the command “set w k” and still it didnt work
I noticed that he board LED PIO6 (orange) and PIO4 (lime) both are blinking but PIO6 blinks slower. After i uploaded the autoconnect sketch and run it, PIO6 turned off and PIO4 have rapid blinking even faster than before. What does it mean? But either way, it still didnt get to associate with my network.
I have been trying to get the Wifly module to work with an arduino Duemilanove development board. I used one of the examples in the library (WiFly_Autoconnect_Terminal). it seems like the example “freezes” in one of the first lines actually it freezes in the WiFly.begin();
after checking out the library file WiFlyDevice.cpp I found out that the while loop “while (!(uart.available() && (uart.read() == ‘\n’)))” just keeps running forever
void WiFlyDevice::skipRemainderOfResponse() {
/*
*/
while (!(uart.available() && (uart.read() == ‘\n’))) {
// Skip remainder of response
}
}
anyone that has got an idea of what I am not doing right
Unfortunately, there is no solution for this issue with the WiFly–WEP is deprecated and 64-bit WEP is pretty close to useless so it’s generally not supported. If you can, I would suggest switching to 128-bit WEP or WPA. Or, switching to an open network if security is of little concern.
Not sure why but… I can’t even get past the WiFly.begin(). I added several println statements to assist in the debugging. It appears to be getting hung in the “skipRemainderOfResponse” routine asit’s not matching the CMD sent to the uart. I was questioning my solder job for the headers, but I assume the uart is not in any way concerned with the ardunio right? So any ideas what’s going on?
Thanks for this code library. Im working on a prototype right now that uses the WiFly, so hopefully in the coming months I’ll be able to debug this code. Looking forward to it.
I’m having strangely inconsistent results. At home, where I have an airport express (WPA2), one piece of code worked perfectly (just getting past the connection part), but others did not. That said - my bigger issue is that I am trying the same thing at work where we also have a WPA network, but it doesn’t error out or connect, it just hangs on the .begin(). Any suggestions as to how best to debug or what could be the problem?
I want to buy a Wifly shield for my Arduino uno, but currently I don’t yet see if that will work for me.
I am creating a project which will use touchOSC on my iphone and hopefully I will be able to control an RGB DMX lamp using arduino and a Wifly without a PC.
The touchOSC is working with the Arduino, I am able to control a single LED.
I still need to buy / create the DMX shield and buy the Wifly.
So can you confirm that I can get this working? I need to send OSC signals to the Wifly board which should then create events on my Arduino, and control
Arduino’s outputs based on the events.
You can also link me tutorials, but I’ve seen the one with sparkfun’s Wifly here.