You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the C script I made in Debian Linux (no command line arguments needed)
Wait around 10 minutes for it to scan
You will see a bunch of libusb errors and USB errors
Expected behaviour
Tell us what you expect should happen
I expect advertisement packets to keep being printed as channel 37, 38, and 39 are hopped for 10 seconds each.
Actual behaviour
Tell us what happens instead
Advertisement packets are printed from each channel as expected, however, it stops after around 10 minutes and libusb timeout errors are printed instead.
Version information
Operating system:
I am using Debian 12 Linux Bookworm.
Ubertooth tools version (ubertooth-rx -V):
libubertooth 1.1 (2020-12-R1)
libbtbb version:
libbtbb 1.0, (2018-06-R1)
Ubertooth firmware version (ubertooth-util -v):
2020-12-R1 API: 1.07
If you are reporting a problem that involves third party software
(Wireshark/Kismet/etc), please report the version here.
Output
My script:
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <errno.h>
pid_t btworker;
// Function to gracefully exit the program when the signal handler is called
void cleanExit(){
printf("Gracefully exiting bluetooth worker\n");
if (kill(btworker, SIGINT) == 0) {
printf("Killed btworker child process\n");
waitpid(btworker, NULL, 0); // wait for child process to terminate
sleep(2);
} else {
fprintf(stderr, "Could not kill child process\n");
}
exit(0);
}
int main() {
int hop_period = 10;
int channels[3] = {37, 38, 39};
int curr_channel = 0;
// infinintely loop btle scan
while (1) {
// creates new process to run btle scan
btworker = fork();
if (btworker < 0) {
fprintf(stderr, "Could not fork\n");
} else if (btworker == 0) {
// execute ubertooth scan in child process
char ad_channel[2];
sprintf(ad_channel, "%d", channels[curr_channel]);
execlp("stdbuf", "stdbuf", "-o0", "ubertooth-btle", "-n", "-A", ad_channel, (char *) NULL);
// if this is reached execlp failed
fprintf(stderr, "BTLE capture failed\n");
} else {
// rest of parent process code has to go here
printf("Scanning for %d seconds on channel %d...\n", hop_period, channels[curr_channel]);
sleep(hop_period);
if (kill(btworker, SIGINT) == 0) {
printf("Killed btworker child process\n");
waitpid(btworker, NULL, 0); // wait for child process to terminate
sleep(2);
} else {
fprintf(stderr, "Could not kill child process\n");
}
// update channel to scan next
if (curr_channel == 2) {
curr_channel = 0;
} else {
curr_channel += 1;
}
}
}
}
The error message:
Scanning for 10 seconds on channel 37...
libUSB Error: Operation timed out (-7)
libUSB Error: Operation timed out (-7)
libUSB Error: Operation timed out (-7)
libUSB Error: Operation timed out (-7)
USB Error
The messages repeat forever while scanning is repeatedly attempted on each channel for 10 s.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Expected behaviour
Tell us what you expect should happen
I expect advertisement packets to keep being printed as channel 37, 38, and 39 are hopped for 10 seconds each.
Actual behaviour
Tell us what happens instead
Advertisement packets are printed from each channel as expected, however, it stops after around 10 minutes and libusb timeout errors are printed instead.
Version information
Operating system:
I am using Debian 12 Linux Bookworm.
Ubertooth tools version (ubertooth-rx -V):
libubertooth 1.1 (2020-12-R1)
libbtbb version:
libbtbb 1.0, (2018-06-R1)
Ubertooth firmware version (ubertooth-util -v):
2020-12-R1 API: 1.07
If you are reporting a problem that involves third party software
(Wireshark/Kismet/etc), please report the version here.
Output
My script:
The error message:
The messages repeat forever while scanning is repeatedly attempted on each channel for 10 s.
The text was updated successfully, but these errors were encountered: