Difference between revisions of "Dahdi dummy"

From W9CR
Jump to navigation Jump to search
Line 10: Line 10:
 
# ensure your system is up and going, with the kernel pinned per the [http://dvswitch.org/files/ASL_Images/Raspberry_Pi/Stretch/ASL_1.01-20180228-armhf-raspbian-stretch-image.readme readme]
 
# ensure your system is up and going, with the kernel pinned per the [http://dvswitch.org/files/ASL_Images/Raspberry_Pi/Stretch/ASL_1.01-20180228-armhf-raspbian-stretch-image.readme readme]
 
## apt-mark hold raspberrypi-kernel-headers raspberrypi-kernel
 
## apt-mark hold raspberrypi-kernel-headers raspberrypi-kernel
#  
+
# apt-get install gcc raspberrypi-kernel-headers make vim git 
 +
# vim /usr/src/asl-dahdi-linux-2.11.1/linux/drivers/dahdi/Kbuild remove the # from the dummy file
 +
# cd /usr/src/asl-dahdi-linux-2.11.1
 +
# make
 +
# make install
 +
# echo -e "#needed for rpi timing \ndahdi_dummy" >>/etc/modules  # add it to modules.conf
 +
# modprobe dahdi_dummy
 +
# service restart asterisk
 +
 
 +
Verify :
 +
 
 +
StPeteRpt*CLI> dahdi show status
 +
Description                              Alarms    IRQ        bpviol    CRC4
 +
DAHDI_DUMMY/1 (source: HRtimer) 1        UNCONFIGUR 0          0          0
 +
 
 +
 
 +
 
 +
 
  
  

Revision as of 18:16, 30 December 2019

dahdi_dummy is the timing only dahdi driver for olver versions of asterisk. It's not needed on intel as newer dahdi doesn't need it. On the RPi or ARM platforms it's really useful.

Unfortunately John David McGough, KB4FXC of Internet Technologies, Inc has taken this code, removed the author and renamed it as part of the pirated software known as HamVoIP.


I don't care, I just want this to work on ASL 1.01!

Ok, here's the skinny on how to make this work on an ASL 1.01 system.

  1. ensure your system is up and going, with the kernel pinned per the readme
    1. apt-mark hold raspberrypi-kernel-headers raspberrypi-kernel
  2. apt-get install gcc raspberrypi-kernel-headers make vim git
  3. vim /usr/src/asl-dahdi-linux-2.11.1/linux/drivers/dahdi/Kbuild remove the # from the dummy file
  4. cd /usr/src/asl-dahdi-linux-2.11.1
  5. make
  6. make install
  7. echo -e "#needed for rpi timing \ndahdi_dummy" >>/etc/modules # add it to modules.conf
  8. modprobe dahdi_dummy
  9. service restart asterisk

Verify :

StPeteRpt*CLI> dahdi show status
Description                              Alarms     IRQ        bpviol     CRC4
DAHDI_DUMMY/1 (source: HRtimer) 1        UNCONFIGUR 0          0          0




Support Files about this

First email about this from september 2019

It looks like John David has renamed dummy to hrtimer, dummy is designed to
provide good timing on systems lacking dahdi hardware.   I've attached strings
of his module and the dummy one I built today, they are virtually identical.

Please test this if you have asl1.01 on a rpi.

Simply building this seems to fix any studering on asl 1.01 running on a RPi3:

bryan@StPeteRpt:~ $ sudo dahdi_test
[sudo] password for bryan:
Opened pseudo dahdi interface, measuring accuracy...
99.614% 99.594% 99.608% 99.608% 98.476% 99.638% 99.599% 99.601%
99.600% 98.450% 99.602% 99.600% 99.601% 99.600% 98.445% 99.581%
99.621% 99.605% 99.597% 98.478% 99.630% 99.579% 99.626% 99.601%
98.478% 99.630% 99.602% 99.600% 99.601% 98.446% 99.601% 99.580% ^C
--- Results after 32 passes ---
Best: 99.638% -- Worst: 98.445% -- Average: 99.390271%
Cumulative Accuracy (not per pass): 99.967

After insmod of dummy module.

bryan@StPeteRpt:~ $ sudo dahdi_test
Opened pseudo dahdi interface, measuring accuracy...
99.990% 99.967% 99.991% 99.992% 99.991% 99.992% 99.991% 99.991%
99.991% 99.988% 99.992% 99.991% 99.991% 99.992% 99.991% 99.991%
99.991% 99.990% 99.992% 99.991% 99.991% 99.991% 99.991% 99.991%
99.992% 99.991% 99.991% 99.992% 99.991% 99.991% 99.991% 99.991%
99.991% 99.990% 99.991% 99.992% 99.991% 99.991% 99.991% 99.991% ^C
--- Results after 40 passes ---
Best: 99.992% -- Worst: 99.967% -- Average: 99.990443%
Cumulative Accuracy (not per pass): 99.990

Here it is on an intel server running a pci_radio card:

root@Itchy:/home/bryan# dahdi_test
Opened pseudo dahdi interface, measuring accuracy...
99.993% 99.986% 99.995% 99.992% 99.984% 99.971% 99.993% 99.990%
99.992% 99.992% 99.991% 99.990% 99.996% 99.990% 99.971% 99.954%
99.994% 99.992% 99.991% 99.995% 99.983% 99.993% 99.992% 99.992%
99.997% 99.990% 99.985% 99.995% 99.990% 99.996% 99.989% 99.993%
99.993% 99.989% 99.997% 99.989% 99.994% 99.996% 99.988% 99.993% ^C
--- Results after 40 passes ---
Best: 99.997% -- Worst: 99.954% -- Average: 99.989596%
Cummulative Accuracy (not per pass): 99.992

It's identical.

To build as root:
# cd /usr/src/asl-dahdi-linux-2.11.1/linux
# export MODULES_EXTRA='dahdi_dummy'
# make
# insmod /usr/src/asl-dahdi-linux-2.11.1/linux/drivers/dahdi/dahdi_dummy.ko

# lsmod |grep dahdi
dahdi_dummy             3432  0
dahdi                 229561  35 dahdi_dummy
crc_ccitt               1771  1 dahdi

you will need to do dahdi_genconf and then dahdi_cfg.  ASL1.01 is missing this
in the service script that starts asterisk.  It needs to be added.
Restart asterisk
#service asterisk restart

# dahdi_scan
[1]
active=yes
alarms=UNCONFIGURED
description=DAHDI_DUMMY/1 (source: HRtimer) 1
name=DAHDI_DUMMY/1
manufacturer=
devicetype=DAHDI Dummy Timing
location=
basechan=1
totchans=0
irq=0

I'm not on the admin list, so unicast if you have a question.