Re: AMBEServer Install for PiDV


Mike Besemer - WM4B
 

Pi B+ v1.2 and the latest Stretch.

 

From: ambe@nw-digital-radio.groups.io [mailto:ambe@nw-digital-radio.groups.io] On Behalf Of John D Hays - K7VE
Sent: Tuesday, March 12, 2019 4:04 PM
To: ambe@nw-digital-radio.groups.io
Subject: Re: [ambe] AMBEServer Install for PiDV

 

Which model Raspberry pi and OS?

 

 

 

On Tue, Mar 12, 2019, 12:57 Mike Besemer <mwbesemer@...> wrote:

John,

 

Done.  The following is the result after issuing “sudo systemctl status  ambeserver@ttyAMA0”

 

I don’t know what the heck I’m looking at!

 

Mike

WM4B

 

 

● ambeserver@... - DV3000 Daemon

   Loaded: loaded (/etc/systemd/system/ambeserver@.service; enabled; vendor preset: enabled)

   Active: failed (Result: exit-code) since Tue 2019-03-12 15:48:57 EDT; 14s ago

  Process: 28545 ExecStart=/usr/sbin/AMBEserver -p ${UDP_PORT} -i /dev/ttyAMA0 $AMBESERVER_FLAGS (code=exited, status=1/FAILURE)

  Process: 28541 ExecStartPre=/bin/chmod 0660 /dev/ttyAMA0 (code=exited, status=0/SUCCESS)

  Process: 28538 ExecStartPre=/bin/chgrp dialout /dev/ttyAMA0 (code=exited, status=0/SUCCESS)

Main PID: 28545 (code=exited, status=1/FAILURE)

 

Mar 12 15:48:56 raspberrypi systemd[1]: Starting DV3000 Daemon...

Mar 12 15:48:57 raspberrypi systemd[1]: Started DV3000 Daemon.

Mar 12 15:48:57 raspberrypi AMBEserver[28545]: AMBEserver: Starting...

Mar 12 15:48:57 raspberrypi AMBEserver[28545]: AMBEserver: error when opening /dev/ttyAMA0: Permission denied

Mar 12 15:48:57 raspberrypi systemd[1]: ambeserver@...: Main process exited, code=exited, status=1/FAILURE

Mar 12 15:48:57 raspberrypi systemd[1]: ambeserver@...: Unit entered failed state.

Mar 12 15:48:57 raspberrypi systemd[1]: ambeserver@...: Triggering OnFailure= dependencies.

Mar 12 15:48:57 raspberrypi systemd[1]: ambeserver@...: Failed with result 'exit-code'.

 

From: ambe@nw-digital-radio.groups.io [mailto:ambe@nw-digital-radio.groups.io] On Behalf Of John D Hays - K7VE
Sent: Tuesday, March 12, 2019 1:23 PM
To: ambe@nw-digital-radio.groups.io
Subject: Re: [ambe] AMBEServer Install for PiDV

 

Mike,

 

Set up the opendv user:

 

sudo useradd -s /bin/false opendv

 

then 

 

sudo usermod -G dialout

sudo usermod -G gpio

sudo usermod -G audio

 

In /etc/opendv create 3 files:  ambeserver-ttyAMA0.conf  ambeserver-ttyS0.conf  ambeserver-ttyUSB0.conf

 

Each will contain:

#

# Configuration file for the AMBEserver program started by systemd.

# Adding flags to AMBESERVER_FLAGS will pass this to the daemon.

# For example, to change the speed to 460800, use the following line:

# AMBESERVER_FLAGS="-s 460800"

#

 

UDP_PORT=2460

AMBESERVER_FLAGS="-r"

 

create a file in /etc/systemd/system named ambeserver@.service

 

Containing:

[Unit]

Description=DV3000 Daemon

After=network.target serial-getty@%i.service dev-%i.device

Conflicts=serial-getty@%i.service

OnFailure=serial-getty@%i.service

 

[Service]

User=opendv

EnvironmentFile=/etc/opendv/%p-%i.conf

PermissionsStartOnly=true

ExecStartPre=/bin/chgrp dialout /dev/%i

ExecStartPre=/bin/chmod 0660 /dev/%i

ExecStart=/usr/sbin/AMBEserver -p ${UDP_PORT} -i /dev/%i $AMBESERVER_FLAGS

Restart=on-abort

 

[Install]

WantedBy=multi-user.target

 

 

Startup and enable  ambeserver

 

sudo systemctl enable  ambeserver@ttyAMA0

sudo systemctl start  ambeserver@ttyAMA0

sudo systemctl status  ambeserver@ttyAMA0

 

If you are not familiar with systemd  check out manual pages:

 

man systemctl

man systemd

 

 


John D. Hays
Edmonds, WA

K7VE

 

   

 

Join ambe@nw-digital-radio.groups.io to automatically receive all group messages.