Skip to content

miraclecast as source #4

@albfan

Description

@albfan

From #47 (comment)
Here is a Q&D (quick and dirty) for use laptop as source:

Start miracle-wifid as usual

$ sudo miracle-wifid --log-level trace

Start miracle-wifictl

$ sudo miracle-wifictl --log-level trace
[miraclectl] # list
  LINK INTERFACE                FRIENDLY-NAME                 
     3 wlp3s0                   archlinux-alberto             

  LINK PEER-ID                  FRIENDLY-NAME                  CONNECTED 

 0 peers and 1 links listed.
[miraclectl] # select 3
link 3 selected

Now do something to make your device visible (like start screen mirroring)

[ADD] Peer: f2:27:65:35:b6:8f@3
[PROV] Peer: ff:ff:ff:ff:ff:ff@3 Type: pbc PIN: 
[miraclectl] # list
  LINK INTERFACE                FRIENDLY-NAME                 
     3 wlp3s0                   archlinux-alberto             

  LINK PEER-ID                  FRIENDLY-NAME                  CONNECTED 
     3 ff:ff:ff:ff:ff:ff@3           Alberto Fanjul Alonso            no        

 1 peers and 1 links listed.
[miraclectl] # connect ff:ff:ff:ff:ff:ff@3
[CONNECT] Peer: ff:ff:ff:ff:ff:ff@3
[miraclectl] # list
  LINK INTERFACE                FRIENDLY-NAME                 
     3 wlp3s0                   archlinux-alberto             

  LINK PEER-ID                  FRIENDLY-NAME                  CONNECTED 
     3 ff:ff:ff:ff:ff:ff@3           Alberto Fanjul Alonso            yes        

 1 peers and 1 links listed.

Search on miracle-wifid output for a message like this

TRACE: wpa: raw message: <3>P2P-GROUP-STARTED p2p-wlp3s0-3 client ssid="DIRECT-ZP-Alberto Fanjul Alonso" freq=2462 psk=5d3ce6a19876398db2d9b7566cc1d8e3a87c36b449ff3fd601f95d60718cdd4e go_dev_addr=ff:ff:ff:ff5:ff:ff ip_addr=192.168.49.200 ip_mask=255.255.255.0 go_ip_addr=192.168.49.1

At this point you have your devices paired show they can see each other

Start a stream on laptop (using vlc for example)

$ cvlc screen:// :screen-fps=25 :screen-caching=100 --sout '#transcode{vcodec=MJPG,vb=0,width=1022,height=575,acodec=none}:http{mux=ogg,dst=:8554/myscreen}'

On the other device use some viewer to reproduce that:( I've used vlc for android)

that stream can be viewed opening url: http://192.168.49.200:8554/myscreen

Develops needed:

  1. autocomplete peer-id on miracle-wifictl
  2. miracle-sinkctl need a command to launch automatically that external command (miracle-sinkctl does the same with gstreamer)
  3. provide a gstreamer command to stream screen (See examples here https://coderwall.com/p/_inesq/gstreamer-commands-for-desktop-streaming-to-raspberry-pi)
  4. Develop an android app based on vlc for android to make device visible, pair with laptop and receive config from miracle-sinkctl about url to open

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions