3CXSBC on ARM-based SBC

Status
Not open for further replies.

D.S

Bronze Partner
Basic Certified
Joined
Apr 18, 2023
Messages
6
Reaction score
0
Hello,

is it possible that the package 3cxsbc is not on the usual repositories anymore?
I tried to install the SBC on a RockPi4 with the offical guide to install it on a RPi4.
Thou rather than using Raspbian, I tried it with RockPi's Debian Buster / Bullseye image, with a DietPi Image (Bullseye)
I can add and remove repositories in sources.list as much as I want, but it is seems there is no '3cxsbc" package to find anywhere.

And it doesn't matter if I use the offical bash-script or something like this:

Code:
echo "deb [trusted=yes] http://downloads-global.3cx.com/downloads/debian buster main" >> /etc/apt/sources.list

In the end it looks always like this:

Code:
root@DietPi:~# apt install 3cxsbc                                                                                                                               Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package 3cxsbc
 
That image does not seem to work on a RockPi4. The bash-script enters the repositories just fine. But as I said, regardless of what I enter, "3cxsbc" is never to found. I would at least expect to show up, regardless if dependencies can be fullfilled or not.
 
is it possible that the package 3cxsbc is not on the usual repositories anymore?
Just confirming that I successfully deployed a fresh SBC on a Pi4B using our image and script.
 
Hello,

is it possible that the package 3cxsbc is not on the usual repositories anymore?
I tried to install the SBC on a RockPi4 with the offical guide to install it on a RPi4.
Thou rather than using Raspbian, I tried it with RockPi's Debian Buster / Bullseye image, with a DietPi Image (Bullseye)
I can add and remove repositories in sources.list as much as I want, but it is seems there is no '3cxsbc" package to find anywhere.

And it doesn't matter if I use the offical bash-script or something like this:

Code:
echo "deb [trusted=yes] http://downloads-global.3cx.com/downloads/debian buster main" >> /etc/apt/sources.list

In the end it looks always like this:

Code:
root@DietPi:~# apt install 3cxsbc                                                                                                                               Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package 3cxsbc
I dont have an RockPI, but from the datasheets it looks like it is ArmV8... which leads to Arm64 architecture... RaspberryPI uses ArmV7 (armhf) with 32bit.... so the 3CXSBC package is for 32-bit
 
Hmm ok, RPi4 is an ARMv8 (BCM2711) too, but I guess the image of that Raspbian is 32bit. So I guess I have to get a Debian 32bit image running on the RockPi4. I will test that and report back, thou it can take a while since I am into other projects atm.
 
Sure, but apt will look for an arm64 release and there is only an armhf release for the SBC.... or x86 based. Thats why it is empty
 
So quick update:

Code:
dpkg --add-architecture armhf

and adding arch=armhf to the repository lines
Code:
deb [arch=armhf trusted=yes] http://downloads-global.3cx.com/downloads/debian buster main
Code:
deb [arch=armhf trusted=yes] http://downloads-global.3cx.com/downloads/debian buster-testing main

Results in
Bash:
root@rockpi-4b:~# apt install 3cxsbc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 3cxsbc:armhf : Depends: libc6:armhf but it is not installable
                Depends: libgcc1:armhf but it is not installable
                Depends: libstdc++6:armhf but it is not installable
                Depends: sudo:armhf but it is not installable
                Depends: libssl1.1:armhf but it is not installable
E: Unable to correct problems, you have held broken packages.

So it is just not possible, when the kernel is 64bit. And I am not a linux expert that can do multiarch configurations.

So really need to find a debian with 32bit kernel that the RockPi4 wants to install :)
 
Even when it is a 32bit kernel, your problem is, that this package is not compiled for ARMv8, its for ARMv7... no kernel can change this.
 
Intressting..... please do your RockPI

cat /proc/cpuinfo

processor : 3
model name : ARMv7 Processor rev 3 (v7l)
BogoMIPS : 108.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3

Hardware : BCM2711
Revision : b03111
Serial : 1000000046ec6dac
Model : Raspberry Pi 4 Model B Rev 1.1
 
Bash:
root@linaro-alip:~# cat /proc/cpuinfo
processor       : 0
model name      : ARMv8 Processor rev 4 (v8l)
BogoMIPS        : 48.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 1
model name      : ARMv8 Processor rev 4 (v8l)
BogoMIPS        : 48.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 2
model name      : ARMv8 Processor rev 4 (v8l)
BogoMIPS        : 48.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 3
model name      : ARMv8 Processor rev 4 (v8l)
BogoMIPS        : 48.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 4
model name      : ARMv8 Processor rev 2 (v8l)
BogoMIPS        : 48.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 2

processor       : 5
model name      : ARMv8 Processor rev 2 (v8l)
BogoMIPS        : 48.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 2

Serial          : 0000000000000000

Well bash-script worked now

Bash:
root@linaro-alip:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
root@linaro-alip:~# wget http://downloads-global.3cx.com/downloads/sbc/3cxsbc.zip -O- | sudo bash
--2023-04-24 15:46:39--  http://downloads-global.3cx.com/downloads/sbc/3cxsbc.zip
Resolving downloads-global.3cx.com (downloads-global.3cx.com)... 104.18.14.54, 104.18.15.54, 2606:4700::6812:e36, ...
Connecting to downloads-global.3cx.com (downloads-global.3cx.com)|104.18.14.54|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26298 (26K) [application/x-zip-compressed]
Saving to: ‘STDOUT’

