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

Specify bluetooth interface #30

Closed
JsBergbau opened this issue Nov 29, 2020 · 1 comment
Closed

Specify bluetooth interface #30

JsBergbau opened this issue Nov 29, 2020 · 1 comment

Comments

@JsBergbau
Copy link

If you change line
spawn -noecho /usr/bin/gatttool -I
to
spawn -noecho /usr/bin/gatttool -I -i hci1 you can use it with another interface.

Would be great to do it dynamically from command line. A good place would be the last argument like
eq3.exp aa:bb:cc:dd:ee:ff boost hci1

However I'm not a expect/tcl expert and not used to the logic of this script.
I've changed the line in parse args

  set cmd ""
  for {set i 1} {$i < [llength $argv]} {incr i} {
    if {$i > 1} {
      append cmd " "
    }
    if {[regexp -nocase "hci" [lindex $argv $i]]} {
      puts "Store interface in a global variable here"
    } else  {
      append cmd [lindex $argv $i]
    }
  }

However then doCommand does another check and fails. You as developer should be able to change it in a few minutes.

Thanks for help.

@Heckie75
Copy link
Owner

Done. Pls check latest version.

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