MaJerle / lwcell

Lightweight cellular modem host AT library
MIT License
395 stars 147 forks source link

Hardfault error sometimes #54

Open vinhemotiv opened 3 years ago

vinhemotiv commented 3 years ago

Hello, Sometimes, I get hardfault error when calling this function to attach network? I'm using Sim800C with STM32 while (lwgsm_network_request_attach() != lwgsmOK) { lwgsm_delay(1000); printf("Network request attach FAILED \r\n"); if(count_connect++ >5) { goto terminate; } } Any idea to resolve it?

MaJerle commented 3 years ago

Doyou know what was instruction causing hardfault? Which core do you use?

vinhemotiv commented 3 years ago

I'm trying to debug it. Is it a blocking function? will loop forever if it causes any error? I'm using mqtt client example. I did use your old version cmsis-rtos v1, and it looks more stable than v2? Why did you change it to v2?

vinhemotiv commented 3 years ago

Is it possible to turn off GSM module after connection? I want to send data 10 minutes every times but don't want to keep it on to save battery

MaJerle commented 3 years ago

Cmsis-os2 is working well. Function is blocking yes.

vinhemotiv commented 3 years ago

I'm trying to use Sim7000E. I have to send a few commands "AT" to get "OK" to config the auto baurt rate before initializing the library. Is there anywhere in the lib to do that? I recognize that it won't work if Simcom has not been configured the COM rate automatically.

MaJerle commented 3 years ago

This implementation is not available in the lib at the moment