Page 1 of 1

How to use AT sockets?

Posted: Tue Dec 10, 2019 1:10 pm
by gunar.kroeger
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

Re: How to use AT sockets?

Posted: Thu Dec 19, 2019 9:32 am
by GeorgeG
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.

Re: How to use AT sockets?

Posted: Wed Jan 29, 2020 10:24 am
by GeorgeG
@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.

Re: How to use AT sockets?

Posted: Wed Jan 29, 2020 2:52 pm
by gunar.kroeger
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.

Re: How to use AT sockets?

Posted: Thu Jan 30, 2020 2:32 am
by axellin
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

Re: How to use AT sockets?

Posted: Thu Jan 30, 2020 7:02 pm
by gunar.kroeger
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.

Re: How to use AT sockets?

Posted: Wed Feb 05, 2020 3:38 am
by axellin
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.