-                                         100%[=====================================================================================>]  25.68K  --.-KB/s    in 0s

2023-04-24 15:46:39 (83.9 MB/s) - written to stdout [26298/26298]

OK
connecting https://mtb.3cx.de:5001
Get:1 http://downloads-global.3cx.com/downloads/debian buster InRelease
Get:2 http://downloads-global.3cx.com/downloads/debian buster/main armhf Packages [3426 B]
Fetched 14.9 kB in 1s (28.1 kB/s)
Reading package lists... Done
Get:1 http://downloads-global.3cx.com/downloads/debian buster-testing InRelease
Get:2 http://downloads-global.3cx.com/downloads/debian buster-testing/main armhf Packages [2466 B]
Fetched 14.0 kB in 1s (24.3 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libdpkg-perl libevent-2.0-5 libicu57 libilmbase12 libopencv-calib3d2.4v5 libopencv-features2d2.4v5 libopencv-flann2.4v5 libopencv-highgui2.4-deb0
  libopencv-objdetect2.4v5 libopencv-video2.4v5 libopenexr22 libre2-3 libsrtp0 libssl1.0.2 libva-wayland1 libwayland-egl1-mesa pkg-config
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  3cxsbc
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1026 kB of archives.
After this operation, 2530 kB of additional disk space will be used.
Get:1 http://downloads-global.3cx.com/downloads/debian buster/main armhf 3cxsbc armhf 18.1.36 [1026 kB]
Fetched 1026 kB in 0s (3202 kB/s)
Preconfiguring packages ...
Selecting previously unselected package 3cxsbc.
(Reading database ... 53218 files and directories currently installed.)
Preparing to unpack .../3cxsbc_18.1.36_armhf.deb ...
Unpacking 3cxsbc (18.1.36) ...
Setting up 3cxsbc (18.1.36) ...
Created symlink /etc/systemd/system/3cxsbc.service → /lib/systemd/system/3cxsbc.service.
Created symlink /etc/systemd/system/multi-user.target.wants/3cxsbc.service → /lib/systemd/system/3cxsbc.service.
Please, review configuration file at /etc/3cxsbc.conf
To restart the application run:
"#> sudo systemctl restart 3cxsbc"

You may want to restart rsyslog so 3cxsbc log file settings will take effect:
"#> sudo /etc/init.d/rsyslog restart"
3cxsbc logs will be found at: /var/log/3cxsbc.log
INFO: To access the 3CXSBC configuration file type 'sudo nano /etc/3cxsbc.conf'
INFO: To enable logs go to 'nano /etc/3cxsbc.conf.local' and set [Log] level to DEBUG
INFO: Then restart SBC: systemctl restart 3cxsbc
INFO: To open the log file type 'tail -f /var/log/3cxsbc/3cxsbc.log'
3CXSBC is up and running. You can now restart your IP Phones and access the 3CX Management Console > Phones node to provision your IP Phones.

The upgrade from Stretch to Buster, was a bit - bumpy, i'd say.

I used these Buster repos, if anyone tries to do something similar.

Code:
deb http://deb.debian.org/debian/ buster main
deb-src http://deb.debian.org/debian/ buster main

deb http://deb.debian.org/debian/ buster-updates main
deb-src http://deb.debian.org/debian/ buster-updates main

deb http://deb.debian.org/debian-security buster/updates main
deb-src http://deb.debian.org/debian-security buster/updates main

And if there is an error along the way, that a package can not overwrite another (on the stretch image, I had that 2 times)

Use
Bash:
dpkg -i --force-overwrite /var/cache/apt/archives/<packagename>.deb
 
You can run the 3cxsbc on arm64 but it does take some work. Heck it took me 4 days. But it's worth it as I run multiple sbcs on Ubiquiti Dream Machines which are all Debian 11 arm64 OS.

You can run any armhf app on arm64. The trick is to install qemu-arm-static and binfmt_misc with binfmt_misc configured properly for qemu-arm.

If you're wise you'll deploy 3cxsbc in a container, roughly speaking I used debootstrap ---arch armhf --foreign buster etc and then debootstrap second stage and then nspawn to create the container "machine". Then login to the debian buster armhf machine, and run the 3cxsbc install script/zip. (Seriously 3cx, it's not even a zip file!l Eye-roll).

Anyway, it works and works well even with hotdesk phones. Just be patient and work the issues getting it installed. For example I had to build a custom binfmt_misc kernel module which self registered /proc/sys/fs/binfmt_misc because of the router firmware not having binfmt_misc compiled in their kernel ie I had to hack the kernel.

Btw qemu-arm ELF translation from armhf to arm64 is damn slow when you install and start sbc but it works brilliantly once running as the sbc core job is all about SIP stream handling so the worst overhead is done once the sbc daemon is running and in RAM.

Oh and the 3cxsbc deb package has a freaking dependency on sudo (I kid you not!!) so either hack the 3cx arm deb to remove the pointless dependency or definitely use a container as doing apt install sudo:armhf on an arm64 will probably ruin your day.

It'll take a few attempts to build the container just right, so set up your environment to be able to roll back and build again quickly as you learn from breaking things.

And finally, if deploying the container on a multi-nic router make sure the 3cxsbc.conf has the IP of the interface you intend for the sbc. That will also drive you insane if you leave it at 0.0.0.0.
 
Last edited:
Status
Not open for further replies.

Forum statistics

Threads
111,974
Messages
590,081
Members
164,899
Latest member
mazet