Orange Pi Zero errors

Hello everyone!

I am new to Asterisk and I’m now trying to setup “a basic Allstar simplex node” on an Orange pi Zero running Armbian (Debian 10 Buster).

So, I Have installed the ASL Repo according to GitHub - AllStarLink/ASL-Asterisk: Version of Asterisk used for AllStarLink
and gone through the asl-menu settings.

Now, when I do asterisk from commandline my node shows up as status “green” on the AllStar Link Node List. But I got these messages:

root@orangepizero:~# cat /var/log/asterisk/messages
[Nov 15 22:01:53] NOTICE[1723] dnsmgr.c: Managed DNS entries will be refreshed every 300 seconds.
[Nov 15 22:01:53] NOTICE[1723] cdr.c: CDR simple logging enabled.
[Nov 15 22:01:53] NOTICE[1723] loader.c: 55 modules will be loaded.
[Nov 15 22:01:54] NOTICE[1723] res_smdi.c: Unable to load config smdi.conf: SMDI disabled
[Nov 15 22:01:54] WARNING[1723] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener.
[Nov 15 22:01:54] WARNING[1723] chan_iax2.c: Unable to open IAX timing interface: No such file or directory
[Nov 15 22:02:09] NOTICE[1729] app_rpt.c: Normal Repeater Init 58973
[Nov 15 22:02:09] WARNING[1745] chan_dahdi.c: Unable to open ‘/dev/dahdi/pseudo’: No such file or directory
[Nov 15 22:02:09] ERROR[1745] chan_dahdi.c: Unable to dup channel: No such file or directory
[Nov 15 22:02:22] ERROR[1729] app_rpt.c: Continual RPT thread restarts, killing Asterisk

Any suggestions here?

What is the node number in question ?

What was the method of your install… from source, from image etc ?

At system prompt, what is the result of

uname -r

I’m guessing your system doesn’t have any devices at /dev/dahdi. (hence the ERROR chan_dahdi.c: Unable to dup channel: No such file or directory )

In order for asterisk allstar to work, you need to also install DAHDI on the system. This install is not entirely easy as it is a kernel module, so success is highly dependent on your architecture and kernel version, and you will probably need to install it from source. I’m not sure if anyone has instructions already for the Orange Pi. It may be helpful to know your kernel version (uname -r) and architecture (arch) to be able to point you to instructions that worked on a similar device, but really the Pi’s are notorious for not having the kernel headers package up to date with the kernel that is running, which makes it all the more difficult, but you could get lucky.

Generally, I would say it needs to be installed from source, but with an older OS version that would match the kernel needs and then put a lock on that kernel so it does not update.

sudo apt-mark hold raspberrypi-kernel-headers raspberrypi-kernel

Otherwise a failure likely will occur with dahdi.

Hello guys and thanks for your reply!

So, I am new to Asterisk/Allstar and I’m trying to figure this out…

I have installed the ASL Repo according to: GitHub - AllStarLink/ASL-Asterisk: Version of Asterisk used for AllStarLink

See below for my kernel and it looks like Dahdi is already installed.
uname -a: Linux orangepizero 5.15.93-sunxi #23.02.2 SMP Fri Feb 17 23:49:46 UTC 2023 armv7l GNU/Linux
apt install dahdi: dahdi is already the newest version (1:2.11.1-3)

Dahdi may be installed, but it is broken.
See my last/ previous notes.

But perhaps someone has a better and experienced known working method to share.

Thanks for the info. Sometimes dahdi will be installed, but not actually inserted into the kernel tree.
What is the output of ls /dev/dahdi?
Also check lsmod | grep dahdi
If you are getting errors or no output on these commands, you need to try sudo modprobe dahdi. Then retry the above two commands to make sure it worked.
If it did not work, it might be broken or not match your kernel version, and we may be able to install from source.
If it does work, make sure to test asterisk again, and then you probably want to set dahdi to be loaded by the kernel by default on reboots using echo dahdi | sudo tee -a /etc/modules

