I am using GL868-dual telit modem. I am using its GSM/GPRS feature for my application.
I am uploading total 10K of ASCII data to ftp server after every 5-10 mins in command mode, 1K data at a time.
I am checking modem’s CTS line is zero or not before sending next 1k of data (i.e. I have used modem’s handshaking feature).
Then also my ftp data are gets corrupted.
Now my FTP file will be open in Append data mode. So that I can append 10K of data to one row, then I am appending CrLf(i.e. 0x0D,0x0A) at the end of 10K buffer. Due to this my next 10K data will be appended from new row.
But in some file my data gets corrupted, garbaged in between. (i.e. for e.g. after 200bytes, data will start from new row/ instead of inserting CrLf, new row data gets appended to same row only.)
Could any one suggest me where I am doing wrong?
Thanks in advace…
Do a proper hardware flow control, not simply checking at 1K intervals.
Can you please elaborate the meaning of proper hardware flow control?
I am checking flow control before every transmission on modem’s UART.
And also I have enable interrupt on CTS pin. SO whenever modem will set/reset the CTS pin, it will give me interrupt. I am sending next data bytes if and only if CTS pin is low.
So how else can I test?
And do you ever see the interrupt during sending data? Try to send larger blocks of data to see if it works.
Hit enter to search or ESC to close
Knowledge Base & Download Zone