PPP Network

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
tangerino
Posts: 17
Joined: Sun Jul 25, 2021 8:34 am

PPP Network

Post by tangerino » Mon May 30, 2022 5:28 pm

I have a working hardware with 4G modem.
The modem setup is OK, from reseting it to configure APN.

Is not clear if PPP needs to be called after we dial ATD*99# or PPP will dial itself.

No error is shown with the following code

Code: Select all

        print(f'[MODM] CSQ: {rssi} {ber}')
        wait_sim_card_ready(modem, timeout=60000)
        wait_register_network(modem, timeout=30000)
        set_apn(modem, apn='my_apn')
        print(modem.AT("operator"))
        print(modem.AT("dial", '*99#'))
        ppp = network.PPP(modem.uart)
        ppp.active(True)
        ppp.connect("sl2sfr", "")
        while True:
            status = ppp.status()
            print(ppp.ifconfig())
            connection_state = ppp.isconnected()
            print(f'[PPP] Connection state: {connection_state}. Status {status}')
            sleep(5)
No error,
Connection state is always False

Code: Select all

('0.0.0.0', '0.0.0.0', '255.255.255.255', '0.0.0.0')
[PPP] Connection state: False. Status None
Is there any document dedicated to PPP?
Is there any working code available, examples, etc?

Thank you in advance.

tangerino
Posts: 17
Joined: Sun Jul 25, 2021 8:34 am

Re: PPP Network

Post by tangerino » Wed Jun 01, 2022 2:52 pm

Anyone can help me here, please?

KJM
Posts: 158
Joined: Sun Nov 18, 2018 10:53 pm
Location: Sydney AU

Re: PPP Network

Post by KJM » Thu Jun 02, 2022 5:16 am

It's been a long time since I saw anyone try to use an ATD dial cmd. What brand modem are you using with which sim provider & where did you get the idea for the code example you've given?

tangerino
Posts: 17
Joined: Sun Jul 25, 2021 8:34 am

Re: PPP Network

Post by tangerino » Sun Jun 05, 2022 9:37 am

My setup is:
ESP32 - 8MB SRAM
Modem - Quectel EG915

The code is my own with very little help from the forum.
The SIM is an operational one, tested with modem + RaspberryPi + PPP.
Once you dial and*99# you yield the uart control to PPP services (this is my understanding) that will talk PPP and implement the interface to be used as any network channel.

KJM
Posts: 158
Joined: Sun Nov 18, 2018 10:53 pm
Location: Sydney AU

Re: PPP Network

Post by KJM » Mon Jun 06, 2022 10:48 pm

I haven't tangled with a Quectel. My usual approach with a new cell modem is to follow an AT setup example usually provided in the modem manual. Failing that I try a google search for the language/board+modem (eg upython+quectel or ESP32+quectel)

If your PPP setup worked on an RPI+quectel but not with an ESP32+quectel it's probably because it's using some python library that upython doesn't have or something from the debian OS. I vaguely recall that a Sierra 320U I had on an rpi relied on a call to the OS to get it running.

Maybe checkout https://python-quectel-com.translate.go ... _tr_pto=sc or https://forums.quectel.com/

Post Reply