nimaltd / gsm_v5

gsm module library for STM32 LL
GNU General Public License v3.0
232 stars 86 forks source link

Bug in gsm_gprs_httpRead() #41

Open RoyaGhaennezhad opened 2 years ago

RoyaGhaennezhad commented 2 years ago

I find that in atc_command function we erase rx_Buffer whit atc empty(atc); commands before copy data from rx_Bufferto to Auxiliary buffer .for debugging this issue I added a bit field like uint8_t http_read_start :1 ; and set it in gsm_gprs_httpRead function before sending at command and reset it at end of function Next in atc_empty function check this bit feild like this

void atc_empty(atc_t *atc) { if(atc->http_read_start==0) { memset(atc->rxBuffer, 0, _ATC_RXSIZE); atc->rxIndex = 0; } }