Commit Graph

19 Commits

Author SHA1 Message Date
Harald Welte 8aba31092f DAHDI trunkdev support
DAHDI trunkdev is a newly-introduced 'virtual trunk' character device
which is used instead of a real hardware driver. This means that an
application (such as osmo-e1d) can implement a virtual E1 trunk and
receive and transmit E1 frame data which is exposed to DAHDI users
just like the data from a real physical E1 span.

In order to build DAHDI trunkdev support into osmo-e1d, you will need
a special fork of dahdi containing the required support, currently
the laforge/trunkdev branch of the following repository:
	https://gitea.osmocom.org/retronetworking/dahdi-linux

Change-Id: Ib15a7313fcd63e1ed9f2f5b349df967bc4335ec2
2023-02-01 11:24:49 +01:00
Harald Welte 81546e6773 Differentiate between icE1usb and e1-tracer in log/vty output
Now that we support the e1-tracer in addition to icE1usb, let's
differentiate in the log output.

Change-Id: Iea647b12d86c97cfacbc3df43010b9b94f0a97c7
2022-11-02 09:42:04 +01:00
Sylvain Munaut 9d45233337 vty: Add option to disable GPS-DO loop and use manual tuning values
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I8668fe42e4c399f08696e497887120e501341f5a
2022-10-06 10:44:18 +02:00
Harald Welte 97b15ae397 vty: Print only applicable information during 'show line'
If the line is in channelized mode, only print per-TS information.
If the line is in superchannel mode, only print SC information.

This avoids printing information that is not applicable to the line
mode.

Change-Id: I7b55ae8a5e1d352f90e14342d7f7e82e4848118a
2022-04-10 17:35:15 +02:00
Harald Welte e324507676 OCTOI: initial support for E1oIP forwarding
This introduces initial support for operation as OCTOI (Osmocom
Community TDMoIP) server and client operation.

Various features are still absent (user authentication, support for
re-ordered packets), but this version is already able to provide
services to clients with dynamic IP addresses as well as servers.

The bulk of the OCTOI / E1oIP code is implemented as a shared library,
to facilitate the development of other servers and clients in the
future, and also to minimize the impact on the existing osmo-e1d code
base.

More information is available at https://osmocom.org/projects/octoi/wiki

Change-Id: I05f5ff697ca8f7dccdcf89660f12089babfcc92e
2022-03-28 12:26:09 +02:00
Harald Welte 8ec461ebe8 vty.c: Fix re-reading of config file after 'write file'
When writing the timeslot mode, we must write it in lower-case,
as the VTY parser reading the config file only supports that.

Change-Id: Ic60449a0ba64117a5cf5e4a8e76484e9c955f09f
2022-03-28 12:13:08 +02:00
Harald Welte 7bc8404f63 GPS-DO support for icE1usb hardware
This adds support for monitoring the GPS-DO that is built-in to the
icE1usb device.  It assumes a very recent firmware with GPS-DO control
moved to a separate USB interface, i.e. after osmo-e1-hardware.git
Change-Id Icd6555a14896c38626fb147b78af44ff719f2254 is merged.

Change-Id: If5e2a6b2dae0290ce3186009e68f618049ebf5ff
2022-02-07 18:38:08 +01:00
Harald Welte f5362e9217 Allow configuration of interfaces/lines via VTY
So far, osmo-e1d automatically opened all compatible icE1usb devices
and all E1 lines on those interfaces.  Let's allow for 'interface' and
'line' configuration in the VTY.  USB devices can be identified by
their serial number string.

If a given device (== E1 interface)  has a VTY configuration, then only
those E1 lines with VTY configuration opened.

For each Line (icE1usb or vpair), the mode (channelized/superchannel)
can also be set via VTY.

Change-Id: I89b57b688b68901f87d9683ab9294772ee747d77
Closes: OS#5400
2022-02-01 17:17:31 +00:00
Sylvain Munaut 73d7184088 Fix a bunch of warning raised by the new build warning options
A lot of them are related to signedness or type range limitation.
A lot are not actual issues and work find in practice, but a few
lead to actual bad behavior.

This makes all the conversion explicit to mark intent.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I992b9bc51659e85966651b1146091501b8f149f5
2022-01-09 11:43:01 +01:00
Harald Welte 67b6f40201 e1d: fix ASSERT during "write terminal"
There was some wrong ordering in config_write_e1d() regarding
resolving the vpair 'peer' devices.  We can only call
e1d_vpair_intf_peer() _after_  we have established that the
given interface actually is of type VPAIR.

Assert failed intf->drv == E1_DRIVER_VPAIR vpair.c:96

Change-Id: If494d77ed1df5cda655d3b4a60868154dc2b355e
2021-03-26 09:29:15 +01:00
Harald Welte 31ac0bea55 Evaluate received E and A bits in TS0
Related: OS#4917
Change-Id: I7e1c919518b3418e973b7ae5bedd5a6dd1c2adec
2021-01-05 23:46:02 +01:00
Harald Welte 868c94b704 vty: export vty_e1d + move e1d_vty_node to header file
This will be required by osmo-e1gen

Change-Id: I5be0278bc07aadd154fc54a74b08fc7e3b5d6483
2020-12-20 11:46:19 +01:00
Harald Welte 8f3064a2c8 Add per-line rate counter group to count various errors
Change-Id: I766b717843d7cd8ac00d4ce18c38773ac50ec3e6
2020-12-20 11:45:44 +01:00
Harald Welte ba6336c675 vpair: fix writing config file with vpairs configured
prior to this patch, the configured vpair interfaces would not
be saved to the config file on 'write file'.

Change-Id: Iff6551318534a3717c374060082147f17b925a21
2020-12-19 18:27:37 +01:00
Harald Welte 17c80e1f55 actually implement the superchannel mode
In superchannel mode, all 31 TS are grouped together.

There is no way to enable it yet, see next patch.

Change-Id: Id340b1925471f427deb6cda7eb54e80dfc71faec
2020-07-14 14:40:10 +02:00
Harald Welte 9fbd4e819e print E1DP Mode as string, not in numeric format
Change-Id: I4d221a45bdd5d85b3ab6eaa35d67683b50bea21f
2020-07-11 13:20:13 +02:00
Harald Welte de22257ee1 vty: Print actual driver name instead of FIXME
Change-Id: I6f909cc493417f9e156672024f879a7294b4d816
2020-06-30 19:44:09 +02:00
Harald Welte 27b271729f Add virtual pair of E1 interfaces
The idea is to generate a pair of virtual E1 interfaces (each with
identical number of lines), where each line A:n is connected to line B:n
of the pair and vice-versa.

This allows to test E1 using applications back to back against each
other, without any physical E1 circuits in between.

Change-Id: If42c959556b17d543762546eb45dd69d25f715f2
2020-06-29 23:10:33 +02:00
Harald Welte 9144ba0373 VTY interface support
Let's add a VTY interface on TCP port 4269.  The purpose is - for now -
not for configuration storage, but for state introspection.

Change-Id: I47b6e4efaad52e68e2b50a7993076f3706f86628
2020-06-29 22:12:42 +02:00