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

Scan hci0 and hci1 #261

Open
gigich opened this issue Jun 17, 2024 · 2 comments
Open

Scan hci0 and hci1 #261

gigich opened this issue Jun 17, 2024 · 2 comments

Comments

@gigich
Copy link

gigich commented Jun 17, 2024

I have the problem, that my BT-Device is switching between hci0 and hci1. If it gets to hci1, it is no longer under control of this commands for ble communication.

I tried it to rename to hci0 with the following config-files but it does not seem to help:

vi /etc/udev/rules.d/99-bt.rules
KERNEL=="hci1", SUBSYSTEM=="bluetooth", ATTR{address}=="08:BE:AC:43:06:7A", NAME="hci0"

vi /etc/udev/rules.d/10-local.rules
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="7392", ATTR{idProduct}=="c611", TEST=="power/control", ATTR{power/control}="on"

@SebastianGode
Copy link

It really should automatically try all available Blutooth devices and not just hci0.
I've got the same issue.

There's a PR open for some BLE improvements: #269
Maybe @sethterashima could also change the behaviour of the client to not only look for hci0 as device.

@kirichkov
Copy link

Unless you're using the tesla-control command line utility, I think (haven't tested it just yet) you can select the BlueTooth device using:

	d, err := dev.NewDevice(*device)
	if err != nil {
		log.Fatalf("can't new device : %s", err)
	}
	ble.SetDefaultDevice(d)

You need to do this before starting a new connection to the vehicle with conn, err := ble.NewConnection(ctx, vin)
I've noticed this in the go-ble example

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

3 participants