<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/simtrace2/+/16680">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">library: Add osmo_st2_compatible_dev_idsp[]<br><br>This is a list of known-compatible USB VID/PID pairs.<br><br>Change-Id: I3ef66ebba307899c57077bfd633f84f30190f4dc<br>---<br>M host/include/Makefile.am<br>A host/include/osmocom/simtrace2/usb_util.h<br>M host/lib/Makefile.am<br>A host/lib/usb_util.c<br>4 files changed, 47 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/80/16680/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/host/include/Makefile.am b/host/include/Makefile.am</span><br><span>index b7b453a..60134f3 100644</span><br><span>--- a/host/include/Makefile.am</span><br><span>+++ b/host/include/Makefile.am</span><br><span>@@ -3,4 +3,6 @@</span><br><span>             osmocom/simtrace2/simtrace2_api.h \</span><br><span>          osmocom/simtrace2/simtrace_usb.h \</span><br><span>           osmocom/simtrace2/simtrace_prot.h \</span><br><span style="color: hsl(0, 100%, 40%);">-             osmocom/simtrace2/gsmtap.h</span><br><span style="color: hsl(120, 100%, 40%);">+            osmocom/simtrace2/usb_util.h \</span><br><span style="color: hsl(120, 100%, 40%);">+                osmocom/simtrace2/gsmtap.h \</span><br><span style="color: hsl(120, 100%, 40%);">+          $(NULL)</span><br><span>diff --git a/host/include/osmocom/simtrace2/usb_util.h b/host/include/osmocom/simtrace2/usb_util.h</span><br><span>new file mode 100644</span><br><span>index 0000000..3bb2486</span><br><span>--- /dev/null</span><br><span>+++ b/host/include/osmocom/simtrace2/usb_util.h</span><br><span>@@ -0,0 +1,5 @@</span><br><span style="color: hsl(120, 100%, 40%);">+#pragma once</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/usb/libusb.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+extern const struct dev_id osmo_st2_compatible_dev_ids[];</span><br><span>diff --git a/host/lib/Makefile.am b/host/lib/Makefile.am</span><br><span>index 438ad9d..3f7ec8e 100644</span><br><span>--- a/host/lib/Makefile.am</span><br><span>+++ b/host/lib/Makefile.am</span><br><span>@@ -15,4 +15,6 @@</span><br><span> libosmo_simtrace2_la_SOURCES = \</span><br><span>    apdu_dispatch.c \</span><br><span>    gsmtap.c \</span><br><span style="color: hsl(0, 100%, 40%);">-      simtrace2_api.c</span><br><span style="color: hsl(120, 100%, 40%);">+       simtrace2_api.c \</span><br><span style="color: hsl(120, 100%, 40%);">+     usb_util.c \</span><br><span style="color: hsl(120, 100%, 40%);">+  $(NULL)</span><br><span>diff --git a/host/lib/usb_util.c b/host/lib/usb_util.c</span><br><span>new file mode 100644</span><br><span>index 0000000..7599991</span><br><span>--- /dev/null</span><br><span>+++ b/host/lib/usb_util.c</span><br><span>@@ -0,0 +1,36 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/* usb_util - USB related utilities for SIMtrace 2 USB devices</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * (C) 2016-2019 by Harald Welte <hwelte@hmw-consulting.de></span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(120, 100%, 40%);">+ * modify it under the terms of the GNU General Public License</span><br><span style="color: hsl(120, 100%, 40%);">+ * as published by the Free Software Foundation; either version 2</span><br><span style="color: hsl(120, 100%, 40%);">+ * of the License, or (at your option) any later version.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * You should have received a copy of the GNU General Public License</span><br><span style="color: hsl(120, 100%, 40%);">+ * along with this program; if not, write to the Free Software</span><br><span style="color: hsl(120, 100%, 40%);">+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+#include <stdio.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <stdint.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <stdlib.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <errno.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <getopt.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/core/utils.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/usb/libusb.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/simtrace2/simtrace_usb.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*! list of USB idVendor/idProduct tuples of devices using simtrace2 firmware */</span><br><span style="color: hsl(120, 100%, 40%);">+const struct dev_id osmo_st2_compatible_dev_ids[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+      { USB_VENDOR_OPENMOKO, USB_PRODUCT_OWHW_SAM3 },</span><br><span style="color: hsl(120, 100%, 40%);">+       { USB_VENDOR_OPENMOKO, USB_PRODUCT_QMOD_SAM3 },</span><br><span style="color: hsl(120, 100%, 40%);">+       { USB_VENDOR_OPENMOKO, USB_PRODUCT_SIMTRACE2 },</span><br><span style="color: hsl(120, 100%, 40%);">+       { 0, 0 }</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/simtrace2/+/16680">change 16680</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/simtrace2/+/16680"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: simtrace2 </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I3ef66ebba307899c57077bfd633f84f30190f4dc </div>
<div style="display:none"> Gerrit-Change-Number: 16680 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>