MaJerle / GSM_AT_commands_parser

Platform independent, ANSI C AT commands parser for SIMcom GSM modules
171 stars 95 forks source link

problem using the http example #4

Closed savior-help closed 7 years ago

savior-help commented 7 years ago

Hi i'm compiling the http example in order to send data to a server. unfortunately i only get "GSM Init Status: 1" and also "Could not attach to GPRS: 11". i'm using sim800 module. what is causing this problem? i really appreciate your help. thanks

MaJerle commented 7 years ago

Module works, sim inserted, pin correct? Hardware works?

savior-help commented 7 years ago

Yes, i can work with module via uart.and the sim doesnt have any pin.

MaJerle commented 7 years ago

You may go to debug or check responses on uart (sniff mode)

savior-help commented 7 years ago

Is there any parameter that can be different and need to be set in library?

MaJerle commented 7 years ago

Shouldnt be. What did rx check say? Connect tx from sim to rx from usbuart and check responses only on pc.

savior-help commented 7 years ago

as i sniffed the data i realized that from micro the instruction AT+CREG? is sent and then the sim answers by AT+CREG? +CREG: 0,1

OK but the micro doesent go any further. where can it be wrong. apparently at first for initializing it just send ATs and get the OK.

MaJerle commented 7 years ago

Nice catch. You use my example directly? What microcontroller? Last time someone asked me like this we figure that irq was too slow for MCU.

savior-help commented 7 years ago

for now yes. i'm using stm32f4 discovery board. i know this is not related but i think i might find another problem in rtc library too.it seems it dosen't work with external oscilator. would you mind checking it?

MaJerle commented 7 years ago

What rtc are you talking about. Btw, creg chech is not executed in init as you said that init fails.

savior-help commented 7 years ago

internal rtc library related to stm32f4. i really don't have low level knowledge of the code i just know that in sniffing init section the only command that is sent is AT and nothing else.

MaJerle commented 7 years ago

Why it wouldn't work? HAL does everything for you. Don't understand.

Contact me in private and we can take a look at your code. I'm sure there are problems on your side since I tested now again and works ok. Maybe PLL clock does not work properly.

savior-help commented 7 years ago

ok

MaJerle commented 7 years ago

The verdict: GSM low-level was not set up properly.