Hi Phillip,
can you please tell me why i have to adjust my serial console speed ?
Ive always had it at 115,200. Any ive still been able to use the Wifly at
anything up to 57600 without a problem. Cant get Wifly working at 115,200 though.
FYI i’m using the USB Shield and the Wifly on Top of an Arduino Uno.
Ive changed the CS pin for the Wifly shield to pin 6.(const static uint8_t SS = 6;)
in “pins_arduino.h”
All works well.
I would really like to have the Bulk Transfer working for the Wifly Shield.
Ive tried playing with that section of code and i can get it to work
by checking that the output buffer is empty before i send any data
but i know this is slow from comments in your code.
Obviously some more dynamic way of seeing whats free in the output
buffer and then filling only that would be better.
When i enable Bulk Transfers i do get a noticeable speed increase even with …
void SpiUartDevice::write(const uint8_t *buffer, size_t size) {
while (readRegister(TXLVL) < 64) {
// Wait for empty TX buffer (slow)
//(But apparently still not slow enough to ensure delivery.)
};
select();
transfer(THR); // TODO: Change this when we modify register addresses? (Even though it's 0x00.)
while(size > 64)
{
transfer_bulk(buffer, 64);
size -= 64;
buffer += 64;
}
transfer_bulk(buffer, size);
deselect();
}
Without the Bulk Transfer and at 57600 with the Wifly it takes about 30 secs to send a 130K jpg file.
With Bulk Transfer and the code above at 57600 it takes only 10 seconds.
Any advice how how to get the speed up or get the bulk transfer working better would be good.
A little more info on my application…
Canon500d Camera to USB Host Shield.
Arduino Uno serving up webpage to control the camera and show live view stream to anything on Wifi with a browser via Ad-hoc connection.(thanks to your client server code).
I’m using an iPad or my iPhone with Safari.
–Matt