blob: e5b0f4f40336a3079689f99dd27ae77ac25c8789 [file] [log] [blame]
Harald Welted645d442020-12-14 19:20:38 +01001== Host Software
2
3Host Software is software running on the USB host computer to which the
4icE1usb is attached.
5
Harald Welte9df99952022-01-17 17:16:09 +01006At the time of this writing, there are two options for icE1usb driver interfaces:
7`osmo-e1d` and `DAHDI`.
Harald Welted645d442020-12-14 19:20:38 +01008
9=== `osmo-e1d`
10
Harald Welte9df99952022-01-17 17:16:09 +010011`osmo-e1d` is a pure user-space driver, not requiring any specific Linux kernel,
12kernel patches or out-of-tree kernel modules. It utilizes `libusb` to
13talk to the icE1usb hardware and offers a unix domain socket based
14interface to application software.
15
16In theory, `osmo-e1d` should work on any operating system with libusb
17support for isochronous transfers. However, official support is limited
18to GNU/Linux at this point.
Harald Welted645d442020-12-14 19:20:38 +010019
20Software such as `osmo-bsc` and `osmo-mgw` can interface `osmo-e1d` via
21the `libosmo-abis` support for `osmo-e1d`.
22
23More information about `osmo-e1d` can be found at its homepage
24https://osmocom.org/projects/osmo-e1d/wiki
25
Harald Welte9e2e9482021-03-30 15:37:16 +020026=== DAHDI driver
27
28DAHDI (Digium Asterisk Hardware Driver Interface) is an extremely
29popular driver for a variety of POTS/PSTN and also TDM interface boards
30by originally Zaptel, later Digium and now most recently Sangoma.
31
Harald Welte9df99952022-01-17 17:16:09 +010032DAHDI is available only for Linux, and is provided as source code for a
33set of out-of-tree kernel modules. You must compile those modules for
34each specific Linux kernel version you are using. Keep this in mind
35when performing kernel upgrades and the like.
36
Harald Welte9e2e9482021-03-30 15:37:16 +020037DAHDI is supported by a wide range of open source PBX / softswitch software,
38including Asterisk, FreeSWITCH and yate.
39
Harald Welte24eb3e32022-01-16 18:12:59 +010040There is a DAHDI driver for the icE1usb available from
Harald Welte9e2e9482021-03-30 15:37:16 +020041the `laforge/icE1usb` branch of the https://github.com/osmocom/dahdi-linux
42git repository.
43
44When using that DAHDI Linux kernel driver, there is no need for
45osmo-e1d. The USB interface is directly managed inside the kernel.
46
nickvsnetworkingcf587af2022-01-30 20:40:43 +110047
48==== Installing DAHDI driver
49Example installation steps, tested on Debian 11, for installing DAHDI Linux & DAHDI Tools.
50Note: 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
67At 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----
76usb 2-1: new full-speed USB device number 5 using xhci_hcd
77usb 2-1: New USB device found, idVendor=1d50, idProduct=6145, bcdDevice= 0.03
78usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
79usb 2-1: Product: icE1usb
80usb 2-1: Manufacturer: osmocom
81usb 2-1: SerialNumber: dc697407e7682731
82----
83
84.Example `lsusb` output after icE1usb is plugged in
85----
86$ lsusb -d 1d50:
87Bus 002 Device 005: ID 1d50:6145 OpenMoko, Inc. icE1usb
88----
89
Harald Welted645d442020-12-14 19:20:38 +010090=== Other software
91
92you can interface 3rd party applications with osmo-e1d in the following
93ways:
94
95* by adding support for `osmo-e1d`, e.g. via `libosmo-e1d` to the
Harald Welteb279fc32021-03-30 15:37:24 +020096 respective application
Harald Welted645d442020-12-14 19:20:38 +010097* by directly implementing the USB interface exposed by icE1usb in your
98 software
99
100Should you require any related development/porting services, please do
101not hesitate to reach out to sysmocom.
102