albfan / miraclecast

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

How to use PIN? #492

Closed mrpandey closed 10 months ago

mrpandey commented 10 months ago

I am running this in one terminal: sudo miracle-wifid --log-level trace --log-date-time --config-methods keypad --use-dev

And this in another: sudo miracle-sinkctl --log-level trace --log-date-time.

My android device is able to discover the sink. And when I try to connect, my phone says "Invitation Sent. PIN 1231242". But the sinkctl shows this

[sinkctl] # run 4
[29/08/23 - 01:15:10 AM IST.029.566] now running on link 4
[29/08/23 - 01:15:19 AM IST.029.413] [ADD] Peer: 4e:0d:10:c2:1c:65@4
[29/08/23 - 01:15:22 AM IST.029.696] [GO NEG] Peer: 4e:0d:10:c2:1c:65@4 Type: pbc PIN: 
[29/08/23 - 01:15:22 AM IST.029.734] [FAIL] Peer: 4e:0d:10:c2:1c:65@4 Reason: group owner negotiation failed

I have been trying to cast my Android device on my laptop, but haven't even managed to establish a successful connection. I have tried other config-methods too. This is as far as I could get.

I need to know how I can tell my laptop to send the pin specified on my phone.

albfan commented 10 months ago

Start your miracle-wifid with --config-methods=keypad

see wpa docs for options:

# display: Can display PINs
#   label: Has hard-coded label which can be used as PIN
#  keypad: Has keyboard for dynamic PIN input