2021-05-17 05:13 AM
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
Solved! Go to Solution.
2021-05-25 10:58 PM
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.
2021-05-19 12:19 AM
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 :
In this case I changed it to common_start_sequence_step +15 to go in the sequence that changes the scan mode :
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 ?
2021-05-25 10:58 PM
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.