nccgroup / BLESuite

BLESuite is a Python package that provides an easier way to test Bluetooth Low Energy (BLE) device
MIT License
176 stars 40 forks source link

global name 'HCI_Cmd_LE_Set_Scan_Response_Data' is not defined #8

Closed vinitatgithub closed 5 years ago

vinitatgithub commented 5 years ago

On Running advertising.py, I see following error. Any idea how to get around this?

pi@PiG-SNA3-019:~/BLESuite/docs/examples $ sudo python advertising.py Traceback (most recent call last): File "advertising.py", line 34, in connection_manager.set_scan_response_data(ad_entries) File "/usr/local/lib/python2.7/dist-packages/blesuite/connection_manager.py", line 847, in set_scan_response_data self.stack_connection.set_scan_response_data(data) File "/usr/local/lib/python2.7/dist-packages/blesuite/pybt/core.py", line 567, in set_scan_response_data self.role.stack.set_scan_response_data(data) File "/usr/local/lib/python2.7/dist-packages/blesuite/pybt/stack.py", line 147, in set_scan_response_data self.command(HCI_Cmd_LE_Set_Scan_Response_Data(data=data)) NameError: global name 'HCI_Cmd_LE_Set_Scan_Response_Data' is not defined

ikelos commented 5 years ago

I suspect this is due to the version of scapy you're using. Could you find out which one you're using please?

dariushoule commented 5 years ago

@vinitatgithub I ran into the same issue and resolved by installing the recommended scapy from the docs. Try this:

pip uninstall scapy
git clone https://github.com/secdev/scapy.git
cd scapy
sudo python setup.py install

As long as you have the system deps installed you'll be good after that.

vinitatgithub commented 5 years ago

Thank you @ikelos and @dariushoule for the suggestions. Post reinstalling scapy things look better.