Hi Loboris,
I have one question like do we need to add interface input for GSM as well into TCP IP Adapter Interface Input List like WiFi STA, WiFi Ap and Ethernet Interface if we plan to add GSM Interface as well with ESP32?
/* TODO: add Ethernet interface */
typedef enum {
TCPIP_ADAPTER_IF_STA = 0, /**< ESP32 station interface */
TCPIP_ADAPTER_IF_AP, /**< ESP32 soft-AP interface */
TCPIP_ADAPTER_IF_ETH, /**< ESP32 ethernet interface */
TCPIP_ADAPTER_IF_MAX
} tcpip_adapter_if_t;
ESP32 with GSM modem - PPP over Serial (PPPoS) client example
Re: ESP32 with GSM modem - PPP over Serial (PPPoS) client example
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: ESP32 with GSM modem - PPP over Serial (PPPoS) client example
Has someone faced issues when downloading 'large' files with the GSM? (Same file download using WIFI has no problem)
I'm downloading a 100Kb file, but when GSM module reads it, gets stuck at 16Kb aprox.
The first 16 chunks of 1024 bytes are read ok, but then it starts to 'Dropping bad fcs...''
I attach PPP DEBUG:
https://pastebin.com/ZYGKEZvE
I'm using same functions of loboris example
For reading via HTTPS I'm doing like the example
To make you an idea, I'm printing debug messages in each of the conditionals 'if' and when GSM gets stuck downloading, can't see more messages there.
Thanks in advance
EDIT: so in the library there's this comment (refering to Dropping bad FCS)
/* Note: If you get lots of these, check for UART frame errors or try different baud rate */
It's true that UART lines from ESP32 to module are relatively large (10 cm)
Gsm module works at 115200 by default, so I changed to 57600 still having bad FCS, then changed to 38400 and it worked
Not sure if the problem is really a hw issue or just the baudrate was too fast that internal libraries couldnt take that speed.
I'm downloading a 100Kb file, but when GSM module reads it, gets stuck at 16Kb aprox.
The first 16 chunks of 1024 bytes are read ok, but then it starts to 'Dropping bad fcs...''
I attach PPP DEBUG:
https://pastebin.com/ZYGKEZvE
I'm using same functions of loboris example
For reading via HTTPS I'm doing like the example
Code: Select all
do
{
len = BUFFSIZE;
ret = mbedtls_ssl_read(&ssl, (unsigned char *)bufferRead, len);
if(ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE)
{
...
}
if(ret == MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY)
{
...
}
if( ret < 0 ) /* receive error */
{
...
}
else if( (ret > 0) && (!resp_body_start) ) /* reading header first and a piece of body */
{
...
}
else if( (ret > 0) && (resp_body_start) ) /* already read the header, reading body */
{
...
}
else if( ret == 0 ) /* packet over */
{
...
}
}
while(1);
Thanks in advance
EDIT: so in the library there's this comment (refering to Dropping bad FCS)
/* Note: If you get lots of these, check for UART frame errors or try different baud rate */
It's true that UART lines from ESP32 to module are relatively large (10 cm)
Gsm module works at 115200 by default, so I changed to 57600 still having bad FCS, then changed to 38400 and it worked
Not sure if the problem is really a hw issue or just the baudrate was too fast that internal libraries couldnt take that speed.
Re: ESP32 with GSM modem - PPP over Serial (PPPoS) client example
My ESP32 is working as WIFI AP mode.markwj wrote:A wifi hotspot? What you would need is:Ansics wrote:What is the expected output of this PPPOS?
I have interfaced GSM module(from simcom) with ESP32 and ESP32 is in WIFI AP mode. I need internet access to devices which are connected to ESP.
The code for this is not in the current ESP-IDF framework and is non-trivial.
- A router for messages going between the two interfaces.
- To do Source NAT (changing source IP address of outgoing Wifi traffic to IP of PPPoS link, and possibly changing source port if a conflict with another connection arises)
- Connection tracking for the above (to address source port conflicts)
- Connection tracking helpers for the more complex protocols (FTP, for example)
I connect my mobile with ESP32.
I also configured SIM5360 (3G module) with ESP32 and established ppp connection.
Now the problem is I need a bridge between wifi and ppp.
I need to make ESP32 as an internet hotspot which is using 3G module.
Who is online
Users browsing this forum: No registered users and 5 guests