iavofficial / IAV_Distortion

Is a framework to showcase cyber security influences on anki-overdrive vehicles
Apache License 2.0
3 stars 2 forks source link

Connecting to Anki Cars fails sometimes #119

Open m-braunschweig opened 2 months ago

m-braunschweig commented 2 months ago

Describe the bug Connecting to Anki Overdrive cars sometimes fail on the Raspberry Pi without apparent reason.

To Reproduce Steps to reproduce the behavior:

  1. Go to the StaffUI
  2. Scan for Anki vehicles
  3. Connect to multiple Anki cars

Expected behavior All vehicles should connect successfully.

System:

Additional context In an attempt to find out more about the bug it was revealed that one of the called Bleak methods raised an OSError which wasn't handeled. The Error didn't seem to contain additionaly information. Please also note the new information described in the comment

Possible improvement until the core problem is fixed: To allow the user to make mutliple connection attempts until one succeeds it should be considered to leave found vehicles in the found list and only remove them after there was an successful connection attempt

m-braunschweig commented 2 months ago

During futher testing it was revealed that having a WiFi hotspot running leads to this behaviour. Maybe this can be improved by changing some settings so the BLE performance doesn't suffer that much from the use of the WiFi hotspot

m-braunschweig commented 2 months ago

Might be related to #24

m-braunschweig commented 2 months ago

As a solution I would propose to try using an external WiFi dongle for the hotspot or using an external Bluetooth dongle for the BLE-Connection. The first one might be easier since the Bleak library requires platform specific code to select a BLE-Adapter while the hotspot can be easily configured for a given network interface

iav-DaBi commented 1 month ago

ALFA AWUS036ACM is ordered USB WiFi adapters that are supported with Linux in-kernel drivers

iav-BjRo commented 1 month ago

moved to v3.2.0 for further investigation