aboutsummaryrefslogtreecommitdiffstats
path: root/host
AgeCommit message (Collapse)AuthorFilesLines
2018-07-30remsim: fix payload overwritingKévin Redon1-5/+0
The slot number is in the header, and correctly set in st_push_hdr. Setting the slot in st_slot_tx_msg will overwrite the payload data. This caused bytes three of the ATR to be changed from 0x96 to 0x00, corrupting the ATR. This corruption is caught by the ATR checksum, and the modem would reset the card (2 additional times) to try to get correct ATR. Change-Id: If971699993617fc50557d20582c344ea06645a3f
2018-07-28sniff: ensure the checksum error flag is also printedKévin Redon1-4/+4
the firmware now also use a generic value_string array (as does the host application) Change-Id: I861bd8b52e8f2f2a4786bbe1cc834917119dc394
2018-07-26sniff: rename reset hold/release to assert/deassertKévin Redon1-4/+4
this change is to match the nomenclature used in cardem Change-Id: Ide99e731cad26aec949ad14d54f46fa611a0b7f8
2018-07-26sniff: send ATR over GSMTAPKévin Redon1-5/+14
Change-Id: Id35129883f08002a4a796b56954a128e2b533245
2018-07-24USB: print decoded USB errorKévin Redon1-5/+10
In case of error it also ensures the returned value is NULL. Else a segfault would occur because the caller (e.g. remsim) continued on with a free handler. Change-Id: Ie7f20e3eff03acf77eb08283747ca8e032b9b4c8
2018-07-11sniff: add checksum verification for ATR and PPSKévin Redon1-0/+4
a checksum error is only signaled in the USB message with the corresponding flag. Change-Id: I277868267c3199eea216ab47bdd09fb2fb944b06
2018-07-11host sniff: add functions to print flagsKévin Redon1-29/+61
Change-Id: If3c0a4790662bcc64db5ff03adcc033836e16ad0
2018-07-11host sniff: process remaining usb messages in bufferKévin Redon1-3/+6
Change-Id: I1746c0187b2e5dbef44b4b336fee3bd9ded15079
2018-07-11USB: add flags for sniff data and centralise transferKévin Redon1-57/+49
Also fix issue in usb_msg_alloc_hdr and add cosmetic spaces around operations. Change-Id: I768a0ad639aa5e648a630af72d01f7b68082b6b6
2018-07-11host: set license to GPLv2+Kévin Redon10-40/+153
Change-Id: I0948d74874af1d3a0f1b4cbcb4a838e4ecd9fe3f
2018-07-04sniffing: move conversion convertion and flag processing from ISR to main ↵Kévin Redon1-13/+13
loop to keep ISR fast and focus on data capture Change-Id: Ieefa8a5f81dbcc12c1ad3059660dbffa0c1a4961
2018-07-04host USB: add host application to receive and display USB sniffing messages ↵Kévin Redon2-1/+538
sent by firmware Change-Id: Idefbf21e0bbd2a1e3647fe9aebaf88d1b62dae2d
2018-07-04host USB: use central SIMtrace USB ID definition headerKévin Redon2-12/+5
Change-Id: Id18e64fba0a2c308a8aef7d3865200bf0237cae9
2018-07-04host usb_util fix: used provided class, sub-class, and interfave when ↵Kévin Redon1-4/+4
finding matching interfaces Change-Id: Ibc06e751e6ca0f9e9a40d82c4eeddfb975240f91
2017-05-11host: Allow matching of device to USB path, not just address0.3v0.3Harald Welte4-4/+44
USB addresses change every time the device re-enumerates, while the path reflects the physical topology of USB connections and stays persistent unless the usb cabling is changed. Let's allow the user to specify the path instead of the address to uniquely identify a given slot.
2017-05-11host: Ignore some more libusb error return codesHarald Welte1-1/+3
It seems that sometimes we get even an LIBUSB_ERROR_IO and failing on errors breaks the application, while ignoring it works. Not sure why that really is, but for now it increases reliability.
2017-05-11host: Switch SIM to remote and issue modem reset on startupHarald Welte1-0/+75
as soon as simtrace2-remotesim is started, we issue the command to instruct the use of the remote SIM card and ask the modem to reset itself (to start using the new remote sim).
2017-05-10host: fix various compiler warningsHarald Welte3-9/+10
2017-05-10host: Split transport from slotHarald Welte1-26/+55
In current implementations, we have one interface (with it's own separate set of USB end-points) per slot. However, the USB protocol already includes a slot-number in the header to be able to remove that restriction in future versions. Also, if the USB protocol is used remotely over a network, then we could multiplex differnt slots from different USB interfaces into one stream on the network side. In order to prepare the data structures in the host program, let's introduce that logical split there, too. Might seem a bit like overkill, but I don't want to rewrite all code later...
2017-05-09host: split the transport layer from card emulationHarald Welte1-30/+42
We want to be able to use some code irrespective of the application (emulation, tracing, ...), so let's split the transport struct out of the cardem_instance.
2017-05-09host: cosmetic cleanup, function renamingHarald Welte1-28/+44
2017-05-09Convert to new generalized SIMTRACE2 USB protocolHarald Welte4-46/+88
The current protocol was card-emulation specific. The new protocol is generic/flexible enough to accommodate both tracing and card emulation, as well as modem control and other future extensions.
2017-03-06add udev rules for all (currently) supported devicesHarald Welte1-0/+21
2017-03-06simtrace2-remsim: Improve support for many interfaces + devicesHarald Welte5-9/+423
Rather than using the first available interface on the first available device, we now have a "simtrace2-list" program that lists all compatible interfaces on all configurations of all devices on the system
2017-03-06simtrace2-remsim: Document and add longopts for UDP forwardingHarald Welte1-2/+6
2017-03-06host: fix some compiler warnings (now that we have -Wall)Harald Welte1-7/+3
2017-03-06host: Add "-Wall -g" CFLAGS to get compiler warningsHarald Welte1-0/+1
2017-03-06simtrace2-remsim: Move away from global variablesHarald Welte1-59/+73
When we want to run multiple instances of the card-emulator (e.g. for multi-modem/multi-card versions of the hardware), the code shouldn't be using any global variables but have them per-instance.
2017-03-05fix symlink that caused host programs to not buildHarald Welte1-1/+1
2016-03-20simtrace2-remsim: Instruct SAM3S to simulate card removal on SIGINTHarald Welte1-0/+15
When stopping the program, we inform the card simulator to indicate a card removal to the GSM phone/modem.
2016-03-20simtrace2-remsim: Send an ATR that allows for a 5MHz/16 divider0.1Harald Welte1-0/+32
This ATR is useful to test higher speeds up to 312500 bits/s
2016-03-19remote-sim host tools: Auto-discover the endpoint addressesHarald Welte6-27/+124
We now auto-discover the end-point addresses based on the interface descriptor. The user can also use the new "--interface" command line argument to set a non-zero intrerface. In combination, this should enable support for the remote-sim functionality on the second UART on OWHW.
2016-03-19Add simtrace2-remsim applicationsHarald Welte7-0/+989