VishalsinhBais / gsm-shield-arduino

Automatically exported from code.google.com/p/gsm-shield-arduino
0 stars 0 forks source link

read() on GSM #90

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm using the GSMSHIELD library with the GBoard (SIM900 module)

There is no way to find out weather _cell.available() is > 0 from outside.
uint8_t read() will return 255 when nothing is available and read(*buffer,size) 
will always return size, because there is a return statement missing if no more 
bytes are available.

Solution:
1) Make read() method return int and not uint8_t as is in the official client 
library
2) Implement available() method delegate
3) return i; when no more bytes are available in the read(*buf,size) function. 
this way, the correct amount of read bytes is returned.

Original issue reported on code.google.com by v.woch...@gmail.com on 4 Nov 2013 at 1:45

GoogleCodeExporter commented 8 years ago
I may have just fixed this bug for you, see my comment on Issue #96

Original comment by Matthias...@gmail.com on 27 Jan 2014 at 3:43