Use rad1o's PID
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
ATTR{idVendor}=="1d50", ATTR{idProduct}=="604b", SYMLINK+="hackrf-jawbreaker-%k", MODE="660", GROUP="plugdev"
|
||||
ATTR{idVendor}=="1d50", ATTR{idProduct}=="6089", SYMLINK+="hackrf-one-%k", MODE="660", GROUP="plugdev"
|
||||
ATTR{idVendor}=="1d50", ATTR{idProduct}=="cc15", SYMLINK+="rad1o-%k", MODE="660", GROUP="plugdev"
|
||||
ATTR{idVendor}=="1fc9", ATTR{idProduct}=="000c", SYMLINK+="nxp-dfu-%k", MODE="660", GROUP="plugdev"
|
||||
|
@ -122,6 +122,7 @@ volatile bool do_exit = false;
|
||||
static const uint16_t hackrf_usb_vid = 0x1d50;
|
||||
static const uint16_t hackrf_jawbreaker_usb_pid = 0x604b;
|
||||
static const uint16_t hackrf_one_usb_pid = 0x6089;
|
||||
static const uint16_t rad1o_usb_pid = 0xcc15;
|
||||
|
||||
static libusb_context* g_libusb_context = NULL;
|
||||
|
||||
@ -362,7 +363,9 @@ hackrf_device_list_t* ADDCALL hackrf_device_list()
|
||||
libusb_get_device_descriptor(list->usb_devices[i], &device_descriptor);
|
||||
|
||||
if( device_descriptor.idVendor == hackrf_usb_vid ) {
|
||||
if( (device_descriptor.idProduct == hackrf_one_usb_pid) || (device_descriptor.idProduct == hackrf_jawbreaker_usb_pid) ) {
|
||||
if((device_descriptor.idProduct == hackrf_one_usb_pid) ||
|
||||
(device_descriptor.idProduct == hackrf_jawbreaker_usb_pid) ||
|
||||
(device_descriptor.idProduct == rad1o_usb_pid)) {
|
||||
int idx = list->devicecount++;
|
||||
list->usb_board_ids[idx] = device_descriptor.idProduct;
|
||||
list->usb_device_index[idx] = i;
|
||||
@ -431,7 +434,9 @@ libusb_device_handle* hackrf_open_usb(const char* const desired_serial_number)
|
||||
libusb_get_device_descriptor(devices[i], &device_descriptor);
|
||||
|
||||
if( device_descriptor.idVendor == hackrf_usb_vid ) {
|
||||
if( (device_descriptor.idProduct == hackrf_one_usb_pid) || (device_descriptor.idProduct == hackrf_jawbreaker_usb_pid) ) {
|
||||
if((device_descriptor.idProduct == hackrf_one_usb_pid) ||
|
||||
(device_descriptor.idProduct == hackrf_jawbreaker_usb_pid) ||
|
||||
(device_descriptor.idProduct == rad1o_usb_pid)) {
|
||||
printf("USB device %4x:%4x:", device_descriptor.idVendor, device_descriptor.idProduct);
|
||||
|
||||
if( desired_serial_number != NULL ) {
|
||||
@ -548,6 +553,11 @@ int ADDCALL hackrf_open(hackrf_device** device)
|
||||
usb_device = libusb_open_device_with_vid_pid(g_libusb_context, hackrf_usb_vid, hackrf_jawbreaker_usb_pid);
|
||||
}
|
||||
|
||||
if( usb_device == NULL )
|
||||
{
|
||||
usb_device = libusb_open_device_with_vid_pid(g_libusb_context, hackrf_usb_vid, rad1o_usb_pid);
|
||||
}
|
||||
|
||||
if( usb_device == NULL )
|
||||
{
|
||||
return HACKRF_ERROR_NOT_FOUND;
|
||||
|
@ -72,6 +72,7 @@ enum hackrf_board_id {
|
||||
enum hackrf_usb_board_id {
|
||||
USB_BOARD_ID_JAWBREAKER = 0x604B,
|
||||
USB_BOARD_ID_HACKRF_ONE = 0x6089,
|
||||
USB_BOARD_ID_RAD1O = 0xCC15,
|
||||
USB_BOARD_ID_INVALID = 0xFFFF,
|
||||
};
|
||||
|
||||
|
@ -2,5 +2,7 @@
|
||||
ATTR{idVendor}=="1d50", ATTR{idProduct}=="604b", SYMLINK+="hackrf-jawbreaker-%k", MODE="660", GROUP="@HACKRF_GROUP@"
|
||||
# HackRF One
|
||||
ATTR{idVendor}=="1d50", ATTR{idProduct}=="6089", SYMLINK+="hackrf-one-%k", MODE="660", GROUP="@HACKRF_GROUP@"
|
||||
# HackRF One
|
||||
ATTR{idVendor}=="1d50", ATTR{idProduct}=="CC15", SYMLINK+="rad1o-%k", MODE="660", GROUP="@HACKRF_GROUP@"
|
||||
# HackRF DFU
|
||||
ATTR{idVendor}=="1fc9", ATTR{idProduct}=="000c", SYMLINK+="nxp-dfu-%k", MODE="660", GROUP="@HACKRF_GROUP@"
|
||||
|
@ -32,6 +32,10 @@ else:
|
||||
if device:
|
||||
print 'Find: HackRF One'
|
||||
else:
|
||||
device = usb.core.find(idVendor=0x1d50, idProduct=0xCC15)
|
||||
if device:
|
||||
print 'Find: Rad1o'
|
||||
else:
|
||||
print 'Not find any HackRF device.'
|
||||
sys.exit()
|
||||
device.set_configuration()
|
||||
|
@ -31,8 +31,12 @@ else:
|
||||
if device:
|
||||
print 'Find: HackRF One'
|
||||
else:
|
||||
print 'Not find any HackRF device.'
|
||||
sys.exit()
|
||||
device = usb.core.find(idVendor=0x1d50, idProduct=0xCC15)
|
||||
if device:
|
||||
print 'Find: Rad1o'
|
||||
else:
|
||||
print 'Not find any HackRF device.'
|
||||
sys.exit()
|
||||
device.set_configuration()
|
||||
|
||||
def set_rx():
|
||||
|
Reference in New Issue
Block a user