How to use AT sockets?

User avatar
gunar.kroeger
Posts: 143
Joined: Fri Jul 27, 2018 6:48 pm

How to use AT sockets?

Postby gunar.kroeger » Tue Dec 10, 2019 1:10 pm

Hi,

We are currently using pppos_client to connect to the internet using the BG96 GSM module.
But ppp does not meet our requirements. We need to be able to constantly being connected to the internet AND sending AT commands to get information like signal strength.

I know it is possible to do this using AT sockets, sending AT commands to create sockets, send and receive from them.

Could someone guide us to how we should implement this to connect with the rest of the esp-idf APIs? We are at the same time connected to the WiFi and sending udp packets should be seemless between GSM and WiFi.

Any help is appreciated
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."

GeorgeG
Posts: 4
Joined: Tue Jun 18, 2019 2:26 pm

Re: How to use AT sockets?

Postby GeorgeG » Thu Dec 19, 2019 9:32 am

Hi gunar.kroeger

I have been looking for a long time to find a ready-made solution to no avail.

The protocol you are looking for is called GSM 07.10:
https://www.etsi.org/deliver/etsi_ts/10 ... 70100p.pdf

A basic driver is created for linux here.
Beware, the licence is GPL :
https://github.com/ya-jeks/gsmmux

The OVMS project has a wonderful implementation of GSM 07.10 and is the only ESP32 compatible solution that I have found so far.

Check this post: http://lists.openvehicles.com/pipermail ... 03359.html

Unfortunately it cannot be used directly as a component in ESP-IDF without including a host of other OVMS modules :cry:
https://github.com/openvehicles/Open-Ve ... simcom/src

I think it is really strange that there is no arduino library to support this protocol, and quite a bummer that ESP-IDF does not provide a solution.

Unfortunately my dev-skills are not top-notch to develop a solution on my own.

Note that the gsm07.10 protocol IS used within the bluedroid component in ESP-IDF.
I have not been able to isolate the logic and create a generic solution for UART.
https://github.com/espressif/esp-idf/bl ... fc_utils.c

Implementing a generic UART based GSM 07.10 protocol for ESP-IDF could really boost it's popularity, as there seems to be no (open source) implementation anywhere for embedded systems...

Where is the proper place to post feature requests to ESP-IDF?
GitHub/Issues?

Greets,
George.

GeorgeG
Posts: 4
Joined: Tue Jun 18, 2019 2:26 pm

Re: How to use AT sockets?

Postby GeorgeG » Wed Jan 29, 2020 10:24 am

@gunar.kroeger

I have created an feature request on github
https://github.com/espressif/esp-idf/issues/4688.

Upvote there if you are still interested.'

Greetings,
George.

User avatar
gunar.kroeger
Posts: 143
Joined: Fri Jul 27, 2018 6:48 pm

Re: How to use AT sockets?

Postby gunar.kroeger » Wed Jan 29, 2020 2:52 pm

Upvoted.
We are still having issues with pppos disconnecting and not reconnecting afterwards, the sad thing is that we based our product on the ability to use GSM and now we can't reliably use it.
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."

axellin
Posts: 60
Joined: Mon Sep 17, 2018 9:09 am

Re: How to use AT sockets?

Postby axellin » Thu Jan 30, 2020 2:32 am

We are still having issues with pppos disconnecting and not reconnecting afterwards,
There are some pull request related to pppos, maybe you can check if it helps.
https://github.com/espressif/esp-idf/pu ... 3Aopen+ppp

User avatar
gunar.kroeger
Posts: 143
Joined: Fri Jul 27, 2018 6:48 pm

Re: How to use AT sockets?

Postby gunar.kroeger » Thu Jan 30, 2020 7:02 pm

I made a separate thread about this, but did you get the set_working_mode() to work? While we have to use pppos, we must be able to change from data to command mode to quickly get rssi and other values.

But it is not working with the example given using BG96. I am also failing trying with raising the DTR pin instead of sending "+++"

any help is appreciated.
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."

axellin
Posts: 60
Joined: Mon Sep 17, 2018 9:09 am

Re: How to use AT sockets?

Postby axellin » Wed Feb 05, 2020 3:38 am

gunar.kroeger wrote:
Thu Jan 30, 2020 7:02 pm
I made a separate thread about this, but did you get the set_working_mode() to work?
I can successfully switch to command mode by +++, however I always got
"NO CARRIER" if switching back to data mode by ATO.

Who is online

Users browsing this forum: Bing [Bot], ESP_Alvin and 22 guests