5 years, 11 months ago.

Change Radio Access Technology in EasyCellularConnection

Dear Experts,

I am developing a prototype based on STM32 L476RG and Quectel BG96 Nb-IoT modem. I created a custom target and set the UART pins connected to the modem accordingly. I use EasyCellularConnection library and I managed to get it connected to the Internet. However, I couldn't find a way to change the Radio Access Technology to RAT_NB1. Anyone know how to do that?

I see in features/cellular/targets/QUECTEL/BG96/QUECTEL_BG96_CellularNetwork.cpp it will change to certain radio technology and I would like to set it to RAT_NB1.

Here is my current main snippet:

#include "mbed.h"
#include "mbed_trace.h"
#include "EasyCellularConnection.h"


DigitalOut myled(LED1);
Serial pc(USBTX, USBRX);
EasyCellularConnection cellConn(true);

// main() runs in its own thread in the OS
int main() {
	mbed_trace_init();

    cellConn.set_credentials("myapn.com");
	nsapi_error_t cellConnStatus = cellConn.connect();

	wait(3.0);

    if(cellConnStatus == NSAPI_ERROR_OK)
    	pc.printf("\r\nSuccessfully connected to ****\r\n");
    else
    	pc.printf("\r\nFailed to connect to the APN\r\n");
}

1 Answer

5 years, 10 months ago.

Hi Muhamad,

Just want to let you know I am looking into this. Given just EasyCellularConnection I don't think it is possible to directly set the RAT, but I think it might be possible to create a subclass that can do this. I will update you when I know more.

-Michael

Hi Michael,

I ended up with creating a subclass of EasyCellularConnection which has additional method to change RAT. But before I do that, I need to modify the EasyCellularConnection class by adding a new method which return the CellularNetwork used by CellularConnectionFSM.

Muhamad

posted by Muhamad Andung Muntaha 30 Jun 2018