File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,7 +112,8 @@ static const max2837_ft_t max2837_ft[] = {
112112volatile bool do_exit = false;
113113
114114static const uint16_t hackrf_usb_vid = 0x1d50 ;
115- static const uint16_t hackrf_usb_pid = 0x604b ;
115+ static const uint16_t hackrf_jawbreaker_usb_pid = 0x604b ;
116+ static const uint16_t hackrf_one_usb_pid = 0x6089 ;
116117
117118static libusb_context * g_libusb_context = NULL ;
118119
@@ -269,7 +270,11 @@ int ADDCALL hackrf_open(hackrf_device** device)
269270
270271 // TODO: Do proper scanning of available devices, searching for
271272 // unit serial number (if specified?).
272- usb_device = libusb_open_device_with_vid_pid (g_libusb_context , hackrf_usb_vid , hackrf_usb_pid );
273+ usb_device = libusb_open_device_with_vid_pid (g_libusb_context , hackrf_usb_vid , hackrf_one_usb_pid );
274+ if ( usb_device == NULL )
275+ {
276+ usb_device = libusb_open_device_with_vid_pid (g_libusb_context , hackrf_usb_vid , hackrf_jawbreaker_usb_pid );
277+ }
273278 if ( usb_device == NULL )
274279 {
275280 return HACKRF_ERROR_NOT_FOUND ;
@@ -1278,6 +1283,9 @@ const char* ADDCALL hackrf_board_id_name(enum hackrf_board_id board_id)
12781283 case BOARD_ID_JAWBREAKER :
12791284 return "Jawbreaker" ;
12801285
1286+ case BOARD_ID_HACKRF_ONE :
1287+ return "HackRF One" ;
1288+
12811289 case BOARD_ID_INVALID :
12821290 return "Invalid Board ID" ;
12831291
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ enum hackrf_error {
6565enum hackrf_board_id {
6666 BOARD_ID_JELLYBEAN = 0 ,
6767 BOARD_ID_JAWBREAKER = 1 ,
68+ BOARD_ID_HACKRF_ONE = 2 ,
6869 BOARD_ID_INVALID = 0xFF ,
6970};
7071
You can’t perform that action at this time.
0 commit comments