@encbar5

ls /dev/dahdi ls: cannot access ‘/dev/dahdi’: No such file or directory
lsmod | grep dahdi NO OUTPUT
modprobe dahdi modprobe: FATAL: Module dahdi not found in directory /lib/modules/5.15.93-sunxi

At request of @encbar5

Download the three .deb files from https://www.packetwarriors.com/pub/deb/. Then:

apt install -y dkms linux-headers-`uname -r`
dpkg -i dahdi-dkms_3.2.0+asl-8_all.deb dahdi-linux_3.2.0+asl-8_all.deb dahdi-source_3.2.0+asl-8_all.deb

The dpkg process will take a little while to run because it’s compiling the dahdi kernel modules. When it’s done:

modprobe dahdi

Then restart Asterisk.

@sm6tzl, make sure to apt remove dahdi dahdi-dkms dahdi-linux first, then try the instructions from @N8EI.
Also, if you are on Raspberry Pi OS you will probably need to do apt install raspberry-kernel-headers instead of the uname version of the command.
Also note that once the modprobe succeeds, that will not survive reboots, so you have to add a line with “dahdi” to /etc/modules.

If the .deb debian packages provided above don’t work, then there are other methods for installing from source. Let us know how it goes.

@encbar5 @N8EI

Hi!

Just to clearify, I am using Armbian (Debian 10 Buster)
Linux orangepizero 5.15.93-sunxi #23.02.2 SMP Fri Feb 17 23:49:46 UTC 2023 armv7l GNU/Linux

Not sure if I follow your procedure correct so please bear with me…
Here is the output:

root@orangepizero:~# apt remove dahdi dahdi-dkms dahdi-linux
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package ‘dahdi-dkms’ is not installed, so not removed
The following package was automatically installed and is no longer required:
fxload
Use ‘apt autoremove’ to remove it.
The following packages will be REMOVED:
dahdi dahdi-linux
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 1,248 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database … 90788 files and directories currently installed.)
Removing dahdi (1:2.11.1-3) …
Removing dahdi-linux (1:2.11.1.0.20170917~dfsg-7) …
Processing triggers for man-db (2.8.5-2) …

root@orangepizero:~# apt autoremove
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
fxload
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 38.9 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database … 90662 files and directories currently installed.)
Removing fxload (0.0.20081013-1+b2) …
Processing triggers for man-db (2.8.5-2) …

Downloading the three deb-files into: /root/packetwarriors
wget https://www.packetwarriors.com/pub/deb/dahdi-dkms_3.2.0+asl-8_all.deb
wget https://www.packetwarriors.com/pub/deb/dahdi-linux_3.2.0+asl-8_all.deb
wget https://www.packetwarriors.com/pub/deb/dahdi-source_3.2.0+asl-8_all.deb

root@orangepizero:~/packetwarriors# apt install -y dkms linux-headers-uname -r
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package linux-headers-5.15.93-sunxi
E: Couldn’t find any package by glob ‘linux-headers-5.15.93-sunxi’
E: Couldn’t find any package by regex ‘linux-headers-5.15.93-sunxi’

So, I stopped here. Did I miss something…?

@sm6tzl do an apt search "kernel header" to see if you can find what that respin of Debian is calling the kernel headers package. On standard Debian or RPi OS it’s called linux-headers-VERSION-RELEASE (e.g. linux-headers-6.1.0-13-arm64). It appears Armbian doesn’t use the standard convention so you’ll have to find it. It will have a description something like “Header files for Linux 6.1.0-13-arm64”.

@sm6tzl Looking at the Armbian website they say this " Kernel packages come with firmware, headers and on modern kernels with device tree blob packages" so it’s unlikely they have a standard set of kernel headers. Hopefully they’ve done the right thing and it’ll just work. So just do apt install -y dkms and then try to pick up from there and see what happens. Worst is dkms will fail for missing headers.

@N8EI

