PPPOS reset settings not working and disconnects after internet query

I am using pppos to connect sim800 module to esp32.

The library does not reset modem with this setting

  • [“pppos.rst_gpio”, 18]
  • [“pppos.rst_act”, 1]
  • [“pppos.rst_mode”, 1]
  • [“pppos.rst_hold_ms”, 1000]
  • [“pppos.rst_wait_ms”, 10000]

Every time it reaches state PPPOS_START_SEQ it always goes to state PPPOS_BEGIN_WAIT and never to PPPOS_RESET.

This is the log
mgos_pppos.c:112 Trying baud rate 115200 (fc off)…
mgos_pppos.c:133 12 -> 5 1.283611 0.000000
mgos_mongoose.c:66 New heap free LWM: 222452
mgos_ota_core.c:1308 UID: 0fbb618d12869391, license: none
mg_rpc.c:470 0x3ffc2bd0 CHAN OPEN (loopback)
mgos_event.c:135 ev RPC0 triggered 1 handlers
mgos_net.c:85 PPP: connecting
mgos_provision_state:43 Current state: 0 -> 1
mgos_event.c:135 ev PRV0 triggered 1 handlers
mgos_event.c:135 ev NET1 triggered 3 handlers
mgos_net.c:85 PPP: connecting
mgos_event.c:135 ev NET1 triggered 3 handlers
mgos_pppos.c:133 5 -> 6 2.493448 2.493310
mgos_pppos.c:133 6 -> 7 3.760709 0.000000
mgos_pppos.c:608 Connecting (UART2, APN ‘ncell’)…
mgos_pppos.c:133 7 -> 8 3.773036 0.000000
mgos_pppos.c:133 8 -> 9 3.777763 5.777680
mgos_pppos.c:133 9 -> 8 3.785463 0.000000
mgos_pppos.c:133 8 -> 9 3.860738 5.860664
mgos_pppos.c:133 9 -> 8 3.868174 0.000000
mgos_pppos.c:133 8 -> 9 3.960737 5.960664
mgos_pppos.c:133 9 -> 8 3.968456 0.000000
mgos_pppos.c:133 8 -> 9 4.070738 6.070664
mgos_pppos.c:133 9 -> 8 4.079674 0.000000
mgos_pppos.c:133 8 -> 9 4.170736 6.170664
mgos_pppos.c:263 SIM800 R14.18, IMEI: XXXXX
mgos_pppos.c:133 9 -> 8 4.188569 0.000000
mgos_pppos.c:133 8 -> 9 4.270746 6.270664
mgos_pppos.c:133 9 -> 8 4.280306 0.000000
mgos_pppos.c:133 8 -> 9 4.370732 6.370664
mgos_pppos.c:133 9 -> 8 4.380759 0.000000
mgos_pppos.c:133 8 -> 9 4.470731 6.470663
mgos_pppos.c:333 SIM is ready, IMSI: XXXX, ICCID: XXX
mgos_event.c:135 ev PoS2 triggered 0 handlers
mgos_pppos.c:133 9 -> 8 4.497141 0.000000
mgos_pppos.c:133 8 -> 9 4.570747 6.570663
mgos_pppos.c:133 9 -> 8 4.579879 0.000000
mgos_pppos.c:133 8 -> 9 4.670732 6.670664
mgos_pppos.c:388 Connected to mobile network (home)
mgos_pppos.c:133 9 -> 8 4.686006 0.000000
mgos_pppos.c:133 8 -> 9 4.770741 6.770663
mgos_pppos.c:133 9 -> 8 4.778371 0.000000
mgos_pppos.c:133 8 -> 9 4.870730 6.870662
mgos_pppos.c:406 Operator: 42902
mgos_pppos.c:133 9 -> 8 4.886380 0.000000
mgos_pppos.c:133 8 -> 9 4.970748 6.970664
mgos_pppos.c:416 RSSI: -95
mgos_pppos.c:133 9 -> 8 4.984560 0.000000
mgos_pppos.c:133 8 -> 9 5.070753 7.070667
mgos_pppos.c:133 9 -> 8 5.078238 0.000000
mgos_pppos.c:133 8 -> 9 5.170735 7.170662
mgos_pppos.c:133 9 -> 8 5.184137 0.000000
mgos_pppos.c:133 8 -> 9 5.260731 7.260663
mgos_pppos.c:133 9 -> 10 5.270187 0.000000
mgos_pppos.c:732 Starting PPP, user ‘’
mgos_pppos.c:133 10 -> 11 5.281508 0.000000
mgos_net.c:89 PPP: connected
mgos_event.c:135 ev NET2 triggered 3 handlers
mgos_mongoose.c:66 New heap free LWM: 221416
mgos_mongoose.c:66 New heap free LWM: 221348
mgos_mongoose.c:66 New heap free LWM: 221320
mgos_pppos.c:189 Error 9 (phase 0), reconnect
mgos_pppos.c:133 11 -> 1 63.307594 0.000000
mgos_pppos.c:133 1 -> 12 63.312534 0.000000
mgos_event.c:135 ev PoS1 triggered 0 handlers
mgos_pppos.c:133 12 -> 5 63.322064 0.000000
mgos_net.c:85 PPP: connecting
mgos_event.c:135 ev NET1 triggered 3 handlers
mgos_pppos.c:133 5 -> 6 64.600693 64.526833
mgos_pppos.c:133 6 -> 7 65.810744 0.000000
mgos_pppos.c:608 Connecting (UART2, APN ‘ncell’)…
mgos_pppos.c:133 7 -> 8 65.823072 0.000000
mgos_pppos.c:133 8 -> 9 65.827773 67.827693
mgos_pppos.c:133 9 -> 8 65.835753 0.000000
mgos_pppos.c:133 8 -> 9 65.900735 67.900662
mgos_pppos.c:133 9 -> 8 65.907628 0.000000
mgos_pppos.c:133 8 -> 9 65.990737 67.990662
mgos_pppos.c:133 9 -> 8 65.998473 0.000000
mgos_pppos.c:133 8 -> 9 66.100736 68.100661
mgos_pppos.c:133 9 -> 8 66.109374 0.000000
mgos_pppos.c:133 8 -> 9 66.200735 68.200662
mgos_pppos.c:263 SIM800 R14.18, IMEI: XXXX
mgos_pppos.c:133 9 -> 8 66.218190 0.000000
mgos_pppos.c:133 8 -> 9 66.300745 68.300661
mgos_pppos.c:133 9 -> 8 66.309890 0.000000
mgos_pppos.c:133 8 -> 9 66.400735 68.400662
mgos_pppos.c:133 9 -> 8 66.410428 0.000000
mgos_pppos.c:133 8 -> 9 66.480736 68.480662
mgos_pppos.c:333 SIM is ready, IMSI: XXXX, ICCID: XXXX
mgos_event.c:135 ev PoS2 triggered 0 handlers
mgos_pppos.c:133 9 -> 8 66.506432 0.000000
mgos_pppos.c:133 8 -> 9 66.600748 68.600663
mgos_pppos.c:133 9 -> 8 66.608292 0.000000
mgos_pppos.c:133 8 -> 9 66.700736 68.700662
mgos_pppos.c:388 Connected to mobile network (home)
mgos_pppos.c:133 9 -> 8 66.715251 0.000000
mgos_pppos.c:133 8 -> 9 66.800745 68.800661
mgos_pppos.c:133 9 -> 8 66.808616 0.000000
mgos_pppos.c:133 8 -> 9 66.900735 68.900662
mgos_pppos.c:406 Operator: 42902
mgos_pppos.c:133 9 -> 8 66.916306 0.000000
mgos_pppos.c:133 8 -> 9 66.990749 68.990661
mgos_pppos.c:416 RSSI: -95
mgos_pppos.c:133 9 -> 8 67.004817 0.000000
mgos_pppos.c:133 8 -> 9 67.100751 69.100662
mgos_pppos.c:133 9 -> 8 67.108197 0.000000
mgos_pppos.c:133 8 -> 9 67.200736 69.200662
mgos_pppos.c:133 9 -> 8 67.216842 0.000000
mgos_pppos.c:133 8 -> 9 67.310785 69.310712
mgos_pppos.c:133 9 -> 10 67.320714 0.000000
mgos_pppos.c:732 Starting PPP, user ‘’
mgos_pppos.c:133 10 -> 11 67.332013 0.000000
mgos_net.c:89 PPP: connected
mgos_event.c:135 ev NET2 triggered 3 handlers
mgos_mongoose.c:66 New heap free LWM: 221188
mgos_mongoose.c:66 New heap free LWM: 221124
mgos_mongoose.c:66 New heap free LWM: 221088
mgos_net.c:101 PPP: ready, IP 10.116.233.120, GW 192.168.254.254, DNS 8.8.8.8
mgos_provision_state:43 Current state: 1 -> 2
mgos_event.c:135 ev PRV0 triggered 1 handlers
mgos_rpc_channel_ws:261 0x3ffc1f18 Connecting to wss://mdash.net/api/v2/rpc, SSL? 1
mg_http.c:2934 wss://mdash.net/api/v2/rpc use_ssl? 1 tcp://mdash.net:443
mg_net.c:928 0x3ffc9400 tcp://mdash.net:443 -,-,ca.pem
mgos_vfs.c:256 ca.pem -> /ca.pem pl 1 -> 1 0x3ffc1430 (refs 2)
mgos_vfs.c:350 open ca.pem 0x0 0x1b6 => 0x3ffc1430 ca.pem 2 => 258 (refs 2)
mgos_vfs.c:383 close 258 => 0x3ffc1430:2 => 0 (refs 1)
mg_net.c:928 0x3ffbb998 udp://8.8.8.8:53 -,-,-
mg_net.c:796 0x3ffbb998 udp://8.8.8.8:53
mgos_event.c:135 ev NET3 triggered 3 handlers
mg_net.c:811 0x3ffbb998 udp://8.8.8.8:53 -> 0
mg_rpc.c:470 0x3ffc2bd0 CHAN OPEN (loopback)
mgos_event.c:135 ev RPC0 triggered 1 handlers
mgos_mongoose.c:66 New heap free LWM: 220388
mgos_mongoose.c:66 New heap free LWM: 220264
mgos_mongoose.c:66 New heap free LWM: 219728
mg_resolv.c:213 Failed to resolve ‘mdash.net’, server 8.8.8.8
mgos_rpc_channel_ws:205 0x3ffc1f18 TCP connect failed: -1
mgos_rpc_channel_ws:347 reconnect in 5
mg_net.c:167 0x3ffc9400 0x110 1
mgos_rpc_channel_ws:261 0x3ffc1f18 Connecting to wss://mdash.net/api/v2/rpc, SSL? 1
mg_http.c:2934 wss://mdash.net/api/v2/rpc use_ssl? 1 tcp://mdash.net:443
mg_net.c:928 0x3ffc93f8 tcp://mdash.net:443 -,-,ca.pem
mgos_vfs.c:256 ca.pem -> /ca.pem pl 1 -> 1 0x3ffc1430 (refs 2)
mgos_vfs.c:350 open ca.pem 0x0 0x1b6 => 0x3ffc1430 ca.pem 2 => 258 (refs 2)
mgos_vfs.c:383 close 258 => 0x3ffc1430:2 => 0 (refs 1)
mg_net.c:928 0x3ffc9bc0 udp://8.8.8.8:53 -,-,-
mg_net.c:796 0x3ffc9bc0 udp://8.8.8.8:53
mg_net.c:811 0x3ffc9bc0 udp://8.8.8.8:53 -> 0
mgos_mongoose.c:66 New heap free LWM: 219480

Also, my connection drops every time I try to make an internet request. If I disable mdash, mqtt, sntp, etc it is able to keep the connection alive where as if I enable any one of those, as soon as it tries to connect to the server the modem gets disconnected.

I have a 1000uF cap across sim800, supplied with 12V 1A and a buck converter set at 4V.
This is the converter I am using.