cancel
Showing results for 
Search instead for 
Did you mean: 

(Solved) Change BG96 modem configuration

NCatt.1
Associate III

Hello everyone, I'm working on a project that I did not create, it is finished and I have to reopen it to do some changes. The project is based on STM32L496 microcontroller with x-cube-cellular package. It connects to Azure cloud to send sensors data. What I want to do is to change the modem configuration with AT commands to have the best connection. I would like to send the "newscanmode" AT command, available in at_custom_modem_signalling_bg96.c file, but how to send the command ? Is there a function to do this ? Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
NCatt.1
Associate III

After lot of research I found the solution. To change the modem configuration I only have to set bg96_shared.QCFG_command_write to AT_TRUE instead of AT_FALSE. And I must not change the value of common_start_sequence_step, it is automatically incremented.

View solution in original post

2 REPLIES 2
NCatt.1
Associate III

Maybe I found something: in file at_custom_modem_specific.h, in the function ATCustom_BG96_getCmd() we can choose between different power on sequences. There is a variable so we can change its value to select the sequence :

0693W00000AOsBMQA1.png 

In this case I changed it to common_start_sequence_step +15 to go in the sequence that changes the scan mode :

0693W00000AOsBzQAL.png 

In my main code, after initialisation (where I did this change), I try to connect to a website to set my RTC from network time. If I do not change my init (common_start_sequence_step) it works perfectly, but if I change my init (common_start_sequence_step + 15) it doesn't work. There is a connection error during handshake.

Does anybody have an idea ?

NCatt.1
Associate III

After lot of research I found the solution. To change the modem configuration I only have to set bg96_shared.QCFG_command_write to AT_TRUE instead of AT_FALSE. And I must not change the value of common_start_sequence_step, it is automatically incremented.