Troubles with Serial console and Razberry addin card

Hi,

I have my RPi 2 running osmc with no problem.

I also have hyperion installed (using SPI bus) which works fine.

My problem comes with the Razberry (Z-Wave) addin card which use the serial port of the RPi 2.

I cannot connect to the server using ttyAMA0.

My question is : how can I see if ttyAMA0 is already configured/used by another process ? and if so, how can I free it ?

Thank you for your help

I’m unsure from what you post whether you can SSH to the RPi - but if you can, then
ls -l /dev |grep ttyAMA will show if it exists/is configured
ps -ef |grep tty will show some types of use (eg getty)
As to freeing it, it depends what has created or is using it - you may have to delve into the startup scripts to find it, and freeing it may compromise the system.

Derek

Hi

I haven’t configured ttyAMA0 in OSMC as it doesn’t make much sense to do this. systemd may have done something new fangled, so I’d check for the existence of:

/etc/systemd/system/getty.target.wants/getty@ttyAMA0.service

I’d check you can run the following command

echo test | sudo tee /dev/ttyAMA0

I’m not sure what that card does, but it goes without saying you’ll need permission to access /dev/ttyAMA0 (and its currently owned by root). I’d suggest:

  • sudo chown osmc:osmc /dev/ttyAMA0
  • if your card now works, you’ll need to set up a udev rule to fix the ownership of the device on boot

S

Thank you for your help !

I think that you’re right and the ttyAMA0 is not the problem. here is my results :

osmc@osmc:/etc/systemd/system$ ls
bluetooth.target.wants
hwclock.service.d 
multi-user.target.wants             
sockets.target.wantsdbus-org.bluez.service            
sshd.servicedbus-org.freedesktop.Avahi.service 
serial-getty@ttymxc0.servic.service sysinit.target.wantsfake-               
serial-getty@ttymxc0.service

osmc@osmc:/etc/systemd/system$ echo test | sudo tee /dev/ttyAMA0
test

osmc@osmc:/etc/systemd/system$ sudo chown osmc:osmc /dev/ttyAMA0
osmc@osmc:/etc/systemd/system$ ls -la /dev/ | grep ttyAMA0
crw-rw----  1 osmc osmc  204,  64 Apr  3 10:41 ttyAMA0 

I saw a problem when manually start the serveur :

osmc@osmc: /opt/z-way-server$ sudo /etc/init.d/z-way-server stop
Stopping z-way-server: done.
osmc@osmc: /opt/z-way-server$ cd /opt/z-way-server
osmc@osmc: /opt/z-way-server$ sudo ./z-way-server
./z-way-server: error while loading shared libraries: libzcommons.so: cannot open shared object file: No such file or directory

But I’m not able to apt-get this Lib. Any idear ?
Thanks

Problem solved by creating a link to the library :

 sudo ln -s /usr/lib/arm-linux-gnueabihf/libarchive.so.13 /usr/lib/arm-linux-gnueabihf/libarch ive.so.12

Thank you for your help ! :smiley: