firmware/sniffer: Log parity errors, just like overruns and framing errors

Reading of code + datasheet showed that we did enable parity checking
but never actually checked if the USART has the PARE bit in CSR set.

Let's change that.  Plus also avoid possible race conditions due to
multiple status resets via US_CR_RSTSTA.  Let's only reset that once
per interrupt handler.

TODO: actually do something useful at that point.  We currently don't
report those to the host, nor do we attempt to recover in any way.  The
data sheet also doesn't tell us what it actually does in such
situations; it appears the character is *not* returned from the USART,
so we're missing one byte in the stream at that point.

Change-Id: I5f012d86c61a2377d355396e7b95d078952bee7c
Related: OS#5464
1 file changed
tree: fef0f7b1f5be7cf30d7a423117005b6abc5f564a
  1. contrib/
  2. debian/
  3. firmware/
  4. hardware/
  5. host/
  6. .clang-format
  7. .gitignore
  8. .gitmodules
  9. .gitreview
  10. clk_calc.py
  11. git-version-gen
  12. Makefile
  13. README.md
  14. TODO-RELEASE
README.md

SIMtrace v2.0

This is the repository for the next-generation SIMtrace devices, providing abilities to trace the communication between (U)SIM card and phone, remote (U)SIM card forward, (U)SIM man-in-the-middle, and more.

NOTE: Nothing in this repository applies to the SIMtrace v1.x hardware or its associated firmware. SIMtrace v1.x is based on a different CPU / microcontroller architecture and uses a completely different software stack and host software.

Supported Hardware

  • Osmocom SIMtrace 1.x with SAM3 controller ** this is open hardware and schematics / PCB design is published
  • sysmocom sysmoQMOD (with 4 Modems, 4 SIM slots and 2 SAM3) ** this is a proprietary device, publicly available from sysmocom
  • sysmocom OWHW (with 2 Modems and 1 SAM3 onboard) ** this is not publicly available hardware, but still supported

This Repository

This repository contains several directory

  • firmware - the firmware to run on the actual devices
  • hardware - some information related to the hardware
  • host - Programs to use on the USB host to interface with the hardware

The host software includes

  • libosmo-simtrace2 - a shared library to talk to devices running the simtrace2 firmware
  • simtrace2-list - list any USB-attached devices running simtrace2 firmware
  • simtrace2-sniff - interface the 'trace' firmware to obtain card protocol traces
  • simtrace2-cardem-pcsc - interface the 'cardem' fimrware to use a SIM in a PC/SC reader