Skip to content

Commit 666eeb2

Browse files
author
lolololol
committed
save
1 parent 4271322 commit 666eeb2

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

capturebuddy.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ def runCaptureTask():
6565
LEIA_Hack = True
6666
hack_captureSet = sparkgap.filemanager.CaptureSet(tracecount=config["tracecount"],samplecount=config["samplecount"])
6767
captureSet = sparkgap.filemanager.CaptureSet(tracecount=config["tracecount"],samplecount=config["samplecount"])
68-
# traces = np.zeros((config["tracecount"],config["samplecount"]),np.float32)
69-
# data = np.zeros((config["tracecount"],config["len_in"]),np.uint8) # RAND
70-
# data_out = np.zeros((config["tracecount"],config["len_out"]),np.uint8) # AUTN
7168
for i in range(0,config["tracecount"]):
7269
print("=" * 80)
7370
print("[%s] Running job: %d/%d. %d missed" % (datetime.datetime.now(),i,config["tracecount"],missedCount))

frontends/hackrf.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import sys
66
import subprocess
7+
import numpy
78

89
class CaptureInterface():
910
def __init__(self):
@@ -25,9 +26,12 @@ def capture(self):
2526
print("Error: subprocess timed out")
2627
return [0]
2728
self.hackrf_proc = None
28-
print(stdout)
29-
print(stderr)
30-
return [0]
29+
if b"exit" not in stderr:
30+
print("Error: no exit detected")
31+
return [0]
32+
# print(stdout)
33+
# print(stderr)
34+
return numpy.fromstring(stdout, dtype=numpy.uint8)
3135

3236
# hackrf_transfer -H -d <serial number> -a 0 -l 32 -g 32 -r rx1.cs8
3337
def arm(self):

0 commit comments

Comments
 (0)