Skip to content

Conversation

@martinling
Copy link
Member

Adds a check in hackrf_info for whether the device is on a dedicated bus.

@martinling martinling force-pushed the warn-bus-sharing branch 3 times, most recently from e27b459 to 44cff98 Compare September 26, 2024 10:53
@mossmann
Copy link
Member

mossmann commented Oct 2, 2024

Is there a reason hackrf_device_list_bus_sharing() must be in libhackrf, or could it be in hackrf_info?

@martinling
Copy link
Member Author

I started off with all the code in hackrf_info - you can see that version in this commit.

I changed it for two reasons:

  1. Because the code needs to call libusb_get_bus_number and libusb_get_parent, it becomes necessary for hackrf_info.c to include libusb.h, and also to build the binary with the necessary linker flags to link it to libusb directly rather than just transitively via libhackrf. That would have required some changes in the build system, and I suspected that it might also cause some issues for distros.

  2. I figured this might be useful information for GUI tools as well, so having a library function that did the necessary iterating and counting seemed like a nice idea.

@martinling martinling added the enhancement potential new feature label Dec 4, 2024
@martinling martinling marked this pull request as ready for review February 6, 2025 16:28
@martinling martinling marked this pull request as draft September 18, 2025 15:20
@martinling martinling marked this pull request as ready for review November 6, 2025 16:29
@mossmann mossmann self-requested a review November 6, 2025 16:29
@martinling martinling assigned mossmann and unassigned martinling Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement potential new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants