Writing to the serial port (GPIO TX/RX)

I am trying to use openhab to control arduinos. This requires my user to be able to write to the serial port, there is allot of documentation on how to do this on other distros but I can’t seem to find info on it for Mate.

I have added the user to the dialout group.

$ groups openhab
openhab : openhab dialout

However I cant write to the port still, other distros say to do things like edit /boot/cmdline.txt which appears to already have been done, maybe by apt-get?

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait quiet splash

Those same posts say the /etc/inittab needs to be edited, however it doesn’t exist,
Can someone point me in the right direction?

Got the same problem, anybody?

Hi people,

it may be a users and groups issue, see the following thread:

Problem solved.

I did three things:

  1. modified the edit /boot/cmdline.txt file to this
    dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait quiet splash
  2. ran raspi-config
    sudo apt-get install raspi-config
    sudo raspi-config
    select 9 Advanced options -> A8 Serial Port -> Would you like shell to access serial port -> Select No
  3. Add your use to the group
    sudo gpasswd --add ${USER} dialout
    reboot

Should work now.

1 Like