How to use RxD/TxD (pin 8/10) through /dev/tty*?


#1

Hi folks, I got problem to use Razberry Z-Wave board on GPIO. There is no /dev/ttyAMA0 in the Debian distro for Rock Pi 4. I tried ttyS0 (that’s the case for Raspberry Pi 3) apparently not it either.

Anyone knows which one the GPIO HAT is supposed to use? Please help, thanks!

EDIT: maybe the question should be: in the Debian distro for Rock Pi 4, how to make pin 8/10 (GPIO pin 14/15) available to HATs on GPIO? On Armbian some people tweaked /boot/script.fex to enable uart0 (the 2 pins mentioned above) to make ttyS3 working, what about Rock Pi 4 Debian? I have no clue where to look. This is supposed to be a basic feature since many HATs are using it.

Seems I need some kind of device tree editor to use it? Gee…

uart0 (serial@ff180000) seems to be the bluetooth which is enabled, uart1 (serial@ff190000) is disabled, is it GPIO 14/15 (pin 8/10)? Please anyone?


#2

Quote from another post of how this issue solved:

Configuring kernel before building

Here is the steps I did:

  1. add “deb http://apt.radxa.com/stretch/ stretch main” to /etc/apt/sources.list
  2. get the repository key: “wget -O - apt.radxa.com/stretch/public.key | sudo apt-key add -”
  3. update your apps: “sudo apt-get update && sudo apt-get upgrade”
  4. install rockchip-overlay etc:
    sudo apt-get install rockchip-overlay
    sudo apt-get install rockchip-fstab
    sudo apt-get install rockpi4-dtbo
  5. edit /etc/hw_intfc.config, turn on uart2, uart4, and the overlay disables the console.
  6. update kernel:
    apt-get install linux-4.4-lastest
  7. update u-boot:
    sudo su
    apt-get install rockpi4b-rk-u-boot-lastest
    cd /usr/local/sbin/
    ./rockpi4b_upgrade_bootloader.sh
  8. reboot, type “who” in xterm, should shows you as the only user, nobody on ttyFIQ0
  9. In Z-Way server or Home Assistant, change the default uart setting from ttyAMA0 to ttyS2.
  10. reboot. who says you don’t need to reboot Linux often? :-/

Enable SPI in Debian
#3

Hello,
I have now installed the armbrian image of radxa.
How can I activate the interface for the Z-Way server here?


#4

Hi,

It’s a little bit troublesome since Armbian has its own way of device tree implementation. If you know how to use device tree overlay on Armbian. You can just apply the dtbo from us.

wget https://github.com/radxa/apt/raw/e0c9114196a651fa68b4f10a65a32b81afbf96e9/stretch/pool/main/r/rockpi4-dtbo/rockpi4-dtbo_0.4_all.deb

Unzip it, and apply the dto files.

dpkg-deb -xv rockpi4-dtbo_0.4_all.deb  test

ls test/boot/overlays/console-disabled.dtbo

You need to apply this console-disabled.dtbo file.


#5

Hello,
I’m back to Debian Stretch and have rebuilt the Debian image.
Kernel and U-boot updated according to wiki.

After installing the current rockpi4-dtbo Ver.0.8 the configuration file /boot/hw_intfc.conf is no longer available.
I can not set the upart and the dtoverlay.

Operating System: Debian GNU/Linux 9 (stretch)
Kernel: Linux 4.4.154-78-rockchip-00017-g625c2b2
Architecture: arm64

Can you look once.


#6

did you install rockchip-overlay too?


#7

Yes. Version 1.3

When installing 14 days ago, the file was still there. That was believe rockpi4-dtbo Ver.0.5 or 0.6


#8

What about rockchip-fstab? hw_intfc.conf came with one of these few packages. If the packages are still there, reinstall them or do a “apt-get upgrade” see what happens


#9

make sure your /boot is mounted corrected. Check your /etc/fstab


#10

Entry in fstab is correct.
“/dev/mmcblk1p4 /boot vfat defaults 0 2”


#11

Ok
I have reinstall the packages rockpi4-dtbo and reboot and then install rockpi4-dtbo.
Its work. The file /boot/hw_intfc.conf is back.
Thanks


#12

Hello,
z-way-server ist now runnig of system Armbian.
Thanks