You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have been really enjoying bluepy however I have came across an issue that is stopping me in my development. When setting the iface value to a string '0' or '1' in Peripheral() it fails to actually select one or the other and just defaults to hci0.
I have went into the btle.py file and added a print statement in _connect() to output 'hci'+str(iface) and it does correctly receive either a 0 or a 1. The reason I can tell which interface is being used is because I have hcidump open for both devices and can only see one every actually receiving hci commands no matter the value for iface.
Some things to note:
Using Raspberry Pi 4 with Raspbian V11 bullseye
Bluez 5.55 (bluetoothd -v called to find this)
BL654 (NRF52840) dongle (I can get data on this just fine using bluepy)
The documentation states that iface corresponds to /dev/hci+str(iface) however on my pi the /dev/ folder corresponds to ports and there are no hci devices with an id listed there. I can see them listed in bluetoothctl, btmon, btmgmt, and hciconfig though.
I would love to keep using bluepy but I need to get this issue fixed moving forward, I am happy to also work on a pull request to fix this once I get some help sorting out the actual issue! Thanks.
Here is some sample code from my project:
def initiate_peripheral(addr,type,hci):
p = Peripheral()
p.connect(addr,type,str(hci))
p.withDelegate(MyDelegate(p))
p.setMTU(251)
return p
p = initiate_peripheral(args['macid'],'random',args['hci_id'])
The text was updated successfully, but these errors were encountered:
A further note, using bluepy-helper and calling it with a 0 or a 1 at the end like so,
./bluepy-helper 1
./bluepy-helper 0
In this case, connecting with conn adding an hciX on the end still does not work. However, I can actually call scan and it will change which hci device being used depending on how I called ./bluepy-helper.
Hello, I have been really enjoying bluepy however I have came across an issue that is stopping me in my development. When setting the iface value to a string '0' or '1' in Peripheral() it fails to actually select one or the other and just defaults to hci0.
I have went into the btle.py file and added a print statement in _connect() to output 'hci'+str(iface) and it does correctly receive either a 0 or a 1. The reason I can tell which interface is being used is because I have hcidump open for both devices and can only see one every actually receiving hci commands no matter the value for iface.
Some things to note:
I would love to keep using bluepy but I need to get this issue fixed moving forward, I am happy to also work on a pull request to fix this once I get some help sorting out the actual issue! Thanks.
Here is some sample code from my project:
The text was updated successfully, but these errors were encountered: