Projects
osmocom:nightly
osmo-e1d
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 129
View file
osmo-e1d_0.4.0.8.56a7.202211010002.dsc -> osmo-e1d_0.4.0.12.7533.202211020002.dsc
Changed
@@ -2,7 +2,7 @@ Source: osmo-e1d Binary: osmo-e1d, libosmo-e1d1, libosmo-e1d-dev, libosmo-octoi0, libosmo-octoi-dev Architecture: any -Version: 0.4.0.8.56a7.202211010002 +Version: 0.4.0.12.7533.202211020002 Maintainer: Harald Welte <laforge@osmocom.org> Homepage: https://projects.osmocom.org/projects/osmo-e1d Standards-Version: 3.9.8 @@ -16,8 +16,8 @@ libosmo-octoi0 deb libs extra arch=any osmo-e1d deb net extra arch=any Checksums-Sha1: - df5d64b7633d39f3cdd7183d3d56f951031c1866 76412 osmo-e1d_0.4.0.8.56a7.202211010002.tar.xz + be7882dd65bfd1cea29d58f7e4e33905058ef0d4 76664 osmo-e1d_0.4.0.12.7533.202211020002.tar.xz Checksums-Sha256: - e162eb5a2435745a973a5fdc261b7a4e2e01a25463c24bdd49ac2da2bdd032ce 76412 osmo-e1d_0.4.0.8.56a7.202211010002.tar.xz + daf0a70cceb3defa4bc3011a8427f08280f7ecdb71b689f87daa402f28046e4d 76664 osmo-e1d_0.4.0.12.7533.202211020002.tar.xz Files: - 0bc6afd9bc6812f1b9cac2562b4524b7 76412 osmo-e1d_0.4.0.8.56a7.202211010002.tar.xz + 7f6bfa52f6aff454339aac803237fbbf 76664 osmo-e1d_0.4.0.12.7533.202211020002.tar.xz
View file
osmo-e1d_0.4.0.8.56a7.202211010002.tar.xz/.tarball-version -> osmo-e1d_0.4.0.12.7533.202211020002.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -0.4.0.8-56a7.202211010002 +0.4.0.12-7533.202211020002
View file
osmo-e1d_0.4.0.8.56a7.202211010002.tar.xz/debian/changelog -> osmo-e1d_0.4.0.12.7533.202211020002.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -osmo-e1d (0.4.0.8.56a7.202211010002) unstable; urgency=medium +osmo-e1d (0.4.0.12.7533.202211020002) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom nightly feed - -- Osmocom OBS scripts <info@osmocom.org> Tue, 01 Nov 2022 00:02:55 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Wed, 02 Nov 2022 00:02:55 +0000 osmo-e1d (0.4.0) unstable; urgency=medium
View file
osmo-e1d_0.4.0.8.56a7.202211010002.tar.xz/debian/control -> osmo-e1d_0.4.0.12.7533.202211020002.tar.xz/debian/control
Changed
@@ -21,14 +21,14 @@ Package: osmo-e1d Architecture: any Multi-Arch: foreign -Depends: osmocom-nightly (= 202211010002), ${misc:Depends}, ${shlibs:Depends} +Depends: osmocom-nightly (= 202211020002), ${misc:Depends}, ${shlibs:Depends} Description: osmo-e1d: Osmocom's E1 interface daemon Package: libosmo-e1d1 Section: libs Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 202211010002), ${misc:Depends}, ${shlibs:Depends} +Depends: osmocom-nightly (= 202211020002), ${misc:Depends}, ${shlibs:Depends} Pre-Depends: ${misc:Pre-Depends} Description: Client library for talking to the Osmocom E1 interface daemon osmo-e1d. @@ -36,7 +36,7 @@ Section: libdevel Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 202211010002), ${misc:Depends}, ${shlibs:Depends}, +Depends: osmocom-nightly (= 202211020002), ${misc:Depends}, ${shlibs:Depends}, libosmo-e1d1 (= ${binary:Version}), libosmocore-dev, Description: Development headers for the osmo-e1d library. @@ -45,7 +45,7 @@ Section: libs Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 202211010002), ${misc:Depends}, ${shlibs:Depends} +Depends: osmocom-nightly (= 202211020002), ${misc:Depends}, ${shlibs:Depends} Pre-Depends: ${misc:Pre-Depends} Description: Library for the Osmocom Community TDMoIP network. @@ -53,7 +53,7 @@ Section: libdevel Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 202211010002), ${misc:Depends}, ${shlibs:Depends}, +Depends: osmocom-nightly (= 202211020002), ${misc:Depends}, ${shlibs:Depends}, libosmo-octoi0 (= ${binary:Version}), libosmocore-dev, Description: Development headers for the Osmocom Community TDMoIP library.
View file
osmo-e1d_0.4.0.8.56a7.202211010002.tar.xz/src/ctl.c -> osmo-e1d_0.4.0.12.7533.202211020002.tar.xz/src/ctl.c
Changed
@@ -45,7 +45,7 @@ static struct e1_ts * _e1d_get_ts(struct e1_line *line, uint8_t ts) { - if (ts < 32) + if (ts > 0 && ts < 32) return &line->tsts; else if (ts == E1DP_TS_SUPERCHAN) return &line->superchan;
View file
osmo-e1d_0.4.0.8.56a7.202211010002.tar.xz/src/e1d-ts-pipe.c -> osmo-e1d_0.4.0.12.7533.202211020002.tar.xz/src/e1d-ts-pipe.c
Changed
@@ -1,6 +1,6 @@ /* E1 timeslot "pipe" utility: Open a 64k timeslot of osmo-e1d and connect to stdin/stdout * - * (C) 2020 by Harald Welte <laforge@osmocom.org> + * (C) 2020-2022 by Harald Welte <laforge@osmocom.org> * * All Rights Reserved * @@ -22,6 +22,7 @@ */ #include <stdint.h> +#include <stdbool.h> #include <stdio.h> #include <unistd.h> #include <errno.h> @@ -40,6 +41,7 @@ static struct osmo_e1dp_client *g_client; static struct osmo_fd ts_ofd; static enum osmo_e1dp_ts_mode g_mode = E1DP_TSMODE_RAW; +static bool g_force = false; static int outfd = 1; static int infd = 0; @@ -47,7 +49,11 @@ static int ts_open(uint8_t intf_nr, uint8_t line_nr, uint8_t ts_nr, enum osmo_e1dp_ts_mode mode, uint16_t bufsize) { - int rc = osmo_e1dp_client_ts_open(g_client, intf_nr, line_nr, ts_nr, mode, bufsize); + int rc; + if (g_force) + rc = osmo_e1dp_client_ts_open_force(g_client, intf_nr, line_nr, ts_nr, mode, bufsize); + else + rc = osmo_e1dp_client_ts_open(g_client, intf_nr, line_nr, ts_nr, mode, bufsize); if (rc < 0) fprintf(stderr, "Cannot open e1d timeslot %u:%u:%u\n", intf_nr, line_nr, ts_nr); return rc; @@ -118,6 +124,7 @@ " -l --line <0-255> E1 Line Number\n" " -t --timeslot <0-31> E1 Timeslot Number\n" " -m --mode (RAW|HDLC-FCS) E1 Timeslot Mode\n" + " -f --force Force open of the timeslot (may disconnect other client)\n" " -r --read FILE Read from FILE instead of STDIN\n" ); } @@ -145,12 +152,13 @@ { "line", 1, 0, 'l' }, { "timeslot", 1, 0, 't' }, { "mode", 1, 0, 'm' }, + { "force", 0, 0, 'f' }, { "read", 1, 0, 'r' }, { "read-bufsize", 1, 0, 'b' }, { 0,0,0,0 } }; - c = getopt_long(argc, argv, "hp:i:l:t:m:r:b:", long_options, &option_index); + c = getopt_long(argc, argv, "hp:i:l:t:m:fr:b:", long_options, &option_index); if (c == -1) break; @@ -178,6 +186,9 @@ } g_mode = rc; break; + case 'f': + g_force = true; + break; case 'r': rc = open(optarg, 0, O_RDONLY); if (rc < 0) {
View file
osmo-e1d_0.4.0.8.56a7.202211010002.tar.xz/src/usb.c -> osmo-e1d_0.4.0.12.7533.202211020002.tar.xz/src/usb.c
Changed
@@ -2,6 +2,7 @@ * usb.c * * (C) 2019 by Sylvain Munaut <tnt@246tNt.com> + * (C) 2022 by Harald Welte <laforge@gnumonks.org> * * All Rights Reserved * @@ -42,6 +43,7 @@ #define USB_VID 0x1d50 #define USB_PID 0x6145 +#define USB_PID_TRACER 0x6151 libusb_context *g_usb = NULL; @@ -809,7 +811,7 @@ // --------------------------------------------------------------------------- static int -_e1_usb_open_device(struct e1_daemon *e1d, struct libusb_device *dev) +_e1_usb_open_device(struct e1_daemon *e1d, struct libusb_device *dev, bool is_tracer) { struct e1_intf *intf; struct e1_line *line; @@ -873,6 +875,15 @@ osmo_talloc_replace_string(intf, &intf->usb.serial_str, serial_str); } + /* we have prior knowledge that the e1-tracer firmware configuration 2 is the e1d compatible mode. */ + if (is_tracer) { + if (libusb_set_configuration(devh, 2) != LIBUSB_SUCCESS) { + LOGP(DE1D, LOGL_ERROR, "Cannot set configuration 2 of e1-tracer device. Maybe too old firmware?\n"); + libusb_close(devh); + return -EIO; + } + } + INIT_LLIST_HEAD(&intf_data->ctrl_inprogress); ret = libusb_get_active_config_descriptor(dev, &cd); @@ -892,8 +903,13 @@ continue; id = &cd->interfacei.altsetting1; - if ((id->bInterfaceClass != 0xff) || (id->bInterfaceSubClass != 0xe1) || (id->bNumEndpoints < 3)) - continue; + if (is_tracer) { + if ((id->bInterfaceClass != 0xff) || (id->bInterfaceSubClass != 0xe1) || (id->bNumEndpoints < 1)) + continue; + } else { + if ((id->bInterfaceClass != 0xff) || (id->bInterfaceSubClass != 0xe1) || (id->bNumEndpoints < 3)) + continue; + } line = e1_intf_find_line(intf, line_nr); if (line) { @@ -933,9 +949,16 @@ } } - if (!line_data->ep_in || !line_data->ep_out || !line_data->ep_fb || !line_data->pkt_size) { - LOGP(DE1D, LOGL_ERROR, "Failed to use interface %d\n", id->bInterfaceNumber); - goto next_interface; + if (is_tracer) { + if (!line_data->ep_in || !line_data->pkt_size) { + LOGP(DE1D, LOGL_ERROR, "Failed to use interface %d\n", id->bInterfaceNumber); + goto next_interface; + } + } else { + if (!line_data->ep_in || !line_data->ep_out || !line_data->ep_fb || !line_data->pkt_size) { + LOGP(DE1D, LOGL_ERROR, "Failed to use interface %d\n", id->bInterfaceNumber); + goto next_interface; + } } if (!line) { @@ -966,13 +989,18 @@ } /* Create data flows and start the line */ - line_data->flow_in = e1uf_create(line, e1_usb_xfer_in, line_data->ep_in, 4, line_data->pkt_size, 4); - line_data->flow_out = e1uf_create(line, e1_usb_xfer_out, line_data->ep_out, 4, line_data->pkt_size, 4); - line_data->flow_fb = e1uf_create(line, e1_usb_xfer_fb, line_data->ep_fb, 2, 3, 1); + /* all supported devices have an IN endpoint */ + line_data->flow_in = e1uf_create(line, e1_usb_xfer_in, line_data->ep_in, 4, line_data->pkt_size, 4); e1uf_start(line_data->flow_in); - e1uf_start(line_data->flow_out); - e1uf_start(line_data->flow_fb); + + /* e1-tracer has no OUT or FEEDBACK endpoint */ + if (!is_tracer) { + line_data->flow_out = e1uf_create(line, e1_usb_xfer_out, line_data->ep_out, 4, line_data->pkt_size, 4); + e1uf_start(line_data->flow_out); + line_data->flow_fb = e1uf_create(line, e1_usb_xfer_fb, line_data->ep_fb, 2, 3, 1); + e1uf_start(line_data->flow_fb); + } if (line_data->ep_int) resubmit_irq(line); @@ -1028,10 +1056,19 @@ if (ret) continue; - if ((desc.idVendor != USB_VID) || (desc.idProduct != USB_PID)) + if (desc.idVendor != USB_VID) continue; - _e1_usb_open_device(e1d, dev_listi); + switch (desc.idProduct) { + case USB_PID: + _e1_usb_open_device(e1d, dev_listi, false); + break; + case USB_PID_TRACER: + _e1_usb_open_device(e1d, dev_listi, true); + break; + default: + continue; + } } libusb_free_device_list(dev_list, 1);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.