nRF9160 external modem

Zoptune
Posts: 18
Joined: Mon May 27, 2019 11:02 pm

nRF9160 external modem

Postby Zoptune » Thu Aug 11, 2022 2:30 pm

Hi,

I would like to use the nRF9160 as an LTE modem and I want to avoid using the esp_modem component as it uses the raw binary mode but I want to stay in AT mode so I can still send AT commands. (and CMUX is not supported by nRF9160)

The nRF9160 offers interesting high level proprietary AT commands to directly open a socket, a TCP client, ... (complete list here).

I would like to integrate the driver to the esp-idf network stack so that others components like esp_mqtt or esp_http_client work the same.

The thing is that I don't know where I should integrate my driver in the different idf components.
I can see that esp_transport is used by MQTT and HTTP components but I did not dig deeper yet.

If someone can help me understand the architecture of the esp network components and how they interact between each other that would be really helping.
Also if someone have any advise on what AT commands type I should go for (socket, or tcp/udp), feel free to share :)

Thanks
Attachments
nrf9160_at_commands.png
nrf9160_at_commands.png (103.02 KiB) Viewed 2637 times

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: nRF9160 external modem

Postby ESP_Sprite » Fri Aug 12, 2022 2:04 am

That is going to be loads of work, as the external modem effectively has its own TCP/IP stack, replacing the LWIP stack that esp-idf uses internally. You could indeed modify esp_transport, but that would only work for the components that uses those - anything that uses default POSIX sockets (including esp_transport-using apps which also do stuff with the raw socket they get from esp_transport_get_socket()) will need to be modified separately.

I think it may be a more feasible path to use the raw binary ppp mode to send/receive your data, as the software stack is way more flexible when used this way, and find some way on the nRF9160 side to still get access to AT commands.

Zoptune
Posts: 18
Joined: Mon May 27, 2019 11:02 pm

Re: nRF9160 external modem

Postby Zoptune » Sat Aug 13, 2022 3:06 am

Thank you for your response.

That's what I feared. I hoped while reading the ESP-NETIF documentation that I could "easily" replace lwIP by a custom implementation.
I will dig deeper to see if replacing esp_transport is feasible but I would like to build something generic that can be used by all components and as you said this might not be the best approach.

I will start, as you said, by using the raw binary ppp mode and see if I can do something on the nRF side. As I got hands on the code running on it, maybe I can implement a kind of multiplexer.

Thanks again and if you have anything that could help that comes to your mind later, feel free to come back here :D

Who is online

Users browsing this forum: No registered users and 103 guests