root@orangepizero:~# apt install -y dkms
Reading package lists… Done
Building dependency tree
Reading state information… Done
dkms is already the newest version (2.6.1-4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@orangepizero:~# apt search “kernel header”
Sorting… Done
Full Text Search… Done
libklibc-dev/oldoldstable 2.0.6-1+deb10u1 armhf
kernel headers used during the build of klibc

linux-headers-5.4.51-asl+/buster 5.4.51-asl±1 armhf
Linux kernel headers for 5.4.51-asl+ on armhf

linux-headers-5.4.51-v7-asl+/buster 5.4.51-v7-asl±1 armhf
Linux kernel headers for 5.4.51-v7-asl+ on armhf

linux-headers-5.4.51-v7l-asl+/buster 5.4.51-v7l-asl±1 armhf
Linux kernel headers for 5.4.51-v7l-asl+ on armhf

linux-headers-current-imx6/buster 23.02.2 armhf
Linux kernel headers for 5.15.93-imx6 on armhf current

linux-headers-current-meson/buster 23.02.2 armhf
Linux kernel headers for 5.15.93-meson on armhf current

linux-headers-current-mvebu/buster 23.02.2 armhf
Linux kernel headers for 5.15.93-mvebu on armhf current

linux-headers-current-odroidxu4/buster 23.02.2 armhf
Linux kernel headers for 5.4.230-odroidxu4 on armhf

linux-headers-current-rk322x/buster 23.02.2 armhf
Linux kernel headers for 6.1.11-rk322x on armhf current

linux-headers-current-rockchip/buster 23.02.2 armhf
Linux kernel headers for 6.1.11-rockchip on armhf current

linux-headers-current-sunxi/buster,now 23.02.2 armhf [installed]
Linux kernel headers for 5.15.93-sunxi on armhf current

linux-headers-edge-imx6/buster 23.02.2 armhf
Linux kernel headers for 6.1.11-imx6 on armhf edge

linux-headers-edge-meson/buster 23.02.2 armhf
Linux kernel headers for 6.1.11-meson on armhf edge

linux-headers-edge-mvebu/buster 23.02.2 armhf
Linux kernel headers for 6.1.11-mvebu on armhf edge

linux-headers-edge-odroidxu4/buster 23.02.2 armhf
Linux kernel headers for 6.1.11-odroidxu4 on armhf edge

linux-headers-edge-rk322x/buster 23.02.2 armhf
Linux kernel headers for 6.1.11-rk322x on armhf edge

linux-headers-edge-rockchip/buster 23.02.2 armhf
Linux kernel headers for 6.1.11-rockchip on armhf edge

linux-headers-edge-sunxi/buster 23.02.2 armhf
Linux kernel headers for 6.1.11-sunxi on armhf edge

linux-headers-legacy-mt7623/buster 21.08.1 armhf
Linux kernel headers for 4.19.204-mt7623 on armhf

linux-headers-legacy-mvebu/buster 21.02.3 armhf
Linux kernel headers for 4.19.167-mvebu on armhf

linux-headers-legacy-odroidxu4/buster 21.08.6 armhf
Linux kernel headers for 4.14.222-odroidxu4 on armhf

linux-headers-legacy-rk322x/buster 21.08.1 armhf
Linux kernel headers for 4.4.194-rk322x on armhf

linux-headers-legacy-rockchip/buster 22.05.3 armhf
Linux kernel headers for 4.4.213-rockchip on armhf

linux-headers-legacy-sunxi/buster 21.05.6 armhf
Linux kernel headers for 5.4.88-sunxi on armhf

linux-libc-dev-alpha-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-amd64-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-arm64-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-armel-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-armhf-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-hppa-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-i386-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-m68k-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-mips-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-mips64-cross/oldoldstable 4.19.16-1cross2 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-mips64el-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-mips64r6-cross/oldoldstable 4.19.16-1cross2 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-mips64r6el-cross/oldoldstable 4.19.16-1cross2 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-mipsel-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-mipsn32-cross/oldoldstable 4.19.16-1cross2 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-mipsn32el-cross/oldoldstable 4.19.16-1cross2 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-mipsn32r6-cross/oldoldstable 4.19.16-1cross2 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-mipsn32r6el-cross/oldoldstable 4.19.16-1cross2 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-mipsr6-cross/oldoldstable 4.19.16-1cross2 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-mipsr6el-cross/oldoldstable 4.19.16-1cross2 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-powerpc-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-powerpcspe-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-ppc64-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-ppc64el-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-riscv64-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-s390x-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-sh4-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-sparc64-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-libc-dev-x32-cross/oldoldstable 4.19.20-1cross1 all
Linux Kernel Headers for development (for cross-compiling)

linux-headers-current-sunxi/buster,now 23.02.2 armhf [installed]
Linux kernel headers for 5.15.93-sunxi on armhf current

Looks like you have them installed now. So install the dahdi .deb files now.

@N8EI

Looks like the same result…??

root@orangepizero:~/packetwarriors# apt install -y dkms linux-headers-uname -r
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package linux-headers-5.15.93-sunxi
E: Couldn’t find any package by glob ‘linux-headers-5.15.93-sunxi’
E: Couldn’t find any package by regex ‘linux-headers-5.15.93-sunxi’

Should the deb-files be manually extracted before I do install?
Or am I missing something else perhaps…?

@sm6tzl

The apt install step is done. Try the dpkg -i step now.

@N8EI

ok, sorry for missunderstanding…

root@orangepizero:~/packetwarriors# dpkg -i dahdi-dkms_3.2.0+asl-8_all.deb dahdi-linux_3.2.0+asl-8_all.deb dahdi-source_3.2.0+asl-8_all.deb
Selecting previously unselected package dahdi-dkms.
(Reading database … 90854 files and directories currently installed.)
Preparing to unpack dahdi-dkms_3.2.0+asl-8_all.deb …
Unpacking dahdi-dkms (1:3.2.0+asl-8) …
Preparing to unpack dahdi-linux_3.2.0+asl-8_all.deb …
Unpacking dahdi-linux (1:3.2.0+asl-8) over (1:3.2.0+asl-8) …
dpkg: regarding dahdi-source_3.2.0+asl-8_all.deb containing dahdi-source:
asl-dahdi-source conflicts with dahdi-source
dahdi-source (version 1:3.2.0+asl-8) is to be installed.

dpkg: error processing archive dahdi-source_3.2.0+asl-8_all.deb (–install):
conflicting packages - not installing dahdi-source
dpkg: dependency problems prevent configuration of dahdi-dkms:
dahdi-dkms depends on dkms (>= 3.0.3-4~); however:
Version of dkms on system is 2.6.1-4.

dpkg: error processing package dahdi-dkms (–install):
dependency problems - leaving unconfigured
Setting up dahdi-linux (1:3.2.0+asl-8) …
Errors were encountered while processing:
dahdi-source_3.2.0+asl-8_all.deb
dahdi-dkms

root@orangepizero:~/packetwarriors# modprobe dahdi
modprobe: FATAL: Module dahdi not found in directory /lib/modules/5.15.93-sunxi

It appears that the Armbian 10 package for dkms is a lower version than is required by these .deb files. The packetwarrior files were actually packaged on Debian 12, so it was a little bit of a long shot that this would work.

There are other things we can try, which will require building from source. It may be quicker to work on this more directly rather than the back and forth on the forum. I will send you a private post.

We finally managed to solve the dahdi issue for OPiZ with a slightly edited phreaknet script!
Big thanks to @encbar5 !!

The node is live on AllStar Link Node List.

Now, its time for the radio interface configuration so I might aswell continue this thread…
I am not using CM1xx on my setup.
I have hardwired GPIO for PTT and COS. Audio IN/OUT is from the OPiZ onboard soundcard.
Can someone advise where in asterisk to define GPIO pins and audio device.