ESP32 GPRS/PPP support
ESP32 GPRS/PPP support
Dear all,
Could you please provide any advice regarding following?
I need to build an app that will work as a gateway between ESP32 UART port and Web Socket via GPRG/EDGE connection.
I've seen that that for this I need a LWIP module.
Now I'm using MicroPython_ESP32_psRAM_LoBo firmware.
On the build stage I enabled PPP support in the IDF components.
CONFIG_PPP_SUPPORT=y
CONFIG_PPP_PAP_SUPPORT=y
CONFIG_PPP_CHAP_SUPPORT=y
CONFIG_PPP_MSCHAP_SUPPORT=y
CONFIG_PPP_MPPE_SUPPORT=y
CONFIG_PPP_DEBUG_ON=y
CONFIG_L2_TO_L3_COPY=y
As I understand I need a LWIP python module.
How to inject it into the firmware ?
Or is the any easy way to get GPRS connectivity on ESP32 uPython ?
Thank you in advance.
Could you please provide any advice regarding following?
I need to build an app that will work as a gateway between ESP32 UART port and Web Socket via GPRG/EDGE connection.
I've seen that that for this I need a LWIP module.
Now I'm using MicroPython_ESP32_psRAM_LoBo firmware.
On the build stage I enabled PPP support in the IDF components.
CONFIG_PPP_SUPPORT=y
CONFIG_PPP_PAP_SUPPORT=y
CONFIG_PPP_CHAP_SUPPORT=y
CONFIG_PPP_MSCHAP_SUPPORT=y
CONFIG_PPP_MPPE_SUPPORT=y
CONFIG_PPP_DEBUG_ON=y
CONFIG_L2_TO_L3_COPY=y
As I understand I need a LWIP python module.
How to inject it into the firmware ?
Or is the any easy way to get GPRS connectivity on ESP32 uPython ?
Thank you in advance.
Re: ESP32 GPRS/PPP support
I have GSM/GPRS support implemented in my MicroPython port.
It uses esp-idf/lwip PPPoS support, so that any network function can be used over GSM the same way as with WiFi.
The implementation is in testing phase, I expect to merge it to GitHub repository next week.
I'm testing with Simcom modules (SIM900, SIM800 (2G), SIM5300E (3G)), but it should work with any GSM module.
It uses esp-idf/lwip PPPoS support, so that any network function can be used over GSM the same way as with WiFi.
The implementation is in testing phase, I expect to merge it to GitHub repository next week.
I'm testing with Simcom modules (SIM900, SIM800 (2G), SIM5300E (3G)), but it should work with any GSM module.
Re: ESP32 GPRS/PPP support
Awesome news.
We will wait for it.
Thank you.
We will wait for it.
Thank you.
Re: ESP32 GPRS/PPP support
Hello.
Could you pls give an example of how the PPPoS function works in your port?
Could you pls give an example of how the PPPoS function works in your port?
Re: ESP32 GPRS/PPP support
Completed GSM/PPPoS support and the related documentation will be pushed to GitHub next week.
The usage is quite simple, here are the available functions:
network.GSM.start(tx, rx [,rts] [,cts] [,baudrate] [, user] [, password], apn [, wait]) - starts the GSM/PPPoS task and initializes GSM module
network.GSM.stop() - stops the GSM/PPPoS task
network.GSM.status() - returns the task status
network.GSM.connect() - connects to the Internet, all network functions works the same as with WiFi Internet connection
network.GSM.disconnect([endtask] [, rfoff]) - disconnects from Internet, other GSM functions can be used
The following functions can be executed only when disconnected from Internet:
network.GSM.sendSMS(gsmnum, msg) - send sms
network.GSM.readSMS() - read all received messages
network.GSM.deleteSMS(index) - delete sms message
network.GSM.onSMS(function) - register callback function to be executed when the new sms is received
While GSM/PPPoS is started, WiFi can only be used in AP mode.
The usage is quite simple, here are the available functions:
network.GSM.start(tx, rx [,rts] [,cts] [,baudrate] [, user] [, password], apn [, wait]) - starts the GSM/PPPoS task and initializes GSM module
network.GSM.stop() - stops the GSM/PPPoS task
network.GSM.status() - returns the task status
network.GSM.connect() - connects to the Internet, all network functions works the same as with WiFi Internet connection
network.GSM.disconnect([endtask] [, rfoff]) - disconnects from Internet, other GSM functions can be used
The following functions can be executed only when disconnected from Internet:
network.GSM.sendSMS(gsmnum, msg) - send sms
network.GSM.readSMS() - read all received messages
network.GSM.deleteSMS(index) - delete sms message
network.GSM.onSMS(function) - register callback function to be executed when the new sms is received
While GSM/PPPoS is started, WiFi can only be used in AP mode.
Re: ESP32 GPRS/PPP support
loboris,
I tried to buld a port with the CONFIG_MICROPY_USE_GSM option enabled.
However, when I try to use a connection
import network
network.GSM.start(pin1, pin2, apn)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'GSM'
Thanks in advance!
I tried to buld a port with the CONFIG_MICROPY_USE_GSM option enabled.
However, when I try to use a connection
import network
network.GSM.start(pin1, pin2, apn)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'GSM'
Thanks in advance!
Re: ESP32 GPRS/PPP support
The gsm functions are now in the gsm module.
Instead of using network.GSM.<method> use gsm.<method>()
Default value for the optional connect argument is False, if not set to True you must execute gsm.connect() to go online.
You can use gsm.debug(True|False) to turn debuging messages on|off.
The full documentation will be pushed today or tomorrow.
Instead of using network.GSM.<method> use gsm.<method>()
Code: Select all
import gsm
gsm.start(tx=27, rx=26, apn='my_provoder_apn' [,connect=True|False])
You can use gsm.debug(True|False) to turn debuging messages on|off.
The full documentation will be pushed today or tomorrow.
Re: ESP32 GPRS/PPP support
It works with my SIM868!
Many thanks for your excellent work!
Many thanks for your excellent work!
-
- Posts: 81
- Joined: Fri Sep 02, 2016 9:26 am
Re: ESP32 GPRS/PPP support
It isn't working with sim5360. here is wher its fail :
>>> I (404831) [PPPOS CLIENT]: AT COMMAND: [AT..]
I (404865) [PPPOS CLIENT]: AT RESPONSE: [AT...OK..]
I (404965) [PPPOS CLIENT]: AT COMMAND: [AT+CFUN=4..]
I (405004) [PPPOS CLIENT]: AT RESPONSE: [AT+CFUN=4...OK..]
I (405004) [PPPOS CLIENT]: GSM initialization start
I (405604) [PPPOS CLIENT]: AT COMMAND: [AT..]
I (405637) [PPPOS CLIENT]: AT RESPONSE: [AT...OK..]
I (405737) [PPPOS CLIENT]: AT COMMAND: [ATZ..]
I (405769) [PPPOS CLIENT]: AT BAD RESPONSE: [ATZ.]
W (405769) [PPPOS CLIENT]: Wrong response, restarting...
any ideas?
>>> I (404831) [PPPOS CLIENT]: AT COMMAND: [AT..]
I (404865) [PPPOS CLIENT]: AT RESPONSE: [AT...OK..]
I (404965) [PPPOS CLIENT]: AT COMMAND: [AT+CFUN=4..]
I (405004) [PPPOS CLIENT]: AT RESPONSE: [AT+CFUN=4...OK..]
I (405004) [PPPOS CLIENT]: GSM initialization start
I (405604) [PPPOS CLIENT]: AT COMMAND: [AT..]
I (405637) [PPPOS CLIENT]: AT RESPONSE: [AT...OK..]
I (405737) [PPPOS CLIENT]: AT COMMAND: [ATZ..]
I (405769) [PPPOS CLIENT]: AT BAD RESPONSE: [ATZ.]
W (405769) [PPPOS CLIENT]: Wrong response, restarting...
any ideas?
Re: ESP32 GPRS/PPP support
Hi Loboris,loboris wrote: ↑Thu Oct 26, 2017 8:02 amThe gsm functions are now in the gsm module.
Instead of using network.GSM.<method> use gsm.<method>()Default value for the optional connect argument is False, if not set to True you must execute gsm.connect() to go online.Code: Select all
import gsm gsm.start(tx=27, rx=26, apn='my_provoder_apn' [,connect=True|False])
You can use gsm.debug(True|False) to turn debuging messages on|off.
The full documentation will be pushed today or tomorrow.
I am new on this forum.
I am trying to get an esp32cam working with a SIM7600 using websockets...how?!
I see you said full documentation would be available ... where can I find the documentation?
Thanks!
Phil