Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

miraclecast as source - cannot connect to the android TV box sink #297

Closed
lucky62 opened this issue Oct 2, 2018 · 4 comments
Closed

miraclecast as source - cannot connect to the android TV box sink #297

lucky62 opened this issue Oct 2, 2018 · 4 comments

Comments

@lucky62
Copy link

lucky62 commented Oct 2, 2018

Hello,

I am trying to use miraclecast as source on Linux Mint 18.3.
My sink is android apk Miracast on android TV box TX3Pro.
Apk seems that it is like this:
https://android-apk.org/com.amlogic.miracast/8456287-amlogic-miracast/
But my version is newer 2.0.20160324 - the same mentioned here:
https://forum.xda-developers.com/android-stick--console-computers/amlogic/miracast-app-leelbox-q3-s912-t3617603/
Apk is working, I can share screen from my phone.

My problem is:
Miraclecast can find android sink but android sink is not showing miraclecast in peer list.
When trying to connect then I must confirm connection on android sink (popup window is displayed).
But connection fails.

wifictl messages:

# miracle-wifictl --log-level trace
[ADD] Link: 4
[miraclectl] # select 4
link 4 selected
[miraclectl] # p2p-scan
[ADD] Peer: 3a:1d:d9:97:fd:a2@4
[miraclectl] # list
  LINK INTERFACE                FRIENDLY-NAME                  MANAGED   
     4 wlx801f02596915          <unknown>                      yes       

  LINK PEER-ID                  FRIENDLY-NAME                  CONNECTED 
     4 3a:1d:d9:97:fd:a2@4      TX3Pro                         no        

 1 peers and 1 links listed.
[miraclectl] # connect 3a:1d:d9:97:fd:a2@4
[FAIL] Peer: 3a:1d:d9:97:fd:a2@4 Reason: unknown
[REMOVE] Peer: 3a:1d:d9:97:fd:a2@4

wifid messages:

DEBUG: supplicant: connect to 3a:1d:d9:97:fd:a2 via pbc/(null) (supplicant_peer_connect() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast/src/wifi/wifid-supplicant.c:739)
TRACE: wpa: raw message: <3>P2P-FIND-STOPPED 
DEBUG: supplicant: p2p-scanning stopped on wlx801f02596915 (supplicant_event_p2p_find_stopped() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast/src/wifi/wifid-supplicant.c:904)
TRACE: wpa: raw message: OK
TRACE: wpa: raw message: <3>P2P-GO-NEG-SUCCESS role=GO freq=2472 ht40=0 peer_dev=3a:1d:d9:97:fd:a2 peer_iface=3a:1d:d9:97:fd:a2 wps_method=PBC
DEBUG: supplicant: set STA-MAC for 3a:1d:d9:97:fd:a2 from <none> to 3a:1d:d9:97:fd:a2 (via GO-NEG-SUCCESS) (supplicant_event_p2p_go_neg_success() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast/src/wifi/wifid-supplicant.c:1195)
TRACE: wpa: raw message: IFNAME=wlx801f02596915 <3>AP-ENABLED 
TRACE: wpa: raw message: IFNAME=wlx801f02596915 <3>CTRL-EVENT-CONNECTED - Connection to 80:1f:02:59:69:15 completed [id=0 id_str=]
TRACE: wpa: raw message: IFNAME=wlx801f02596915 <3>WPS-PBC-ACTIVE 
TRACE: wpa: raw message: <3>P2P-GROUP-FORMATION-FAILURE 
DEBUG: supplicant: peer TX3Pro connection failed (supplicant_event_p2p_group_formation_failure() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast/src/wifi/wifid-supplicant.c:1319)
TRACE: wpa: raw message: <3>P2P-GROUP-REMOVED wlx801f02596915 GO reason=FORMATION_FAILED
DEBUG: supplicant: stray P2P-GROUP-REMOVED: <3>P2P-GROUP-REMOVED wlx801f02596915 GO reason=FORMATION_FAILED (supplicant_event_p2p_group_removed() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast/src/wifi/wifid-supplicant.c:1287)
TRACE: wpa: raw message: IFNAME=wlx801f02596915 <3>AP-DISABLED 
DEBUG: supplicant: unhandled wpas-event: IFNAME=wlx801f02596915 <3>AP-DISABLED  (supplicant_event() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast/src/wifi/wifid-supplicant.c:1499)
TRACE: wpa: raw message: IFNAME=wlx801f02596915 <3>CTRL-EVENT-DISCONNECTED bssid=80:1f:02:59:69:15 reason=3 locally_generated=1
TRACE: wpa: raw message: <3>P2P-DEVICE-LOST p2p_dev_addr=3a:1d:d9:97:fd:a2
DEBUG: supplicant: lost peer 3a:1d:d9:97:fd:a2 (supplicant_event_p2p_device_lost() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast/src/wifi/wifid-supplicant.c:986)
DEBUG: peer: peer 3a:1d:d9:97:fd:a2 @ wlx801f02596915 stopped (peer_supplicant_stopped() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast/src/wifi/wifid-peer.c:172)
DEBUG: peer: free peer: 3a:1d:d9:97:fd:a2 @ wlx801f02596915 (peer_free() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast/src/wifi/wifid-peer.c:90)
INFO: peer: remove peer: 3a:1d:d9:97:fd:a2
@lucky62
Copy link
Author

lucky62 commented Oct 2, 2018

additional note: when I am running miraclecast as a sink then android is showing my notebook in the peer list.

@albfan
Copy link
Owner

albfan commented Oct 2, 2018

miraclecast as source is a WIP, see #4. You need to compile a different branch #172.

Add feedback there

@albfan albfan closed this as completed Oct 2, 2018
@lucky62
Copy link
Author

lucky62 commented Oct 5, 2018

I have compiled 'derekdai-master-squashed' branch. But result is the same:

wifictl messages:

[miraclectl] # p2p-scan
[ADD] Peer: 3a:1d:d9:97:fd:a2@4
[miraclectl] # list
  LINK INTERFACE                FRIENDLY-NAME                  MANAGED   
     4 wlx801f02596915          <unknown>                      yes       

  LINK PEER-ID                  FRIENDLY-NAME                  CONNECTED 
     4 3a:1d:d9:97:fd:a2@4      TX3Pro                         no        

 1 peers and 1 links listed.
[miraclectl] # connect 3a:1d:d9:97:fd:a2@4
[FAIL] Peer: 3a:1d:d9:97:fd:a2@4 Reason: unknown
[REMOVE] Peer: 3a:1d:d9:97:fd:a2@4

wifid messages:

DEBUG: supplicant: connect to 3a:1d:d9:97:fd:a2 via pbc/(null) (supplicant_peer_connect() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast_source/src/wifi/wifid-supplicant.c:741)
TRACE: wpa: raw message: <3>P2P-FIND-STOPPED 
DEBUG: supplicant: p2p-scanning stopped on wlx801f02596915 (supplicant_event_p2p_find_stopped() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast_source/src/wifi/wifid-supplicant.c:912)
TRACE: wpa: raw message: OK
TRACE: wpa: raw message: <3>P2P-GO-NEG-SUCCESS role=GO freq=2472 ht40=0 peer_dev=3a:1d:d9:97:fd:a2 peer_iface=3a:1d:d9:97:fd:a2 wps_method=PBC
DEBUG: supplicant: set STA-MAC for 3a:1d:d9:97:fd:a2 from <none> to 3a:1d:d9:97:fd:a2 (via GO-NEG-SUCCESS) (supplicant_event_p2p_go_neg_success() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast_source/src/wifi/wifid-supplicant.c:1203)
TRACE: wpa: raw message: IFNAME=wlx801f02596915 <3>AP-ENABLED 
TRACE: wpa: raw message: IFNAME=wlx801f02596915 <3>CTRL-EVENT-CONNECTED - Connection to 80:1f:02:59:69:15 completed [id=0 id_str=]
TRACE: wpa: raw message: IFNAME=wlx801f02596915 <3>WPS-PBC-ACTIVE 
TRACE: wpa: raw message: IFNAME=wlx801f02596915 <3>CTRL-EVENT-BSS-REMOVED 9 e4:6f:13:60:2d:66
TRACE: wpa: raw message: <3>P2P-GROUP-FORMATION-FAILURE 
DEBUG: supplicant: peer TX3Pro connection failed (supplicant_event_p2p_group_formation_failure() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast_source/src/wifi/wifid-supplicant.c:1327)
TRACE: wpa: raw message: <3>P2P-GROUP-REMOVED wlx801f02596915 GO reason=FORMATION_FAILED
DEBUG: supplicant: stray P2P-GROUP-REMOVED: <3>P2P-GROUP-REMOVED wlx801f02596915 GO reason=FORMATION_FAILED (supplicant_event_p2p_group_removed() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast_source/src/wifi/wifid-supplicant.c:1295)
TRACE: wpa: raw message: IFNAME=wlx801f02596915 <3>AP-DISABLED 
DEBUG: supplicant: unhandled wpas-event: IFNAME=wlx801f02596915 <3>AP-DISABLED  (supplicant_event() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast_source/src/wifi/wifid-supplicant.c:1507)
TRACE: wpa: raw message: IFNAME=wlx801f02596915 <3>CTRL-EVENT-DISCONNECTED bssid=80:1f:02:59:69:15 reason=3 locally_generated=1
TRACE: wpa: raw message: <3>P2P-DEVICE-LOST p2p_dev_addr=3a:1d:d9:97:fd:a2
DEBUG: supplicant: lost peer 3a:1d:d9:97:fd:a2 (supplicant_event_p2p_device_lost() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast_source/src/wifi/wifid-supplicant.c:994)
DEBUG: peer: peer 3a:1d:d9:97:fd:a2 @ wlx801f02596915 stopped (peer_supplicant_stopped() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast_source/src/wifi/wifid-peer.c:172)
DEBUG: peer: free peer: 3a:1d:d9:97:fd:a2 @ wlx801f02596915 (peer_free() in /SHARED/SSD_DATA/00_MyProjects/00_MyExperiments/miraclecast_source/src/wifi/wifid-peer.c:90)
INFO: peer: remove peer: 3a:1d:d9:97:fd:a2

@albfan
Copy link
Owner

albfan commented Oct 5, 2018

@lucky62, @derekdai implementation do not work that way. See https://github.com/albfan/miraclecast/wiki/Internals#source-implementation. You need to run miracle-dispctl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants