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.

Using OPI pc + for Open Glider Project - unable to add user

Featured Replies

Hello everyone,

 

I have purchased an OPI PC + with intent to use it as a reciever for OGN, a network of recievers used for monitoring FLARM position info of equiped aircraft.  http://wiki.glidernet.org/

 

I have flashed the Legacy 3.4.112 Jessie Desktop image first to the sd card and then installed it to the internal memory of the device. All went smoothly thus far.

 

Then I ran into the problem that is the reason I am posting this thread. When I ran the bootscript

for the installation of the OGN software, I got the following error message in the console:

Bootscript source: http://ognconfig.onglide.com/

 

root@orangepipcplus:/home/andrej# wget http://ognconfig.onglide.com/files/v2.0/bootstrap-O bootstrap
--2016-12-10 15:46:39--  http://ognconfig.onglide.com/files/v2.0/bootstrap
Resolving ognconfig.onglide.com (ognconfig.onglide.com)... 212.13.204.217
Connecting to ognconfig.onglide.com (ognconfig.onglide.com)|212.13.204.217|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7770 (7.6K) [text/plain]
Saving to: ‘bootstrap’

bootstrap           100%[=====================>]   7.59K  --.-KB/s   in 0.002s

2016-12-10 15:46:40 (2.97 MB/s) - ‘bootstrap’ saved [7770/7770]

root@orangepipcplus:/home/andrej# chmod +x bootstrap
root@orangepipcplus:/home/andrej# ./bootstrap
starting...
/usr/bin/sudo

 * Adding ogn user and installing as that
useradd: existing lock file /etc/passwd.lock without a PID
useradd: cannot lock /etc/passwd; try again later.

 * unable to add ogn user?!
root@orangepipcplus:/home/andrej#

I tried adding an user manually using useradd and adduser, no success. Adding a new user is not strictly necessary for the reciever to work, but it seems like the bootscript requires it. I also dont know if there are any potential problems down the line. The software was working with OPI lite, as it is listed as tested on the OGN site.

 

This bootscript is the easiest way for me to get the reciever working, it is supposed to be universal and when I tested it on a desktop with Ubuntu it worked like a charm.

 

Any help is much appreciated,

Andrej

  • Author

Hello again,

After several tries and ample support from the OGN irc I was able do get the OGN reciever working on the OPI PC + using the manual installation method. The only thing that failed was getting the program working at start automatically. Is there a way for me to automate these two commands at start:

 

 ./ogn-rf LJNMT.conf

./ogn-decode LJNMT.conf

 

These two start the reciever.

Any help would be appreciated.

 

The board is running Debian GNU/Linux 8 4.6.7-sun8i

 

Thank you for your help,

LP Andrej

edit /etc/rc.local with your favorite editor and add your required commands the before the line showing "exit 0".

Maybe your commands will need to be inserted with full path of the application location, such as "/home/andrej/openglider/ogn-rf /home/andrej/openglider/LJNMT.conf" and "/home/andrej/openglider/ogn-decode /home/andrej/openglider/LJNMT.conf".

And if one of those commands are not starting in background process, add an ampersand "&" symbol at the end of the line.

  • Author

Like so?

 

 
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/home/ogn/rtlsdr-ogn# ./ogn-rf LJNMT.conf &
/home/ogn/rtlsdr-ogn# ./ogn-decode LJNMT.conf &
exit 0

Not exactly ... dashes need to be removed ...

/home/ogn/rtlsdr-ogn/ogn-rf LJNMT.conf &
/home/ogn/rtlsdr-ogn/ogn-decode LJNMT.conf &

Also, maybe not the case, some programs don't wish to be executed from any arbitrary paths, but only from their own location.

If it is the case, maybe wrap it differently using it own bash script, such as /home/ogn/rtlsdr-ogn/start.sh :

#!/bin/bash

cd /home/ogn/rtlsdr-ogn/
./ogn-rf LJNMT.conf &
./ogn-decode LJNMT.conf &

And call that script in /etc/rc.local that way :

/home/ogn/rtlsdr-ogn/start.sh &
  • Author
Thank you, but unfortunately, neither of those options worked. I think I followed your instructions correctly, but keep in mind that I am new to linux(not to mention any kind of programming) and it is possible that I screwed something up that you experienced people take for granted =).

Under this line is the whole path the command is normally manually executed from, if it makes any difference(root privilege maybe?)

 

root@orangepipcplus:/home/ogn/rtlsdr-ogn# 
  • Author

I wrote the start script with nano as such: root@orangepipcplus:/home/ogn/rtlsdr-ogn# nano start.sh

 
#!/bin/bash
 
cd /home/ogn/rtlsdr-ogn/
./ogn-rf LJNMT.conf &
./ogn-decode LJNMT.conf &
 
Then I placed it into ininto /etc/rc.local this way:
 
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/home/ogn/rtlsdr-ogn/start.sh &
exit 0
 
I did not use the "chmod a+rx ./start.h"
 
No error messages were given.
  • Author

When I run the two commands manually I do it by running each of them separately in their own screen sessions which I then detach so they do not die when i close the putty terminal(i know its not meant for that but it works).

  • Author

After following your instructions and manually starting:

https://paste.ubuntu.com/23841258/

There is, however, no acess to ports 8080 and 8081 which, when acessed, offer insight into the operation of the receiver and demodulator modules, which indicates that they are not running.

  • Author

Dropping both & symbols initiates the first command successfully, but not the second. 

  • Author

Ok, this is spaghetti code but it somehow works so I am not complaining.If you want some sauce you will need to find it somewhere else, I cook even worse than I write code =).

 

Since it didn't work by running the program directly (one process was killing the other and they didn't want to start at power on) I tried doing it using screen(it started at reboot when instructed)

 

I created two entries into /etc/rc.local, start.sh and start1.sh like so:

 

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/home/ogn/rtlsdr-ogn/start.sh &
/home/ogn/rtlsdr-ogn/start1.sh &
exit 0
 
Then I created start.sh

 

 #!/bin/bash

cd /home/ogn/rtlsdr-ogn/
screen -d -m ./ogn-rf LJNMT.conf

 

and start1.sh

 
#!/bin/bash
cd /home/ogn/rtlsdr-ogn/
screen -d -m ./ogn-decode LJNMT.conf
 
 

Then:

 

chmod a+rx /home/ogn/rtlsdr-ogn/start.sh

and

chmod a+rx /home/ogn/rtlsdr-ogn/start1.sh

 

Reciever starts automatically at boot =)

 

I know U martinayotte most probably doesn't want to do anything with this abomination, but without his help, it would be impossible for me to make this work.

 

Thank you!

 

 

  • Author

Thank you again for your help. I am certain there are better ways, however since this will be pretty much an install and forget type of arrangement, this should do.

 

The only thing missing for the board to be perfect for my use is working onboard wifi, but since I need to run a power cable to it anyway ill most probably just connect it to lan as well. Maybe the awesome team behind armbian will port the nmtui interface to the server images in time and then ill reinstall it with that functionality as well.

 

Lep pozdrav,

Andrej =)

  • Author

Hello,

since the rc.local method was quite unreliable I now invoke the auto startup script using cron with @reboot.  Does anyone know if the @reboot means only manual reboot(ie typing reboot into the console) or also any other startup ie after power loss.

Thank you

  • Author

It seems to mean at every boot.

@reboot        Run once, at startup.
@yearly        Run once a year, "0 0 1 1 *".
@annually      (same as @yearly)
@monthly       Run once a month, "0 0 1 * *".
@weekly        Run once a week, "0 0 * * 0".
@daily         Run once a day, "0 0 * * *".
@midnight      (same as @daily)
@hourly        Run once an hour, "0 * * * *".

https://www.pantz.org/software/cron/croninfo.html

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.