Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

3G modem start up @ boot

Featured Replies

I am trying to understand and construct a script that will run my 3g usb modem at startup. I have great difficulty in understanding the syntax. I am using a PI PC+ with Ubuntu Xenial. If I type the following at the command prompt: 

Quote

sakis3g --sudo connect --sudo USBINTERFACE="3" --sudo APN="telstra.internet"

My modem connects to the internet. Sakis3g is located in /home/opi/usr/local/bin/sakis3g. Can someone offer guidance or an example that would execute the above command at startup please?

 

  • Author

1.) So I have sakis3g installed

 

2.)

So I created a file : sudo nano /etc/sakis3g.conf  with the following info:

Quote

 

USBINTERFACE="3"

APN="telstra.internet"

MODEM="19d2:0031"

 

 

 

3.) I created an autconnectnet script - sudo nano /etc/init.d/autoconnectnet with the following:

 

Quote

 

#***************************************************

#! /bin/sh

# /etc/init.d/autoconnectnet

 

### BEGIN INIT INFO

# Provides:          noip

# Required-Start:    $remote_fs $syslog

# Required-Stop:     $remote_fs $syslog

# Default-Start:     2 3 4 5

# Default-Stop:      0 1 6

# Short-Description: Simple script to start a program at boot

# Description:       A simple script from www.stuffaboutcode.com which will start / stop a program a boot / shutdown.

### END INIT INFO

 

 

case "$1" in

  start)

    sleep 10

    echo "connecting via sakis3g"

    # run application you want to start

    /usr/local/bin/sakis3g --sudo  "connect"

    ;;

  stop)

    echo "dissconnecting via sakis3g"

    # kill application you want to stop

    /usr/local/bin/sakis3g --sudo  "disconnect"

    ;;

  *)

    echo "Usage: /etc/init.d/autoconnectnet {start|stop}"

    exit 1

    ;;

esac

 

exit 0

#*********************************************************


 

 

If I type: sudo /etc/init.d/autoconnectnet start or sudo /etc/init.d/autoconnectnet stop it starts and stops no problems.

 


4.) Now, when I switch the power off and back on, this .conf file seems to get corrupted or modified. The following is displayed when try to go back to this entry - sudo nano /etc/sakis3g.conf  and the editor is blank. 

 

 

Quote

Error reading lock file /etc/.sakis3g.conf.swp: Not enough data read 

 

What am I doing wrong? I want the modem to start after powering on.

 

 

  • Author

:-) sorta right under my nose. I have cloned Armbian/config to my OPi. I went into /config folder and chmod +x the files but I cannot get the Debian-config menu system to show.

43 minutes ago, PaulofOz said:

:-) sorta right under my nose. I have cloned Armbian/config to my OPi. I went into /config folder and chmod +x the files but I cannot get the Debian-config menu system to show.


You can set it from a menu if you have exactly this Huawei 909 modem. I took the script from @Stanislav Sinyagin https://txlab.wordpress.com/ who is dealing more with those 3G/4G modems. 

Just try to make it up/down the same way.

  • Author
On 6/2/2018 at 5:07 PM, Igor said:

My OS crashed and seemed to no longer load beyond a certain point. So, I have reinstalled the .img along with PIAWARE. All is good. I have cloned the latest Armbian configuration and install utility but now I am lost? Is this meant to run from entering on the command line : sudo delian-config .

Sudo armbian-config takes me to the old configuration utility that does not contain the LTE modem option.

2 hours ago, PaulofOz said:

Sudo armbian-config takes me to the old configuration utility that does not contain the LTE modem option.


This functionality is not yet arrived into the armbian-config stable package. Scripts are specifically designed for a modem which I have around (armbian-config will show you options to connect only if you have one of supported), for others init scripts, you need to look at @Stanislav Sinyagin blog. I sent you this link to peek into the code and DIY. 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.