Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to set TTY & logfile path for examples with '--address' program option #504

Open
fominykhandrei opened this issue Jul 13, 2023 · 1 comment

Comments

@fominykhandrei
Copy link
Contributor

fominykhandrei commented Jul 13, 2023

Describe the bug
It 's not possible to set one of the common program option ('ulrh?') together with "--address" for some examples.
E.g for le_streamer_client it's not possible to set TTY port together with GATT server address:

$ ./le_streamer_client -u /dev/ttyUSB1 --address 6C:1D:EB:90:C8:D4
./le_streamer_client: unrecognized option '--address'
Packet Log: /tmp/hci_dump.pklg
H4 device: /dev/ttyUSB1
Usage: ./le_streamer_client [-a|--address aa:bb:cc:dd:ee:ff]
If no argument is provided, LE Streamer Client will start scanning and connect to the first device named 'LE Streamer'.
To connect to a specific device use argument [-a].

^CCTRL-C - SIGINT received, shutting down..

If TTY is provided AFTER address, then it is also ignored

$ ./le_streamer_client --address 6C:1D:EB:90:C8:D4 -u /dev/ttyUSB1
./le_streamer_client: unrecognized option '--address'
Packet Log: /tmp/hci_dump.pklg
H4 device: /dev/tty.usbmodemEF437DF524C51
Usage: ./le_streamer_client [-a|--address aa:bb:cc:dd:ee:ff]
If no argument is provided, LE Streamer Client will start scanning and connect to the first device named 'LE Streamer'.
To connect to a specific device use argument [-a].

To Reproduce

Steps to reproduce the behavior:
0. Linux host build, POSIX-H4 port

  1. Run example
$ ./gatt_battery_query -u /dev/ttyUSB1 --address 6C:1D:EB:90:C8:D4

Expected behavior

It should be possible to specify GATT server address

HCI Packet Logs
For all Bluetooth issues, please provide a full packet log that includes initial pairing. You need to zip the packet log as GitHub does not know how to handle .pklg files.

Environment: (please complete the following information):

  • Current BTstack branch: master
  • Bluetooth Controller: HCI H4
@mringwal
Copy link
Member

Good point. Could you try the version on develop-getopt-libusb branch? It updates the command line argument handling code for libusb and posix-h4 ports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants