g4klx / MMDVMHost

The host program for the MMDVM
GNU General Public License v2.0
378 stars 274 forks source link

Cannot open device - /dev/ttyAMA0 #723

Closed photochap closed 3 years ago

photochap commented 3 years ago

Hello Somebody can help me ? I'm install MMDVMHOST on MMDVM_HS_DUAL HAT GPIO in RASPBERRY PI 3 Rasbian PI OS Lite (32-bit) 2021-10-30

sudo apt-get install git screen
cd /opt
sudo git clone https://github.com/g4klx/MMDVMHost.git
sudo git clone https://github.com/g4klx/MMDVMCal.git
cd /opt/MMDVMHost 
sudo make
cd /opt/MMDVMCal
sudo make
cd /opt/MMDVMHost
sudo vi MMDVM.ini

... [Modem] Port=/dev/ttyAMA0 .... [TFT Serial] Port=/dev/ttyAMA0 ..

sudo vi /boot/cmdline.txt _dwc_otg.lpmenable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

sudo vi /boot/config.txt ... dtparam=audio=on dtoverlay=pi3-disable-bt

sudo vi /lib/systemd/system/mmdvmhost.service [Unit] Description=MMDVM Host Service After=syslog.target network.target [Service] User=mmdvm WorkingDirectory=/opt/MMDVMHost ExecStart=/usr/bin/screen -S MMDVMHost -D -m /opt/MMDVMHost/MMDVMHost /opt/MMDVMHost/MMDVM.ini ExecStop=/usr/bin/screen -S MMDVMHost -X quit [Install] WantedBy=multi-user.target

sudo chmod 755 /lib/systemd/system/mmdvmhost.service
sudo ln -s /lib/systemd/system/mmdvmhost.service /etc/systemd/system/mmdvmhost.service
sudo vi /lib/systemd/system/mmdvmhost.timer

[Timer] OnStartupSec=60 [Install] WantedBy=multi-user.target

sudo chmod 755 /lib/systemd/system/mmdvmhost.timer
sudo ln -s /lib/systemd/system/mmdvmhost.timer /etc/systemd/system/mmdvmhost.timer
sudo groupadd mmdvm
sudo useradd mmdvm -g mmdvm -s /sbin/nologin
sudo usermod mmdvm -G dialout
sudo systemctl daemon-reload
sudo systemctl enable mmdvmhost.timer
sudo systemctl enable mmdvmhost.service
sudo reboot
sudo systemctl start mmdvmhost.service
sudo systemctl status mmdvmhost.service

1- systemctl status mmdvmhost.service : return

● mmdvmhost.service - MMDVM Host Service
     Loaded: loaded (/lib/systemd/system/mmdvmhost.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Mon 2021-11-08 19:52:01 CET; 2s ago
TriggeredBy: ● mmdvmhost.timer
    Process: 1362 ExecStart=/usr/bin/screen -S MMDVMHost -D -m /opt/MMDVMHost/MMDVMHost /opt/MMDVMHost/MMDVM.ini ExecStop=/usr/bin/screen -S MMDVMHost -X quit (code=exited, status=0/SUCCESS)
   Main PID: 1362 (code=exited, status=0/SUCCESS)
        CPU: 35ms

2- /opt/MMDVMHost /opt/MMDVM.ini : return in log

I: 2021-11-08 18:27:11.395     Use COS as Lockout: no
M: 2021-11-08 18:27:11.401 Opening the MMDVM
E: 2021-11-08 18:27:11.401 Cannot open device - /dev/ttyAMA0

3- MMDVM is detected Detected MMDVM (GPIO): /dev/ttyAMA0 (MMDVM 20181212 (D-Star/DMR/System Fusion/P25/NXDN/POCSAG) 19.2000 Mhz (Build: 10:34:23 Dec 11 2018))

4- i flashing MMDVMHost

5- tested with pi-star the MMDVM work

do I something wrong ?

Thankyou

IMG_2062

photochap commented 3 years ago

same problem if I install like that

apt-get update
apt-get upgrade
apt-get install git build-essential portaudio19-dev libusb-1.0-0-dev chkconfig python-pip apache2 php
apt-get install sqlite3 php7.4-sqlite

cd /usr/src
git clone https://github.com/WiringPi/WiringPi.git 
git clone https://github.com/g4klx/MMDVMHost.git
git clone https://github.com/g4klx/MMDVMCal.git
git clone https://github.com/dg9vh/MMDVMHost-Dashboard.git

groupadd mmdvm
useradd mmdvm -g mmdvm -s /sbin/nologin
usermod mmdvm -G dialout

mkdir /var/log/mmdvm 
chown mmdvm:mmdvm /var/log/mmdvm

vi /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=dd25a17e-02 rootfstype=ext4 fsck.repair=yes rootwait
Ou
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

vi /boot/config.txt 
............
# Additional overlays and parameters are documented /boot/overlays/README 
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
# Modification Bluetooth
dtoverlay=pi3-disable-bt 

#wiringPi
cd /usr/src/wiringPi
./build

#MMDVMHost
cd /usr/src/MMDVMHost
N_CPU=$(sed -n -e 1p -e 11p -e 21p -e 31p /proc/cpuinfo | grep -e "processor" | tail --lines 1 | cut -f 2 -d" ")
make -j$N_CPU all
make install

scp user@192.168.x.xx:/Users/tvchap/Downloads/MMDVM.ini /etc/
cp /usr/src/MMDVMHost/DMRIds.dat /usr/local/etc
cp /usr/src/MMDVMHost/NXDN.csv /usr/local/etc/
cp /usr/src/MMDVMHost/RSSI.dat /usr/local/etc/

#MMDVMCal
cd /usr/src/MMDVMCal
make
make install
photochap commented 3 years ago

it's bad MMDVM.ini. I copy mmdvmhost in my pi-star to MMDVM.ini on my MMDVMHost. The file is not compatible ...