read(buf, len) bug....Found error in code... #1752
Labels
Component: Core
Related to the code for the standard Arduino API
Library: Wifi
The Wifi Arduino library
UPDATE*** I have fixed this code in the udp_dev version..
in ard_utils.c
This function should return only the unread contents but instead the whole buffer of old and new data is returned. Even though the read(buf, len) from arduino only asks for 10 bytes. This should accept a LENGTH var and return the data at the current p->idx location up to end of buffered data or LENGTH reached...
This makes the WiFi code on arduino fail for wificlient.read(buf, len)..
So currently you can ONLY read one byte at a time and it is very slow with all the SPI traffic for each byte.
This is called in: ard_spi.c
This routine should accept another param of LENGTH from the arduino and only read that many bytes in the call to GetTcpData.
The text was updated successfully, but these errors were encountered: