aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-11-28ccid setparameters/PPS supportEric Wild5-21/+322
Change-Id: I280969ec9fe681dedae14ae8e6806f69eed3ff5a
2019-11-28cuart icc clock freq and divider setting supportEric Wild4-8/+43
Change-Id: I9c99c68511d3972513348ee6be5e7bb3b3a5f99e
2019-11-28move iso7816_3 to common dirEric Wild3-1/+1
Change-Id: Id8cfc9247988ae999f5544d936d67f12e3902b92
2019-11-28prevent uart interrupts before having proper structsEric Wild1-0/+3
Change-Id: I9cf7ff883721211ae11821339505d2e3b2a7961e
2019-11-28no logging, no memory poolEric Wild3-10/+15
Change-Id: Iaf5123ab0340efec7b8e11e689f529f2e95e31ca
2019-11-28talloc assertsEric Wild1-0/+10
Change-Id: I00df6e41f38eba6b6f06a0dab52035f446718a99
2019-11-28increase the uart ring buffer sizeEric Wild1-7/+7
must be be a power of 2, and should be at least as large as the largest transfer that we might be waiting for - revisit this, is 256 enough? Change-Id: Id4b4691dd32d465f627ba42c0ba3d509dcf8f42c
2019-11-28Add card_uart driver for ASF4 USARTHarald Welte6-721/+531
Change-Id: Ic690055bc332ccca3de7c5f4429399cf9ff1d4da
2019-11-28disable build for nowEric Wild1-1/+1
The firmware itself has priority, and the following patch series leads to a working firmware build, but contains commits that are not buildable. Change-Id: I778f525ab856b4966428c046c3eeee7a38692c07
2019-11-28split usb descriptor codeEric Wild4-47/+105
Change-Id: I9eb3606cfbaecf81f7ae80a9ea3d061a39088760
2019-11-28sercom config for t1Eric Wild1-14/+14
T0 doesn't work, as the datasheet states it's synchronous, apparently to the internal clock. That doesn't align too well with what 7816-3 says, so this already fails during the ATR after a few tries. Change-Id: Ie6cb7ec51036f1de15c83b59d130f3cb85309594
2019-11-28don't wait for TCK if card only supports T0Eric Wild1-0/+4
See 7816-3 8.2.5, T0 only (maybe implicitly) and no T15 = no TCK. This could be handled by a timeout instead, but timeouts don't work yet. Change-Id: Ice7bc4e603bbbbef88258af41f61e14a06727add
2019-11-13sysmoOCTSIM: Proper Makefile targetsHarald Welte1-7/+18
It's really bad practsie to generate different output files from one target, which breaks dependency generation and the like. Let's have separate Makefile targets for each output file we generate, all depending on the .elf file. Change-Id: Ie83722a9b61cfcd9865950ab4c088f59a15427ba
2019-11-13Makefile: Add 'make mrproper' for removing all bin/elf/etc output filesHarald Welte1-0/+3
Change-Id: I01e4b3f0224977fd38ed126f37f33ac9324f5abc
2019-11-12Avoid endless loop while printing debug uart ringbufferHarald Welte1-1/+5
Change-Id: I84bf6f47c785cfecec4764f7e86958103cf24f8a
2019-11-12Add 'check_ccid_config.py' to test for USB VID/PID in libccid_Info.plistHarald Welte1-0/+60
Change-Id: I0399f03400b49d814825ca156ddb4824ec76ce0a
2019-11-12sysmoOCTSIM: Create symlinks of last-built .bin and .elfHarald Welte1-1/+6
Change-Id: I6046069dd74e8a6f9461d3089259bbd90425c1c4
2019-11-12main: Add missing #include to osmocom/timer.hHarald Welte1-0/+1
Change-Id: I9a062fbe9e0f25e45e9321048d8cbdecd4c49076
2019-11-12ccid_device: Fix memory leaks in ccid_handle_out() error pathsHarald Welte1-0/+3
Change-Id: I7c5e916992a7b55ca1ab006759c1f5c62b759d57
2019-11-12fix usb descriptors for CDC_ACMHarald Welte1-1/+1
This should resolve the following error reported on the Linux host: [1929282.072955] cdc_acm 1-4.1.1:1.1: Control and data interfaces are not separated! Change-Id: Iabd53b4146ffd3b4a4667beba47f15cccd08aa55
2019-11-12jenkins.sh: add --disable-libsctpHarald Welte1-1/+4
Somehow the logic in libosmocore configure.ac dosen;t work: Using --enable-embedded should automatically select --disable-libsctp, but doesn't :( Related: OS#4265 Change-Id: Id51153863bf7db2843805779723f340228b5ddaf
2019-10-10ccid_slot_fsm: Add msgb_hexdump of TPDU and ATR as it passes byHarald Welte1-4/+8
Change-Id: I347b1a44c51624ca16b0687a92454f96c3cb20ab
2019-10-10ccid_slot_fsm: Convert from CCID msgb to TPDU msgbHarald Welte1-2/+18
Change-Id: I67f684ec098c0fdf4bf75c20d8cdf91b6e6411c2
2019-10-10ccid_main_functionfs: Set "TPDU level" of exchange, not characterHarald Welte1-1/+1
Change-Id: I3d16a83c93bc2d4c6a06d0fb585d496a0b5ff132
2019-10-10ccid_slot_fsm: Don't free ATR msgb; it is persistentHarald Welte1-1/+1
Change-Id: I2b153c7ad1f40dff946b51d743b2740c4db10dae
2019-10-10ccid_slot_fsm: Avoid segfault on accessing slots 1..7Harald Welte1-5/+11
Change-Id: I3e3a20fad64ecbe3ccc50021da314901318b9c1d
2019-10-10ccid_slot_fsm: Tell FSM when we assert the RST lineHarald Welte1-0/+1
Change-Id: I7e86e026be0f1976ec53235fbf9824d935f0685a
2019-10-10ccid_proto: Add missing value_string for RDR_to_PC_ParametersHarald Welte1-0/+1
Change-Id: I53cc1ed27af2d7574a9b8ecaa61c24a6a35577b7
2019-10-10cuart.h: More commentsHarald Welte1-5/+5
Change-Id: I79ffcb142f4b36499ed453403d54174c1514fc34
2019-10-10change IRQ endpoint re-submit logic.Eric Wild1-1/+4
The interrupt EP is not driven semi-synchronously by reacting to corresponding transfers from the host like the bulk EPs (the SIE will only automagically NAK all IN transfers from the host as long as no data is available), data is instead prepared asynchronously caused by changes to the sim card status, therefore attempting to submit a transfer while the ep is busy should not be an error condition. Change-Id: I41e77eec5f01bf082f8cb7331fbf7baae1c132ed
2019-10-09iso7816_fsm: Disable UART receiver when entering WAIT_TPDU stateHarald Welte1-0/+1
Change-Id: Iab58c2ffba935152450f965338599cbaabb4662b
2019-10-09iso7816_fsm: Handle WTIME expiry during ATR receptionHarald Welte2-15/+58
There are some cards that state a wrong length of the historical bytes in their ATR header, resulting in WTIME expiry. Let's dispatch ISO7816_E_WTIME_EXP into the ATR FSM and treat it as normal ATR_DONE if it happens during rx of historical bytes or TCK. Also introdcue an ISO7816_E_ATR_ERR_IND for those situations where waiting time expiration occurs during reception of TS/T0/TA/TB/TC/TD bytes. Change-Id: I62d47cb5e06b480941c67122f3c7d7a462ea2099
2019-10-09iso7816_fsm: Allow ATR FSM to always return back to initial state (RESET)Harald Welte1-8/+15
Change-Id: I71adefadc43bc8f5db7ce043393f9143cd45684f
2019-10-09cuart_[fsm]_test: Avoid hard-coded 'ttyUSB5'; use command line argHarald Welte2-2/+16
Change-Id: I0b66ed7c037376e4a5a9283cb972012594bc35d2
2019-10-09card_uart_tx: Allow caller to specify if Rx should be active after TxHarald Welte4-7/+11
This reverts commit 02dd9111635a8adbcd804671695de88f22ffa5ae. Change-Id: Ibe02d283701dbfff5ab47e1b8195369c134cde03
2019-10-09cuart: Integrate software WT (waiting time) timerHarald Welte3-2/+53
Change-Id: If94d7bdca0e5571d4f2f53862fc574c33a05ce43
2019-10-09card_uart_ctrl: change from bool to integer argumentHarald Welte3-9/+9
This allows for control functions for e.g. baud rate or waiting time Change-Id: Ifa8dde9dbcd27b79055aaac1a05bb040be616e05
2019-10-09iso7816_fsm: Implement single-byte RX/TXHarald Welte1-17/+52
Change-Id: I31fb127e1cb2fda0856658a6511089c3d9e31c2a
2019-10-09card_uart_tx: Remove last argument (we always have the receiver active)Harald Welte5-8/+8
Change-Id: I8f82e9108d0eae86bbe4535403ccc680b7379a0e
2019-10-09make ccid_main_functionfs use iso7816_fsm and cuart_driver_ttyHarald Welte3-3/+218
This works up to the point that we're getting the ATR displayed in pcsc_scan Change-Id: Ic656fff4a9c6b9aaf4b91aa16f66972ad28f8423
2019-10-09add .gitignore fileHarald Welte1-0/+4
Change-Id: Iecd6caa00abf79f58199a8168aa8a1d3f5c9cf0a
2019-10-09Add cuart_fsm_test programHarald Welte2-2/+122
Change-Id: I2b4be908b1bbd9b02f591a79b0eefaeae04badb8
2019-10-09cuart_driver_tty: Work around linux kernel bug ignoring CREADHarald Welte4-4/+24
Almost all linux USB serial drivers are ignoring CREAD and hence cannot disable the receiver hardware, see https://bugzilla.kernel.org/show_bug.cgi?id=205033 We therefore have to receive every byte we transmit before notifying the user of transmit completion. Change-Id: Id3cca29f78ee5469a1142aaa1ff754cc0427ec93
2019-10-09'cuart' Card-UART abstraction + driver for simple serial readerHarald Welte7-1/+836
Change-Id: Ic7e324d99f78b3bfb98fc667d9a1b7fa363f092d
2019-10-09ISO7816-3 FSMs as osmo_fsmHarald Welte9-29/+1318
This implements ISO 7816-3 T=0 as three finite state machines using osmo_fsm. Change-Id: I0145b77e6165d36d33f18ef3a452f2c37913bd73
2019-10-09contrib/jenkins.sh: Also build host/gadget codeHarald Welte2-3/+19
Change-Id: Ided54d69a776ce2b86f4117a27fc7ad3b7a1a1d2
2019-10-09allow different prefixes, print memory usageEric Wild1-2/+2
Change-Id: If34b5eba2992f8f9f75ea234b94467af46b028c6
2019-10-09ccid_host/Makefile: Ensure 'make clean' succeeds (rm -f)Harald Welte1-1/+1
Change-Id: Ie4e1fa64b707d86a20582b1b88612e5d268db558
2019-10-09split ccid into common and host-only codeEric Wild18-8/+11
Change-Id: I175c4efdafedc1d8953d3fb03f2d622a7a74af3b
2019-10-01ccid: Fix overflow in Fi valueHarald Welte2-4/+4
The Fi value can easily exceed 8bits. Even its default of 372 already exceeds 256... Change-Id: If2e2c46411d724883dca48f24e08d002e6670299