← index #8728Issue #3740
Related · high · value 0.947
QUERY · ISSUE

ESP32 and PPP not working

openby LordGuillyopened 2022-06-05updated 2023-04-13
bug

I am trying to raise a PPP connection with a modem (two different ones actually, an EG91 and a BG95)
Once the modem is registered into the network, I start the data call with AT commands, and after the "CONNECT" string is received, do the following code in MicroPython:

my_log.info("Starting Data Call", fn="main")
modem.startDataCall()
my_log.info("Creating PPP object", fn="main")
sleep(5)
ppp = network.PPP(modem.getSerialPort())
ppp.active(True)
ppp.connect(authmode=ppp.AUTH_CHAP,username ="", password="")

I am monitoring the PPP frames in the serial line, and I can see the following:

  • the ESP32 sends the first ConfRequest
  • the moddem replies with the ACK and its own ConfRequest
  • but the ESP32 does not reply anything for about 6 seconds, and in the meantime the modem sends new ConfRequests
  • after 6 seconds, the ESP32 seems to process all the requests and ACK them, but this causes abnormal transitions from the PPP FSM.
  • The modem replies the ConfRequest, but again nothing happens for another 6 seconds.
  • The modem times out every second, and sends a new ConfRequest that causes the same problem again and again, until one or both of the parts give up

I enabled LWIP and PPP logs. It seems to me the problem is the UART object is not passing the data received in the serial port to the PPP object straight away, but only after a timeout. I played a bit with some of the hardcoded values (like FSMTIMEOUT), that seems to confirm the guess.
Unfortunately I am unable to find what mechanism will pass the data from the UART object ot the PPP object - all I can see is there is a task created that waits to be notified, but cannot find what's sending such notification.

I am using latest micropython version (master branch, commit 2111ca0b8fdcbef6177a8d37fde53085de2a798a) , and building with ESP-IDF 4.4

any help would be appreciated, I can supply the logs (or enable more segments and capture more if it helps)

CANDIDATE · ISSUE

ESP32: Interest in PPPoS?

closedby MrSurlyopened 2018-04-24updated 2018-10-19

EDIT: I keep forgetting that ESP32 was merged into main. This would be for the ESP32 port.

I have an upcoming project where I'm using PPP and a cellular module for network connectivity. Was wondering:

  • If there's interest in using PPPoS
  • If a patch would be accepted for PPPoS

The idea being the user code does all the setup work for the modem, and hands off a UART object to a network.PPP object.

Thoughts?

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied