mlinaje/gsm-shield-arduino

read() on GSM

GoogleCodeExporter opened this issue · 1 comments

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

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