This is going to make me look dumb, but I spent a few hours trying the WiFly terminal in the tutorial, and then yours, with no success, and was burrowing deeper into understanding the bitmath in the SpiUart code where it seemed to be failing when I tried using a different Arduino. It worked! So hackers, if you find yourself needing to troubleshoot your WiFly shield: make sure you see blinky lights before getting into the code.
I can’t find that in my SpiUart.cpp. Is there another version of this?
Also, I had a WiFly module mounted onto a breakout board (RN-121) and ordered the SC16IS750 breakout board to adapt it. I’ve soldered everything in place and it doesn’t talk to it.
I had preconfigured it, while it was a breakout board, and it connects perfectly by itself. It’s a great little module, I just need it to talk to the arduino…
seacritter:
I can’t find that in my SpiUart.cpp. Is there another version of this?
There's only been one version released. Note that there are two files with similar names: SpiUart.cpp and SpiUart.h
Also, I had a WiFly module mounted onto a breakout board (RN-121) and ordered the SC16IS750 breakout board to adapt it. I’ve soldered everything in place and it doesn’t talk to it.
Without knowing more detail it's difficult to know what to suggest. I'd recommend double-checking the wiring and ensuring the RX/TX connections are correct.
Just a quick question, though…does the WiFly have the ability (currently, or in the future with this library) to communicate straight between WiFly/laptop, WiFly/smartphone, WiFly/WiFly, without the need for a broadcasting wireless router nearby? Just a standalone, 2-device, ad-hoc network? That would make me an incredibly happy happy happy person!
bswift5528:
does the WiFly have the ability (currently, or in the future with this library) to communicate straight between WiFly/laptop, WiFly/smartphone, WiFly/WiFly, without the need for a broadcasting wireless router nearby? Just a standalone, 2-device, ad-hoc network?
As I understand it the WiFly module itself supports both joining and creating an Ad Hoc network.
However, the library doesn’t yet support creating an ad hoc network directly. From reading section 5.11 of the user guide (version 2.19) I think the following will create an ad hoc network assuming the correct configuration has been provided:
set wlan join 4
AFAICT you should be able to join an ad hoc network in the same manner as you join a normal AP-hosted network.
seacritter:
I can’t find that in my SpiUart.cpp. Is there another version of this?
Also, I had a WiFly module mounted onto a breakout board (RN-121) and ordered the SC16IS750 breakout board to adapt it. I’ve soldered everything in place and it doesn’t talk to it.
I had preconfigured it, while it was a breakout board, and it connects perfectly by itself. It’s a great little module, I just need it to talk to the arduino…
Thanks…
Just download the alpha 0 library from this thread, I can’t find that define frequency in SpiUart.cpp & SpiUart.h, any possible reason for that?
struct SPI_UART_cfg SPI_Uart_config = {
0x60, //0x50, <- should change this value for new clock
0x00,
0x03,
// We need to enable flow control or we overflow buffers and
// lose data when used with the WiFly. Note that flow control
// needs to be enabled on the WiFly for this to work but it's
// possible to do that with flow control enabled here but not there.
// TODO: Make this able to be configured externally?
EFR_ENABLE_CTS | EFR_ENABLE_RTS | EFR_ENABLE_ENHANCED_FUNCTIONS
};
seacritter:
I can’t find that in my SpiUart.cpp. Is there another version of this?
Just download the alpha 0 library from this thread, I can't find that define frequency in SpiUart.cpp & SpiUart.h, any possible reason for that?
Yes, I just discovered the possible reason for that. :oops: So...it turns out I forgot the released version didn't have that separate crystal speed define but I assumed it did. The addition of the define was the first code change I made after I made the release which was long enough ago that I got confused about what the release had in it. Sorry about that. :)
All the more reason for me to get another release of the library out the door.
I have succeed to use auto-pairing mode with UDP protocol.
I have found a mistake in documentation in section “11.2. UDP Auto-Pairing”
He’s writing about flags value 0x80, but it’s not 0x80… the right value is 0x40.
But, in chapter “5.6 IP Parameters”, section “set ip flags ”, the values in table are correct, 7th bit is for enable UDP auto pairing
7th bit = > 0100 0000 => 0x40 ( and not 0x80 )
Method for use auto pairing :
Set “ip flags” with 7th bit enable
Join any network where a “listener” listen UDP broadcast packets from wifly.
When listener receive broadcast packet, listener extract ip of the wifly module
Listener send a udp packet with arbitrary value toward the extracted ip ( the wifly module ) .
Then, the wifly module will set automatically host ip address with ip address of the listener.
this method make it possible to not hardcode ip value, of the listener or the wifly module. Very helpfull when the ip is attribute from DHCP server or AUTO-IP mode ( Ad-hoc ) for example.
It’s maybe helpfull to remind what the udp broadcast packet from wifly module contains many information about him, signal strenght received, battery voltage, MAC addr of AP ( eg. “11.4 Using the UDP broadcast function” )
A GitHub repository would allow others to fork and contribute back to your code using a tested and well known workflow. It would also give your project a lot ore visibility to other developers.