generated from nix-community/nur-packages-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ice9-bluetooth-sniffer: manually apply #40 and patch usrp serial pars…
…ing function to work properly
- Loading branch information
Showing
2 changed files
with
34 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
diff --git a/usrp.c b/usrp.c | ||
index 59a2fed..bc10fa7 100644 | ||
--- a/usrp.c | ||
+++ b/usrp.c | ||
@@ -6,7 +6,7 @@ | ||
#include <signal.h> | ||
#include <stdio.h> | ||
#include <string.h> | ||
- | ||
+#include <complex.h> | ||
#include <uhd.h> | ||
|
||
#include "sdr.h" | ||
@@ -114,7 +114,7 @@ char *usrp_get_serial(char *name) { | ||
char *dash; | ||
if (strncmp(name, "usrp-", 5) != 0) | ||
return NULL; | ||
- dash = strchr(name, '-'); | ||
+ dash = strrchr(name, '-'); | ||
if (dash == NULL) | ||
return NULL; | ||
return dash + 1; // skip the dash | ||
@@ -156,8 +156,8 @@ void *usrp_stream_thread(void *arg) { | ||
void *buf; | ||
uhd_rx_metadata_error_code_t error_code; | ||
uhd_stream_args_t stream_args = { | ||
- .cpu_format = "fc32", | ||
- .otw_format = "sc16", | ||
+ .cpu_format = "sc8", | ||
+ .otw_format = "sc8", | ||
.args = "", | ||
.channel_list = &channel, | ||
.n_channels = 1 |