diff --git a/host/bluetooth_rxtx/Makefile b/host/bluetooth_rxtx/Makefile index 00c9ae0e..216a94f6 100644 --- a/host/bluetooth_rxtx/Makefile +++ b/host/bluetooth_rxtx/Makefile @@ -17,7 +17,7 @@ # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -CC = gcc +CC ?= gcc OPTFLAGS = -O2 ANGRYFLAGS = -Wall #-Wextra -pedantic OS = $(shell uname) diff --git a/host/bluetooth_rxtx/ubertooth-lap.c b/host/bluetooth_rxtx/ubertooth-lap.c index 98129518..c063eab7 100644 --- a/host/bluetooth_rxtx/ubertooth-lap.c +++ b/host/bluetooth_rxtx/ubertooth-lap.c @@ -24,6 +24,7 @@ #include extern char Ubertooth_Device; +extern FILE *infile; extern FILE *dumpfile; extern int max_ac_errors; @@ -43,7 +44,6 @@ int main(int argc, char *argv[]) { int opt; struct libusb_device_handle *devh = NULL; - FILE* infile = NULL; while ((opt=getopt(argc,argv,"hi:U:d:e:")) != EOF) { switch(opt) { diff --git a/host/bluetooth_rxtx/ubertooth-uap.c b/host/bluetooth_rxtx/ubertooth-uap.c index a38ac79d..1bce357f 100644 --- a/host/bluetooth_rxtx/ubertooth-uap.c +++ b/host/bluetooth_rxtx/ubertooth-uap.c @@ -26,6 +26,7 @@ extern char Ubertooth_Device; extern FILE *dumpfile; +extern FILE *infile; extern int max_ac_errors; static void usage() @@ -47,7 +48,6 @@ int main(int argc, char *argv[]) int have_lap = 0; char *end; struct libusb_device_handle *devh = NULL; - FILE *infile = NULL; piconet pn; init_piconet(&pn); diff --git a/host/bluetooth_rxtx/ubertooth.c b/host/bluetooth_rxtx/ubertooth.c index 59c60ac1..a398553e 100644 --- a/host/bluetooth_rxtx/ubertooth.c +++ b/host/bluetooth_rxtx/ubertooth.c @@ -326,12 +326,12 @@ static void cb_lap(void* args, usb_pkt_rx *rx, int bank) /* Bottom clkn bit not needed, clk1 period is 625 uS. */ clk1 = clk0 / 2; - /* When reading from file , caller will read + /* When reading from file, caller will read * systime before calling this routine, so do * not overwrite. Otherwise, get current time. */ if ( infile == NULL ) systime = time(NULL); - printf("systime=%u ch=%d LAP=%06x err=%u clk100ns=%u clk1=%u s=%d n=%d snr=%d\n", + printf("systime=%u ch=%2d LAP=%06x err=%u clk100ns=%u clk1=%u s=%d n=%d snr=%d\n", (int)systime, rx->channel, r.LAP, r.error_count, clk100ns, clk1, signal_level, noise_level, snr);