Harald Welte | d645d44 | 2020-12-14 19:20:38 +0100 | [diff] [blame] | 1 | == Host Software |
| 2 | |
| 3 | Host Software is software running on the USB host computer to which the |
| 4 | icE1usb is attached. |
| 5 | |
Harald Welte | 9df9995 | 2022-01-17 17:16:09 +0100 | [diff] [blame] | 6 | At the time of this writing, there are two options for icE1usb driver interfaces: |
| 7 | `osmo-e1d` and `DAHDI`. |
Harald Welte | d645d44 | 2020-12-14 19:20:38 +0100 | [diff] [blame] | 8 | |
| 9 | === `osmo-e1d` |
| 10 | |
Harald Welte | 9df9995 | 2022-01-17 17:16:09 +0100 | [diff] [blame] | 11 | `osmo-e1d` is a pure user-space driver, not requiring any specific Linux kernel, |
| 12 | kernel patches or out-of-tree kernel modules. It utilizes `libusb` to |
| 13 | talk to the icE1usb hardware and offers a unix domain socket based |
| 14 | interface to application software. |
| 15 | |
| 16 | In theory, `osmo-e1d` should work on any operating system with libusb |
| 17 | support for isochronous transfers. However, official support is limited |
| 18 | to GNU/Linux at this point. |
Harald Welte | d645d44 | 2020-12-14 19:20:38 +0100 | [diff] [blame] | 19 | |
| 20 | Software such as `osmo-bsc` and `osmo-mgw` can interface `osmo-e1d` via |
| 21 | the `libosmo-abis` support for `osmo-e1d`. |
| 22 | |
| 23 | More information about `osmo-e1d` can be found at its homepage |
| 24 | https://osmocom.org/projects/osmo-e1d/wiki |
| 25 | |
Harald Welte | 9e2e948 | 2021-03-30 15:37:16 +0200 | [diff] [blame] | 26 | === DAHDI driver |
| 27 | |
| 28 | DAHDI (Digium Asterisk Hardware Driver Interface) is an extremely |
| 29 | popular driver for a variety of POTS/PSTN and also TDM interface boards |
| 30 | by originally Zaptel, later Digium and now most recently Sangoma. |
| 31 | |
Harald Welte | 9df9995 | 2022-01-17 17:16:09 +0100 | [diff] [blame] | 32 | DAHDI is available only for Linux, and is provided as source code for a |
| 33 | set of out-of-tree kernel modules. You must compile those modules for |
| 34 | each specific Linux kernel version you are using. Keep this in mind |
| 35 | when performing kernel upgrades and the like. |
| 36 | |
Harald Welte | 9e2e948 | 2021-03-30 15:37:16 +0200 | [diff] [blame] | 37 | DAHDI is supported by a wide range of open source PBX / softswitch software, |
| 38 | including Asterisk, FreeSWITCH and yate. |
| 39 | |
Harald Welte | 24eb3e3 | 2022-01-16 18:12:59 +0100 | [diff] [blame] | 40 | There is a DAHDI driver for the icE1usb available from |
Harald Welte | 9e2e948 | 2021-03-30 15:37:16 +0200 | [diff] [blame] | 41 | the `laforge/icE1usb` branch of the https://github.com/osmocom/dahdi-linux |
| 42 | git repository. |
| 43 | |
| 44 | When using that DAHDI Linux kernel driver, there is no need for |
| 45 | osmo-e1d. The USB interface is directly managed inside the kernel. |
| 46 | |
nickvsnetworking | cf587af | 2022-01-30 20:40:43 +1100 | [diff] [blame] | 47 | |
| 48 | ==== Installing DAHDI driver |
| 49 | Example installation steps, tested on Debian 11, for installing DAHDI Linux & DAHDI Tools. |
| 50 | Note: Plugging in the device prior to installing may lead to issues. |
| 51 | |
| 52 | ---- |
| 53 | $ sudo apt-get install -y linux-headers-`uname -r` git dfu-util make gcc autoconf libtool libnewt-dev |
| 54 | $ git clone https://git.osmocom.org/dahdi-linux/ |
| 55 | $ git clone https://github.com/asterisk/dahdi-tools |
| 56 | $ cd dahdi-linux |
| 57 | $ sudo make install |
| 58 | $ cd ../dahdi-tools |
| 59 | $ sudo autoreconf -i |
| 60 | $ ./configure |
| 61 | $ sudo make install |
| 62 | $ sudo make install-config |
| 63 | $ sudo modprobe icE1usb |
| 64 | $ sudo /etc/init.d/dahdi start |
| 65 | ---- |
| 66 | |
| 67 | At this point you can plug in the icE1usb, which |
| 68 | |
| 69 | * should make the icE1usb enumerate on USB (dmesg, lsusb) |
| 70 | * should and scan for it with `sudo dahdi_scan` which should list the two E1 ports on the iCE1usb. |
| 71 | * see a `/proc/dahdi/N` file (with N being the span number, typically 1 unless you have other spans) |
| 72 | * see the device listed in `dahdi_scan` or `dahdi_tool` |
| 73 | |
| 74 | .Example `dmesg` output when icE1usb is plugged in |
| 75 | ---- |
| 76 | usb 2-1: new full-speed USB device number 5 using xhci_hcd |
| 77 | usb 2-1: New USB device found, idVendor=1d50, idProduct=6145, bcdDevice= 0.03 |
| 78 | usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1 |
| 79 | usb 2-1: Product: icE1usb |
| 80 | usb 2-1: Manufacturer: osmocom |
| 81 | usb 2-1: SerialNumber: dc697407e7682731 |
| 82 | ---- |
| 83 | |
| 84 | .Example `lsusb` output after icE1usb is plugged in |
| 85 | ---- |
| 86 | $ lsusb -d 1d50: |
| 87 | Bus 002 Device 005: ID 1d50:6145 OpenMoko, Inc. icE1usb |
| 88 | ---- |
| 89 | |
Harald Welte | d645d44 | 2020-12-14 19:20:38 +0100 | [diff] [blame] | 90 | === Other software |
| 91 | |
| 92 | you can interface 3rd party applications with osmo-e1d in the following |
| 93 | ways: |
| 94 | |
| 95 | * by adding support for `osmo-e1d`, e.g. via `libosmo-e1d` to the |
Harald Welte | b279fc3 | 2021-03-30 15:37:24 +0200 | [diff] [blame] | 96 | respective application |
Harald Welte | d645d44 | 2020-12-14 19:20:38 +0100 | [diff] [blame] | 97 | * by directly implementing the USB interface exposed by icE1usb in your |
| 98 | software |
| 99 | |
| 100 | Should you require any related development/porting services, please do |
| 101 | not hesitate to reach out to sysmocom. |
| 102 | |