albfan / miraclecast

Connect external monitors to your system via Wifi-Display specification also known as Miracast
Other
3.81k stars 411 forks source link

Support more than 2 devices when testing the capabilities #449

Closed ferrybig closed 2 years ago

ferrybig commented 2 years ago

At the moment, when using the test-hardware-capabilities.sh script to test your hardware, it fails when you have more than 2 wifi supporting hardware connected to your pc:

With 2 wifi dongles:

$ ./test-hardware-capabilities.sh 
Choose wireless device:
1) wlp2s0
2) wlx66d914f5cb88
3) exit
device: 1
wlp2s0 supports P2P
$ ./test-hardware-capabilities.sh 
Choose wireless device:
1) wlp2s0
2) wlx66d914f5cb88
3) exit
device: 2
command failed: No such device (-19)
cannot find physical device for wlx66d914f5cb88

With 3 or more wifi dongles:

$ ./test-hardware-capabilities.sh 
command failed: No such file or directory (-2)
Sorry, do not support P2P

I expect the behavior or 3 or more wifi dongles to be the same as the behavior of 2 dongles, namely showing a list of devices where you can give a number for which device to test