Sniffer with ringbuf, works SOMETIMES

* Sniffer uses phone endpoints for communication and the ringbuffer
    routines the phone communication uses
* Most times the Usart1 interrupt is not triggered, and therefore
    no values are recorded
This commit is contained in:
Christina Quast
2015-04-12 09:31:36 +02:00
parent 5c6a299c71
commit 2b8a18bf3a
11 changed files with 80 additions and 72 deletions

View File

@@ -7,6 +7,7 @@ import phone
from contextlib import closing
from util import HEX
from constants import PHONE_WR, PHONE_RD, PHONE_INT, SIM_WR, SIM_RD, SIM_INT
def find_dev():
dev = usb.core.find(idVendor=0x03eb, idProduct=0x6004)
@@ -30,14 +31,6 @@ def pattern_match(inpt):
else:
return inpt
SIM_WR = 0x1
SIM_RD = 0x82
SIM_INT = 0x83
PHONE_WR = 0x4
PHONE_RD = 0x85
PHONE_INT = 0x86
ERR_TIMEOUT = 110
def poll_ep(dev, ep):