Git Product home page Git Product logo

Comments (10)

xuwen0306 avatar xuwen0306 commented on June 27, 2024

from how-to-miracast-on-aosp.

M9Apar avatar M9Apar commented on June 27, 2024

Hi following is my board logs it runs on Android 4.4.2 and we have windows laptop runs 8.1(available in logs) and it support miracast that we tested using other Sink Application, also we tested with windows 10 running mobile same issue occurs
07-16 00:13:33.422 3151-3151/? D/P2pSinkActivity:
onReceive() [android.net.wifi.p2p.THIS_DEVICE_CHANGED]
07-16 00:13:33.432 3151-3151/? D/P2pSinkActivity: Device: K2_Dongle
 deviceAddress: 46:2c:05:2d:8c:f0
 primary type: 10-0050F204-5
 secondary type: null
 wps: 0
 grpcapab: 0
 devcapab: 0
 status: 0
 wfdInfo: WFD enabled: trueWFD DeviceInfo: 19
 WFD CtrlPort: 7236
 WFD MaxThroughput: 50
 [Connected]
07-16 00:13:33.582 3151-3151/? D/P2pSinkActivity:
onReceive() [android.net.wifi.p2p.PEERS_CHANGED]
07-16 00:13:33.592 3151-3151/? D/P2pSinkActivity:  try requestPeers()
07-16 00:13:33.592 3151-3151/? D/P2pSinkActivity:
onReceive() [android.net.wifi.p2p.CONNECTION_STATE_CHANGE]
07-16 00:13:33.602 3151-3151/? D/P2pSinkActivity: NetworkInfo: type: WIFI_P2P[]
  state: CONNECTED/CONNECTED
  reason: (unspecified)
  extra: (none)
  roaming: false
  failover: false
  isAvailable: true
  isConnectedToProvisioningNetwork: false
07-16 00:13:33.602 3151-3151/? D/P2pSinkActivity:
invokeSink() call requestGroupInfo()
07-16 00:13:33.612 3505-3505/? I/dnsmasq: DHCPDISCOVER(p2p-p2p0-9) 0e:8b:fd:5b:83:21
07-16 00:13:33.612 3505-3505/? I/dnsmasq: DHCPOFFER(p2p-p2p0-9) 192.168.49.246 0e:8b:fd:5b:83:21
07-16 00:13:33.612 3505-3505/? I/dnsmasq: DHCPREQUEST(p2p-p2p0-9) 192.168.49.246 0e:8b:fd:5b:83:21
07-16 00:13:33.612 3505-3505/? I/dnsmasq: DHCPACK(p2p-p2p0-9) 192.168.49.246 0e:8b:fd:5b:83:21 TEJAS-ULTRA
07-16 00:13:33.632 3151-3151/? D/P2pSinkActivity:  onGroupInfoAvailable():
07-16 00:13:33.642 3151-3151/? D/P2pSinkActivity: network: DIRECT-cq-K2_Dongle
 isGO: true
 GO: Device:
 deviceAddress: 46:2c:05:2d:8c:f0
 primary type: null
 secondary type: null
 wps: 0
 grpcapab: 0
 devcapab: 0
 status: 4
 wfdInfo: WFD enabled: falseWFD DeviceInfo: 0
 WFD CtrlPort: 0
 WFD MaxThroughput: 0
 Client: Device: TEJAS-ULTRA
 deviceAddress: 0c:8b:fd:5b:83:22
 primary type: 1-0050F200-0
 secondary type: null
 wps: 392
 grpcapab: 40
 devcapab: 36
 status: 0
 wfdInfo: WFD enabled: trueWFD DeviceInfo: 272
 WFD CtrlPort: 7236
 WFD MaxThroughput: 300
 interface: p2p-p2p0-9
 networkId: 9
 password: wffvMztr

07-16 00:13:33.692 3151-3151/? D/P2pSinkActivity: invokeSink() isWifiDisplaySource(TEJAS-ULTRA)=[true] port[7236]
07-16 00:13:33.702 3151-3151/? D/P2pSinkActivity: invokeSink() watch /proc/net/arp thread start.
07-16 00:13:33.712 3151-3506/? D/RarpImpl: execRarp() [0]IP address HW type Flags HW address Mask Device
07-16 00:13:33.712 3151-3506/? D/RarpImpl: execRarp() [1]192.168.49.246 0x1 0x2 0e:8b:fd:5b:83:21 * p2p-p2p0-9
07-16 00:13:33.712 3151-3506/? I/RarpImpl: parseArpLine() this is header line. don't create arp[IP address HW type Flags HW address Mask Device]
07-16 00:13:33.722 3151-3506/? D/RarpImpl: parseArpLine() created arp[ IP address:192.168.49.246¥n HW type:0x1¥n Flags:0x2¥n HW address:0e:8b:fd:5b:83:21¥n Mask:*¥n Device:p2p-p2p0-9]
07-16 00:13:36.722 3151-3151/? D/P2pSinkActivity: invokeSink() Source Addr[192.168.49.246:7236]
07-16 00:13:36.732 3151-3507/? D/Mira_for_You_JNI: Sink Display[1360, 768] Special[0] Nexus10[0]
07-16 00:13:36.732 3151-3507/? E/WifiDisplaySink: WifiDisplaySink() fopen error[2]
07-16 00:13:36.732 3151-3507/? D/WifiDisplaySink: WifiDisplaySink() Sink is Nexus10[0], FullHD[0]
07-16 00:13:36.732 3151-3507/? D/Mira_for_You_JNI: Source Addr[192.168.49.246] Port[7236]
07-16 00:13:38.742 3151-3507/? I/NetworkSession: connecting socket 57 to 192.168.49.246:7236
07-16 00:13:38.742 3151-3507/? I/WifiDisplaySink: We're now connected.
07-16 00:13:38.752 3151-3507/? D/NetworkSession: --> --> --> sendRequest() session[1] time[-1] result[0]
07-16 00:13:38.752 3151-3507/? D/NetworkSession: [-1][RTSP/1.0 200 OK
Date: Sat, 16 Jul 2016 07:13:38 +0000
User-Agent: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 1
Public: org.wfa.wfd1.0, GET_PARAMETER, SET_PARAMETER

                                             ]

07-16 00:13:38.752 3151-3507/? D/NetworkSession: --> --> --> sendRequest() session[1] time[-1] result[0]
07-16 00:13:38.752 3151-3507/? D/NetworkSession: [146][OPTIONS * RTSP/1.0
Date: Sat, 16 Jul 2016 07:13:38 +0000
User-Agent: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 1
Require: org.wfa.wfd1.0

                                             ]

07-16 00:13:39.032 3151-3507/? D/NetworkSession: --> --> --> sendRequest() session[1] time[-1] result[0]
07-16 00:13:39.032 3151-3507/? D/NetworkSession: [-1][RTSP/1.0 200 OK
Date: Sat, 16 Jul 2016 07:13:39 +0000
User-Agent: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 2
Content-Type: text/parameters
Content-Length: 181

                                             wfd_video_formats: 28 00 01 01 ffffffff ffffffff ffffffff 00 0000 0000 00 none none
                                             wfd_audio_codecs: AAC 0000000F 00
                                             wfd_client_rtp_ports: RTP/AVP/UDP;unicast 19000 0 mode=play
                                             ]

07-16 00:13:39.262 3151-3507/? D/NetworkSession: --> --> --> sendRequest() session[1] time[-1] result[0]
07-16 00:13:39.262 3151-3507/? D/NetworkSession: [-1][RTSP/1.0 200 OK
Date: Sat, 16 Jul 2016 07:13:39 +0000
User-Agent: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 3

                                             ]

07-16 00:13:39.262 3151-3507/? D/NetworkSession: --> --> --> sendRequest() session[1] time[-1] result[0]
07-16 00:13:39.262 3151-3507/? D/NetworkSession: [206][SETUP rtsp://x.x.x.x:x/wfd1.0/streamid=0 RTSP/1.0
Date: Sat, 16 Jul 2016 07:13:39 +0000
User-Agent: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 2
Transport: RTP/AVP/UDP;unicast;client_port=8760-8761

                                             ]

07-16 00:13:39.262 3151-3507/? D/NetworkSession: --> --> --> sendRequest() session[1] time[-1] result[0]
07-16 00:13:39.262 3151-3507/? D/NetworkSession: [-1][RTSP/1.0 200 OK
Date: Sat, 16 Jul 2016 07:13:39 +0000
User-Agent: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 4

                                             ]

07-16 00:13:39.262 3151-3507/? E/WifiDisplaySink: Invalid server_port description '63683-63685'.
07-16 00:13:39.262 3151-3507/? A/WifiDisplaySink: frameworks/av/media/libstagefright/wifi-display/sink/WifiDisplaySink.cpp:652 CHECK_EQ( err,(status_t)OK) failed: -1007 vs. 0
07-16 00:13:39.262 3151-3507/? A/libc: Fatal signal 6 (SIGABRT) at 0x00000c4f (code=-6), thread 3507 (Thread-70)

thats it nothing else after it, mira4u P2PSinkActivity destoy, but if we connect it with any other android device it works like charm,
and i also added patch from fix, but still the same for only Windows device

from how-to-miracast-on-aosp.

kensuke avatar kensuke commented on June 27, 2024

https://github.com/kensuke/How-to-Miracast-on-AOSP/blob/master/frameworks/av/media/libstagefright/wifi-display/sink/WifiDisplaySink.cpp#L368

int rtpPort, rtcpPort;
if (sscanf(serverPortStr.c_str(), "%d-%d", &rtpPort, &rtcpPort) != 2
        || rtpPort <= 0 || rtpPort > 65535
        || rtcpPort <=0 || rtcpPort > 65535
        || rtcpPort != rtpPort + 1) {                             // failed this condition '63683-63685'
    ALOGE("Invalid server_port description '%s'.",
            serverPortStr.c_str());

    return ERROR_MALFORMED;
}

from how-to-miracast-on-aosp.

M9Apar avatar M9Apar commented on June 27, 2024

Hi we tested windows pc as well laptop with other Android app and it cast smoothly, but since we working on product we can't use it, and about above condition then ports well below range I dnt find issue with it

from how-to-miracast-on-aosp.

kensuke avatar kensuke commented on June 27, 2024

rtpPort = 63683;
rtcpPort = 63685;

if (rtcpPort != rtpPort + 1) return ERROR_MALFORMED;
else // go through next steps..

from how-to-miracast-on-aosp.

M9Apar avatar M9Apar commented on June 27, 2024

So thts cause libc to crash?

from how-to-miracast-on-aosp.

kensuke avatar kensuke commented on June 27, 2024

/frameworks/av/media/libstagefright/wifi-display/sink/WifiDisplaySink.cpp
libstagefright_wfd.so

from how-to-miracast-on-aosp.

M9Apar avatar M9Apar commented on June 27, 2024

So i think if I comment tht condition then it should work ?

from how-to-miracast-on-aosp.

M9Apar avatar M9Apar commented on June 27, 2024

confirmed that there is an issue if we comment or bypass that condition then also it crashed on same @ libc

from how-to-miracast-on-aosp.

xuwen0306 avatar xuwen0306 commented on June 27, 2024

There are 2 issues in your logcat:

Sink received SETUP request and response OK, but the request has invalid argument:
[206][SETUP rtsp://x.x.x.x:x/wfd1.0/streamid=0 RTSP/1.0
Date: Sat, 16 Jul 2016 07:13:39 +0000
User-Agent: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 2
Transport: RTP/AVP/UDP;unicast;client_port=8760-8761

issue1: in the first Line, the IP address should be valid (like 192.168.0.1 ), but not "x.x.x.x".
issue2: in Transport section, source side should send "server_port:xxxx-xxxx", xxxx means the port server using.

Maybe issue1 is not critical, but issue2 could caused the libc crash.

For more easier debug, you can use tcpdump to capture the TCP package from the port.

Basically usage: tcpdump -i p2p_interface_name -w path_to_store_the_file.pcap

You can use wireshark to open the pcap file.

from how-to-miracast-on-aosp.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.