dviljoen
dviljoen

Reputation: 1632

How to USE Wi-Fi Direct/P2P for file transfers

I'm exploring Wi-Fi Direct/P2P for a project. We need to be able to transfer files from one device to another in an ad-hoc wifi environment. This is on Ubuntu Linux. I've been able to configure a couple devices to connect to each other. Now what?

I can't find much on the "now what" part of this. Do I have to write a custom protocol (like bonjour or upnp) to transfer my data? It seems I'm missing most of the IP stack that I would be relying on (everything above physical link layer, it seems). Is there a protocol/API I can use to do this? Help!

Upvotes: 1

Views: 3030

Answers (1)

bitmonki
bitmonki

Reputation: 46

Wifi direct establishes a network. Now you can use that network to connect same as you would on any LAN or the Internet.

Personally, I would probably setup OpenSSH servers on each machine, then use sftp or scp to move files around.

But you could use a small web server like lighttpd with directory listings as well.

Wifi Direct 'group owners' are supposed to provide name servers, so you can try pinging hosts by name (so far this has worked well for me) and if that doesn't work, you will need to do something like run ifconfig on each machine to get the addresses assigned.

Also, if you are running Samba, this has worked for me 'out of the box', no extra configuration required. I haven't tried yet, but then you could probably use a file manager like GNOME's Nautilus to browse the workgroup.

HTH!

P.S. If you have an android phone, the Fing app (free) has been extremely useful for determining the 'shape' of the wifi direct networks I've setup.

Upvotes: 3

Related Questions