sixfab / Sixfab_PPP_Installer

Repository of Sixfab PPP Installer Tool
MIT License
33 stars 35 forks source link

PPP installed but drops connection after a disconnect and does not reconnect unless restarted #21

Closed mohammedpatla closed 4 years ago

mohammedpatla commented 4 years ago

Hi there,

I am running an IOT device using this PI hat, https://sixfab.com/product/raspberry-pi-lte-m-nb-iot-egprs-cellular-hat/

I have installed and everything works fine, but a stage issue, whenever the connection drops (Due to bad network usually) It does not reconnect to my LTE network. A quick restart fixes the issue, but I want the device to be running a script with LTE always ON and if it loses connection should try to reconnect, but the interface just drops unless I restart the PI.

I used the following instructions to install : https://sixfab.com/ppp-installer-for-sixfab-shield-hat/

Any idea why this could be happening?

https://community.sixfab.com/t/ppp-installed-but-drops-connection-after-a-disconnect-and-does-not-reconnect-unless-restarted/565

mohammedpatla commented 4 years ago

@saeedjohar One of the team members even tried to make a function in python (using RPi.GPIO as GPIO) that allows for it to reconnect, but it does not work to reconnect when the device is inside an LTE zone.

Not sure if I am missing something here.

Function -

def activateConnection():
    GPIO.setmode(GPIO.BCM)
    GPIO.setup(24, GPIO.OUT)
    GPIO.setup(18, GPIO.OUT)

    time.sleep(40) #waiting for system to undervolt so that it can start connecting
    # power on modem
    GPIO.output(24, 1)
    time.sleep(1)
    GPIO.output(24, 0)
    time.sleep(15)
    #giving the device enough time to get a connection 
    #bsed on tests the device must be reset to work properly
    GPIO.output(18, 1)
    time.sleep(1)
    GPIO.output(18,0)
    time.sleep(20)

Credits to original Author: Omar

saeedjohar commented 4 years ago

The issue has been resolved by adding persist in the /etc/ppp/peers/provider

Reference: LINK