ThumbDV on Ubuntu 20.04 Focal Fossa


John Spoonhower
 

I am working on installing  a thumbDV on a current release Ubuntu machine. I have followed the instructions John provided "Quick Build on Linux" but I have run into problem(s).
The download and compilation of the source file goes OK.
Likewise the installation of the executable and support files look like it went OK.
I have edited the file ambeserver-ttyUSB0.conf to look like:
#
# 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=""
AMBESERVER_FLAGS="-s 460800"

When I start the service I get error messages:
sudo systemctl status ambeserver@...
● ambeserver@... - DV3000 Daemon
     Loaded: loaded (/lib/systemd/system/ambeserver@.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2020-04-24 13:28:07 EDT; 33s ago
    Process: 111775 ExecStartPre=/bin/chgrp dialout /dev/ttyUSB0 (code=exited, status=217/USER)

Apr 24 13:28:07 ubuntu1 systemd[1]: Starting DV3000 Daemon...
Apr 24 13:28:07 ubuntu1 systemd[111775]: ambeserver@...: Failed to determine user credentials: N>
Apr 24 13:28:07 ubuntu1 systemd[111775]: ambeserver@...: Failed at step USER spawning /bin/chgrp>
Apr 24 13:28:07 ubuntu1 systemd[1]: ambeserver@...: Control process exited, code=exited, status=>
Apr 24 13:28:07 ubuntu1 systemd[1]: ambeserver@...: Failed with result 'exit-code'.
Apr 24 13:28:07 ubuntu1 systemd[1]: Failed to start DV3000 Daemon.
Apr 24 13:28:07 ubuntu1 systemd[1]: ambeserver@...: Triggering OnFailure= dependencies.

I am not sure what's going on. Looking foe some guidance!
73,
John, NX2I


 

Hi John,

This looks like a permissions problem.  Try running the python script to test the ThumbDV™ directly (no AMBEserver running).  If that works, then run AMBEserver in the foreground (no daemon) as that may give more clues.  Finally, make sure the created process user (probably root for daemon) is in the dialout group (based on the error).  Make sure chgrp is in /bin or if Ubuntu moved it.


On Fri, Apr 24, 2020 at 10:46 AM John Spoonhower <jpspoonhower@...> wrote:
I am working on installing  a thumbDV on a current release Ubuntu machine. I have followed the instructions John provided "Quick Build on Linux" but I have run into problem(s).
The download and compilation of the source file goes OK.
Likewise the installation of the executable and support files look like it went OK.
I have edited the file ambeserver-ttyUSB0.conf to look like:
#
# 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=""
AMBESERVER_FLAGS="-s 460800"

When I start the service I get error messages:
sudo systemctl status ambeserver@...
● ambeserver@... - DV3000 Daemon
     Loaded: loaded (/lib/systemd/system/ambeserver@.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2020-04-24 13:28:07 EDT; 33s ago
    Process: 111775 ExecStartPre=/bin/chgrp dialout /dev/ttyUSB0 (code=exited, status=217/USER)

Apr 24 13:28:07 ubuntu1 systemd[1]: Starting DV3000 Daemon...
Apr 24 13:28:07 ubuntu1 systemd[111775]: ambeserver@...: Failed to determine user credentials: N>
Apr 24 13:28:07 ubuntu1 systemd[111775]: ambeserver@...: Failed at step USER spawning /bin/chgrp>
Apr 24 13:28:07 ubuntu1 systemd[1]: ambeserver@...: Control process exited, code=exited, status=>
Apr 24 13:28:07 ubuntu1 systemd[1]: ambeserver@...: Failed with result 'exit-code'.
Apr 24 13:28:07 ubuntu1 systemd[1]: Failed to start DV3000 Daemon.
Apr 24 13:28:07 ubuntu1 systemd[1]: ambeserver@...: Triggering OnFailure= dependencies.

I am not sure what's going on. Looking foe some guidance!
73,
John, NX2I



--
John D. Hays
Kingston, WA
K7VE

 


John Spoonhower
 

Greetings John from Central FL!
I confirmed that the thumbDV is at /dev/ttyUSB0. Here's the dmesg output:
225.880433] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0

I ran the test python test program with success (after editing to change the serial device to /dev/ttyUSB0):
python ./AMBEtest3.py
Setting ...
/dev/ttyUSB0
d
8
N
1
False
False
False

Reset
6100010033
Wrote: 5 bytes

Product ID
6100010030
Wrote: 5 bytes

Version
6100010031
Wrote: 5 bytes

Set DSTAR Mode
61000c000a013007634000000000000048
Wrote: 17 bytes

I then tried starting AMBEserver from the command line (without luck apparently...):
sudo AMBEserver -s 460800 -p 2460 -i /dev/ttyUSB0
AMBEserver: Starting...
AMBEserver: Opened serial port /dev/ttyUSB0 at 460800 bps.
AMBEserver: Couldn't find start byte in serial data
AMBEserver: error receiving response to reset
AMBEserver: Could not initialize the DV3K!

John, NX2I


 

Are the LEDs blinking during the test?

It actually looks like it is not talking. 

Has this ThumbDV™ worked before? Other computer or OS?

If it won't respond, then contact sales@...



On Fri, Apr 24, 2020, 12:02 John Spoonhower <jpspoonhower@...> wrote:
Greetings John from Central FL!
I confirmed that the thumbDV is at /dev/ttyUSB0. Here's the dmesg output:
225.880433] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0

I ran the test python test program with success (after editing to change the serial device to /dev/ttyUSB0):
python ./AMBEtest3.py
Setting ...
/dev/ttyUSB0
d
8
N
1
False
False
False

Reset
6100010033
Wrote: 5 bytes

Product ID
6100010030
Wrote: 5 bytes

Version
6100010031
Wrote: 5 bytes

Set DSTAR Mode
61000c000a013007634000000000000048
Wrote: 17 bytes

I then tried starting AMBEserver from the command line (without luck apparently...):
sudo AMBEserver -s 460800 -p 2460 -i /dev/ttyUSB0
AMBEserver: Starting...
AMBEserver: Opened serial port /dev/ttyUSB0 at 460800 bps.
AMBEserver: Couldn't find start byte in serial data
AMBEserver: error receiving response to reset
AMBEserver: Could not initialize the DV3K!

John, NX2I


Michael E. Jaggers
 

How old is that ThumbDV?

Is it possible that it requires the lower baud rate of 230400 rather than 460800? 

Just a thought...
Mike, WB4TTZ

-----Original Message-----
From: John D Hays - K7VE
Sent: Apr 24, 2020 2:59 PM
To: ambe@nw-digital-radio.groups.io
Subject: Re: [ambe] ThumbDV on Ubuntu 20.04 Focal Fossa

Are the LEDs blinking during the test?

It actually looks like it is not talking. 

Has this ThumbDV™ worked before? Other computer or OS?

If it won't respond, then contact sales@...



On Fri, Apr 24, 2020, 12:02 John Spoonhower <jpspoonhower@...> wrote:
Greetings John from Central FL!
I confirmed that the thumbDV is at /dev/ttyUSB0. Here's the dmesg output:
225.880433] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0

I ran the test python test program with success (after editing to change the serial device to /dev/ttyUSB0):
python ./AMBEtest3.py
Setting ...
/dev/ttyUSB0
d
8
N
1
False
False
False

Reset
6100010033
Wrote: 5 bytes

Product ID
6100010030
Wrote: 5 bytes

Version
6100010031
Wrote: 5 bytes

Set DSTAR Mode
61000c000a013007634000000000000048
Wrote: 17 bytes

I then tried starting AMBEserver from the command line (without luck apparently...):
sudo AMBEserver -s 460800 -p 2460 -i /dev/ttyUSB0
AMBEserver: Starting...
AMBEserver: Opened serial port /dev/ttyUSB0 at 460800 bps.
AMBEserver: Couldn't find start byte in serial data
AMBEserver: error receiving response to reset
AMBEserver: Could not initialize the DV3K!

John, NX2I





John Spoonhower
 

Yes, the LED blinks when AMBEtest3 runs.
when I run AMBEserver -s 460800 -p 2460 -i /dev/ttyUSB0 I see the LED blink 1 time.

dropping the speed to 230400 doesn't change anything. The thumbDV just arrived here a week ago; I assume it was (is) a new version.

I could try to run the device on a windows machine if that makes sense. Please let me know.
73, John NX2I


 

If you have a Windows machine, there is a test program in the files section of this group.  It shouldn't hurt :)



On Fri, Apr 24, 2020 at 1:30 PM John Spoonhower <jpspoonhower@...> wrote:
Yes, the LED blinks when AMBEtest3 runs.
when I run AMBEserver -s 460800 -p 2460 -i /dev/ttyUSB0 I see the LED blink 1 time.

dropping the speed to 230400 doesn't change anything. The thumbDV just arrived here a week ago; I assume it was (is) a new version.

I could try to run the device on a windows machine if that makes sense. Please let me know.
73, John NX2I



--
John D. Hays
Kingston, WA
K7VE

 


 

Yes, if this is a brand new ThumbDV™ from the website, then it should be the 460800 version.  Each unit is tested before shipping.

On Fri, Apr 24, 2020 at 1:30 PM John Spoonhower <jpspoonhower@...> wrote:
Yes, the LED blinks when AMBEtest3 runs.
when I run AMBEserver -s 460800 -p 2460 -i /dev/ttyUSB0 I see the LED blink 1 time.

dropping the speed to 230400 doesn't change anything. The thumbDV just arrived here a week ago; I assume it was (is) a new version.

I could try to run the device on a windows machine if that makes sense. Please let me know.
73, John NX2I



--
John D. Hays
Kingston, WA
K7VE

 


John Spoonhower
 

OK,
I will run the windows test tomorrow. I just ran the same tests (with the same results) on a different Linux machine running  Linux Mint 19.3 (Ubuntu bionic).
John S


John Spoonhower
 

OK....I had some free time. I ran the ThumbTest.exe program on Windows 7 and the device passed.
It's back to Ubuntu....
John, NX2I


 

Try this

sudo usermod -G dialout opendv
Then try starting AMBEserver again.


On Fri, Apr 24, 2020 at 4:06 PM John Spoonhower <jpspoonhower@...> wrote:
OK....I had some free time. I ran the ThumbTest.exe program on Windows 7 and the device passed.
It's back to Ubuntu....
John, NX2I



--
John D. Hays
Kingston, WA
K7VE

 


John Spoonhower
 

Here's what happens:
sudo usermod -G dialout opendv
[sudo] password for john:
usermod: user 'opendv' does not exist


John Spoonhower
 

John,
maybe there's some progress here. I added opendv to the dialout group with:
sudo adduser -G dialout opendv

then the service starts OK for awhile:
john@ubuntu1:~$ sudo systemctl status ambeserver@...
● ambeserver@... - DV3000 Daemon
     Loaded: loaded (/lib/systemd/system/ambeserver@.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2020-04-24 21:05:21 EDT; 33s ago
    Process: 87701 ExecStartPre=/bin/chgrp dialout /dev/ttyUSB0 (code=exited, status=0/SUCCESS)
    Process: 87710 ExecStartPre=/bin/chmod 0660 /dev/ttyUSB0 (code=exited, status=0/SUCCESS)
   Main PID: 87711 (AMBEserver)
      Tasks: 1 (limit: 2170)
     Memory: 416.0K
     CGroup: /system.slice/system-ambeserver.slice/ambeserver@...
             └─87711 /usr/sbin/AMBEserver -p 2460 -i /dev/ttyUSB0 -s 460800

Apr 24 21:05:21 ubuntu1 systemd[1]: Starting DV3000 Daemon...
Apr 24 21:05:21 ubuntu1 systemd[1]: Started DV3000 Daemon.
Apr 24 21:05:21 ubuntu1 AMBEserver[87711]: AMBEserver: Starting...
Apr 24 21:05:21 ubuntu1 AMBEserver[87711]: AMBEserver: Opened serial port /dev/ttyUSB0 at 460800 >
john@ubuntu1:~$

but then fails:
john@ubuntu1:~$ sudo systemctl status ambeserver@...
● ambeserver@... - DV3000 Daemon
     Loaded: loaded (/lib/systemd/system/ambeserver@.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2020-04-24 21:05:55 EDT; 21s ago
    Process: 87701 ExecStartPre=/bin/chgrp dialout /dev/ttyUSB0 (code=exited, status=0/SUCCESS)
    Process: 87710 ExecStartPre=/bin/chmod 0660 /dev/ttyUSB0 (code=exited, status=0/SUCCESS)
    Process: 87711 ExecStart=/usr/sbin/AMBEserver -p ${UDP_PORT} -i /dev/ttyUSB0 $AMBESERVER_FLAG>
   Main PID: 87711 (code=exited, status=1/FAILURE)

Apr 24 21:05:21 ubuntu1 systemd[1]: Starting DV3000 Daemon...
Apr 24 21:05:21 ubuntu1 systemd[1]: Started DV3000 Daemon.
Apr 24 21:05:21 ubuntu1 AMBEserver[87711]: AMBEserver: Starting...
Apr 24 21:05:21 ubuntu1 AMBEserver[87711]: AMBEserver: Opened serial port /dev/ttyUSB0 at 460800 >
Apr 24 21:05:55 ubuntu1 AMBEserver[87711]: AMBEserver: Couldn't find start byte in serial data
Apr 24 21:05:55 ubuntu1 AMBEserver[87711]: AMBEserver: error receiving response to reset
Apr 24 21:05:55 ubuntu1 AMBEserver[87711]: AMBEserver: Could not initialize the DV3K!
Apr 24 21:05:55 ubuntu1 systemd[1]: ambeserver@...: Main process exited, code=exited,>
Apr 24 21:05:55 ubuntu1 systemd[1]: ambeserver@...: Failed with result 'exit-code'.
Apr 24 21:05:56 ubuntu1 systemd[1]: ambeserver@...: Triggering OnFailure= dependencie>
lines 1-18/18 (END)


 

Try rebooting. 


On Fri, Apr 24, 2020, 18:11 John Spoonhower <jpspoonhower@...> wrote:
John,
maybe there's some progress here. I added opendv to the dialout group with:
sudo adduser -G dialout opendv

then the service starts OK for awhile:
john@ubuntu1:~$ sudo systemctl status ambeserver@...
● ambeserver@... - DV3000 Daemon
     Loaded: loaded (/lib/systemd/system/ambeserver@.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2020-04-24 21:05:21 EDT; 33s ago
    Process: 87701 ExecStartPre=/bin/chgrp dialout /dev/ttyUSB0 (code=exited, status=0/SUCCESS)
    Process: 87710 ExecStartPre=/bin/chmod 0660 /dev/ttyUSB0 (code=exited, status=0/SUCCESS)
   Main PID: 87711 (AMBEserver)
      Tasks: 1 (limit: 2170)
     Memory: 416.0K
     CGroup: /system.slice/system-ambeserver.slice/ambeserver@...
             └─87711 /usr/sbin/AMBEserver -p 2460 -i /dev/ttyUSB0 -s 460800

Apr 24 21:05:21 ubuntu1 systemd[1]: Starting DV3000 Daemon...
Apr 24 21:05:21 ubuntu1 systemd[1]: Started DV3000 Daemon.
Apr 24 21:05:21 ubuntu1 AMBEserver[87711]: AMBEserver: Starting...
Apr 24 21:05:21 ubuntu1 AMBEserver[87711]: AMBEserver: Opened serial port /dev/ttyUSB0 at 460800 >
john@ubuntu1:~$

but then fails:
john@ubuntu1:~$ sudo systemctl status ambeserver@...
● ambeserver@... - DV3000 Daemon
     Loaded: loaded (/lib/systemd/system/ambeserver@.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2020-04-24 21:05:55 EDT; 21s ago
    Process: 87701 ExecStartPre=/bin/chgrp dialout /dev/ttyUSB0 (code=exited, status=0/SUCCESS)
    Process: 87710 ExecStartPre=/bin/chmod 0660 /dev/ttyUSB0 (code=exited, status=0/SUCCESS)
    Process: 87711 ExecStart=/usr/sbin/AMBEserver -p ${UDP_PORT} -i /dev/ttyUSB0 $AMBESERVER_FLAG>
   Main PID: 87711 (code=exited, status=1/FAILURE)

Apr 24 21:05:21 ubuntu1 systemd[1]: Starting DV3000 Daemon...
Apr 24 21:05:21 ubuntu1 systemd[1]: Started DV3000 Daemon.
Apr 24 21:05:21 ubuntu1 AMBEserver[87711]: AMBEserver: Starting...
Apr 24 21:05:21 ubuntu1 AMBEserver[87711]: AMBEserver: Opened serial port /dev/ttyUSB0 at 460800 >
Apr 24 21:05:55 ubuntu1 AMBEserver[87711]: AMBEserver: Couldn't find start byte in serial data
Apr 24 21:05:55 ubuntu1 AMBEserver[87711]: AMBEserver: error receiving response to reset
Apr 24 21:05:55 ubuntu1 AMBEserver[87711]: AMBEserver: Could not initialize the DV3K!
Apr 24 21:05:55 ubuntu1 systemd[1]: ambeserver@...: Main process exited, code=exited,>
Apr 24 21:05:55 ubuntu1 systemd[1]: ambeserver@...: Failed with result 'exit-code'.
Apr 24 21:05:56 ubuntu1 systemd[1]: ambeserver@...: Triggering OnFailure= dependencie>
lines 1-18/18 (END)


John Spoonhower
 

OK. The service is running now. Thanks for the help, John. I'll let it run tonight before taking the next steps in the process tomorrow.
73, John, NX2I