S7G2 - Best way to implement a network connection handler using NETX for LAN, WiFi and GSM

In our hardware solution using the S7G2, our main application needs to connect to a server to regular upload data. It can do so either via GSM, WiFi or wired ethernet.

For the GSM modem, its a module, so we use AT commands.

For the WiFi, we have our own plug-in module with an MCU talking to the WiFi module. This plug-in module can be controlled from the main board via our own UART interface. 

We need a connection handler of sorts to manage the 3 possible connections. The application will only talk on one connection at a given time, but has rules and priorities to switch between connections. Can we use NetX in some way to handle these 3 connections?

  • Hi Sudesh,

    Does your GSM modem have data mode? If you only have AT commands at your disposal it will be very tricky to use it with NetX.

    Typically you can use single NetX IP instance with three physical interfaces (like we do in AE-CLOUD2 cloud application projects) however this requires for all of your physical interfaces to have NetX-compatible drivers.
  • Hi Karol,

    Yes, the GSM modem (Quectel EC25) supports data mode.

    I assume also, that the WiFi module (we using the USR-C210) must also support data mode for this to work? Is that correct?

    Also, over these 3 physical interfaces, we want to use NetX to run an FTP client to connect to an FTP server on our head-end, in addition to connection to a separate server for normal TC/IP communications.
  • Hi Karol,

    I have confirmed that our WiFi module supports data mode. So the my next questions are:

    1. How do I get our GSM and WiFi physical interfaces to have NetX-compatible drivers? Do you have examples of NetX compatible driver code written for another GSM and WiFi modules, that I can look at and port the drivers to make them work with our devices?

    2. My project as it stands (which has been in development for some time now), is built using SSP version 1.3.0.
    Do I need to update to a newer or latest version of SSP?
  • Any update on my further two questions above?
  • I want to further add, that the WiFi module (USR-C210) and the GSM module (Quectel EC25) both support data (transparent mode), which means, I should be able to use a single NetX IP instance over these two interfaces and over Ethernet, and make use of NetX NSAL. Please confirm?
  • Hi Sudesh,

    You can find GT202 WiFi driver in the SSP. The basic requirement for WiFi is such that its SF_WIFI driver provides link-layer transmit function and receive callback. SF_WIFI_NSAL_NX module acts as an intermediate low-level driver for NetX that will allow you to connect your own SF_WIFI driver.

    Similarly to WiFi, you will find 3 Cellular Modem drivers in the SSP (CAT1 and CAT3 drivers for Nimbelink/Telit modems and CAT-M1/NB for Quectel BG96). I highly recommend that you start with the driver for BG96 since it's likely to be command-compatible with EC25. SF_CELLULAR drivers use SF_CELLULAR_NSAL_NX to act as low-level NetX interface.

  • Thank you Karol.

    So just to clarify, even though I select the GT202 framework for WiFi, for example, I can replace the driver in SSP Supplemental folder with a port for USR-C210 and similarly, for the Cellular Modem, I start with CAT-M1/NB for Quectel BG96 and replace with a port to the EC25. Correct?

    I have some further questions as well:
    1. The initial hardware that I am bringing up my application on (while I wait for new hardware with the EC25) has Quectel M95 modem. I guess, I should still select CAT-M1/NB for Quectel BG96? Correct?

    2. We need to support two SIM cards - we have two sim slots. So the application must switch between two operators. If it cannot connect to our server on the first, it must fall back to second sim. Furthermore, it should also spend time retrying on each sim, like 3 retries, before completely failing. And once it completely fails, it must notify the main thread, so that it can take action to try to connect via WiFi or Ethernet. How can this be achieved with the Cellular framework?
  • Hi Karol,
    Regarding my last two questions:
    For Q1: I managed to talk to my M95 modem using the Cellular Framework. I used the CAM-M1 for Quectel driver and modified it. I also need to re-define SF_CELLULAR_STR_LEN_32 to actually be SF_CELLULAR_STR_LEN_64 since
    some of the response lengths from the M95 are larger than 32 characters.

    For Q2: I still need your feedback on this question with respect to switching between two sim slots and re-trying on each slot 3 times.
  • To switch SIM you would need to use the M95 AT command :-



    and then use one of the other M95 SIM related AT commands to check the SIM as per your requirements.

Reply Children
No Data