Wifi Direct Enabled


31 posts   Page 1 of 2   1, 2
by bass0324 » Tue Jan 29, 2013 2:49 pm
For anyone else who is wishing to use WiFi-Direct with the Raspberry Pi to connect with Android devices, I have finally achieved this. At first I tried to use any WiFi USB Dongle and recompile wpa_supplicant with p2p enabled but this didn't work. Then I found this guide: http://dishingtech.blogspot.com/2012/01 ... guide.html This guide showed how to enable p2p with the RTL8192 chipset for Realtek.
So went to Amazon and ordered this dongle: http://www.amazon.com/gp/product/B004HY ... 00_s00_i00
Following the guide, p2p worked correctly first try, and no need to recompile a new wpa_supplicant with p2p enabled. Hopefully others find this helpful since I would have if seen this 3 months ago.
Posts: 19
Joined: Fri Aug 31, 2012 2:32 pm
by CaffeinatedAndroid » Thu Jan 31, 2013 5:28 pm
That's fantastic, just what I needed!

Will give this a go and hopefully see if it works.
Posts: 1
Joined: Thu Jan 31, 2013 5:25 pm
by oritpro » Sun Mar 17, 2013 6:55 pm
I recently spent some {quality} time trying to get P2P working on an Edimax EW-7811Un, it also uses the rtl8192cu chip.

Using kernel drivers under 3.6.11+ and with P2P enabled via iwpriv wlanXX p2p_set enable=1, the Pi can see a WiFi Direct enabled Android device and vice versa, but they cannot connect. I tried two Android devices, an SGS2 and a Nexus7 which do connect to each other fine via P2P.

A little research turned up a developer thread dated March 7th 2013 that included Larry Finger, one of the RTL driver developers. It turns out that P2P "is not yet implemented in rtl8192cu" according to Larry.

Here's a link to that thread: http://www.spinics.net/lists/linux-wire ... 04531.html

It would appear that we might have to wait until kernel v3.10 or later for full P2P support on RTL. However, in the interim, if somebody has found (or finds) a way to get P2P working on Raspberry Pi please post a how-to.
Posts: 2
Joined: Fri Aug 03, 2012 10:31 pm
by sk8ergeek » Sat May 25, 2013 2:04 pm
I've used RTL8192 chipset, TP-Link WN725N and Rapsberry Pi can ping android phone after connected both of them.

This is for the result here

[modded by mod to remove the spammy urlshortener]
Last edited by sk8ergeek on Fri May 30, 2014 9:06 am, edited 2 times in total.
Posts: 1
Joined: Sat May 25, 2013 1:49 pm
by annamol.alex » Thu Feb 06, 2014 5:43 am
Hi,

I have a rasp model b running raspbian and kernel 3.9.11, edimax ew7811un , a samsung galaxy s3 and a legacy 802.11 device . I need to establish a wifi direct connection with these. The phone can be made the group owner and legacy devices detects the same but fails to connect .

I need to know whether the rasp can be made the group owner in the wifi direct group formation .. it fails at the provision discovery stage with the realtek user interface. I don't know how to debug the same...

Regards
annamol
Posts: 1
Joined: Thu Feb 06, 2014 5:34 am
by edwin6938 » Tue Apr 29, 2014 4:36 pm
Hi,

I read everything, but i'm completly lost... I have a TP-LINK Dongle for Wifi (with a CD installation for drivers)...And i have no idea how to do my wifi works....

I plugged the dongle and then my computer is connected in SSH to my RPi (using Raspbian).

At this point i don't know what to do. Can you, please, help me?
Posts: 52
Joined: Tue Apr 01, 2014 4:44 pm
by BMS Doug » Wed Apr 30, 2014 10:56 am
edwin6938 wrote:Hi,

I read everything, but i'm completly lost... I have a TP-LINK Dongle for Wifi (with a CD installation for drivers)...And i have no idea how to do my wifi works....

I plugged the dongle and then my computer is connected in SSH to my RPi (using Raspbian).

At this point i don't know what to do. Can you, please, help me?


I got my WIFI dongle last night, setting it up was very easy but I did use a HDTV as a monitor (as it seemed the easiest way when I read this guide).

I just started the GUI (startx) and used the wifi setup. there is a description (in the guide I linked) telling you how to edit the script but if you can access the GUI it is very easy.

Edit: oops, probably not relevant if you want wifi direct , sorry.
Doug.
Building Management Systems Engineer.
Posts: 3774
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK
by edwin6938 » Wed Apr 30, 2014 5:39 pm
Actually, i have :
- Wifi Dongle : TP-Link TL-WN725N version 2
- Linux raspberrypi 3.10.25+

I tried every tutorial and nothing works. I saw that i need to upload the driver rtl8188eu. So i did it here:
Code: Select all
https://dl.dropboxusercontent.com/u/80256631/8188eu-201xyyzz.tar.gz


Then i did :
Code: Select all
tar xvf rtl8188eu-20131223.tar.gz

Code: Select all
sudo depmod -a

Code: Select all
sudo modprobe 8188eu


And then i have an error : "ERROR: could not insert '8188eu': Exec format error...

Please help!!! I tried a lot of tutorial to find good drivers!
Posts: 52
Joined: Tue Apr 01, 2014 4:44 pm
by MrEngman » Wed Apr 30, 2014 8:00 pm
edwin6938 wrote:Actually, i have :
- Wifi Dongle : TP-Link TL-WN725N version 2
- Linux raspberrypi 3.10.25+

I tried every tutorial and nothing works. I saw that i need to upload the driver rtl8188eu. So i did it here:
Code: Select all
https://dl.dropboxusercontent.com/u/80256631/8188eu-201xyyzz.tar.gz


Then i did :
Code: Select all
tar xvf rtl8188eu-20131223.tar.gz

Code: Select all
sudo depmod -a

Code: Select all
sudo modprobe 8188eu


And then i have an error : "ERROR: could not insert '8188eu': Exec format error...

Please help!!! I tried a lot of tutorial to find good drivers!

What does command uname -a report?


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.
Posts: 3471
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK
by edwin6938 » Fri May 02, 2014 11:26 am
Hi,

I succeed in installing, but i still don't have wifi... When i do :
- ifconfig : I have wlan0 (I didn't before)
- iwlist scanning, i have all the good networks

But i can't connect WIFI... When i do ifconfig, i have :
wlan0 Link encap:Ethernet ....

Is it normal to have "Ethernet"? Maybe i wrote wrong in /etc/network/interfaces?

I have :
auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0

iface wlan0 inet dhcp
wpa-ssid "SSID"
wpa-psk "PSK"
Posts: 52
Joined: Tue Apr 01, 2014 4:44 pm
by MadMel » Tue Jul 01, 2014 8:19 am
Hey guys

I have just started with using the raspberry Pi for a project for uni and need some help. I am designing a remote controlled robot using the RPi and the arduino (like the ones on youtube) and i have got it to work but the problem is that i need to setup WIFi direct so i can use it outdoors. I am using the TP-Link TL-WN721N wireless USB that already as a built-in driver in raspbian. Can someone please give me instruction for a noob to follow as i am really stuck on this and it is the last thing i need to complete my project.

Cheers
Posts: 3
Joined: Thu May 29, 2014 4:00 pm
by bass0324 » Wed Jul 30, 2014 2:39 am
All,

Sorry for not getting back to you as quickly as I would have liked. Here are the commands I used in order to test on a brand new raspbian build:

sudo apt-get update && sudo apt-get upgrade && sudo apt-get install firmware-realtek
mkdir ~/Wifi_Direct
cd ~/Wifi_Direct
git clone https://github.com/bass0324/rtl8192cu.git
cd rtl8192cu/WiFi_Direct_User_Interface/
chmod 777 ./install.sh
./install.sh
sudo ./P2P_UI wlan0

This then brings up a GUI in which these commands were run in order to connect to another device:

e
1
a
m
- Select the mac address of the device you wish to connect to (should be named same as android device)
p
1

On the wifi direct device (android in my case) type in the password

12345670

Once this is complete, you should now have a completed Wifi Direct interface between your Android device and the Raspberry Pi. In order to implement this in other ways, there is C code in the same folder the ./P2P_UI code is run which contains all of the commands used by the GUI in order to create the connection. These commands can be manipulated in other code in order to do what you need them to do. Let me know if there is any other questions you guys may have.

Regards,

John
Posts: 19
Joined: Fri Aug 31, 2012 2:32 pm
by bantammenace2012 » Thu Dec 11, 2014 5:48 pm
I've just got hold of the Broadcom Wifi Adapter. It's advertised as supporting Infrastructure mode, Wi-Fi Direct and soft-AP mode.
Does anyone know how to configure it on my RPi to work in Wi-Fi Direct mode ?
I want to use it to stream video to my Nexus 5 initially but ultimately to an RPi attached to a HDMIPi display.
I want to do this to avoid the hassle of setting up IP addresses etc.
Posts: 121
Joined: Mon May 28, 2012 12:18 pm
by bass0324 » Fri Jan 09, 2015 1:24 pm
bantammenace2012 wrote:I've just got hold of the Broadcom Wifi Adapter. It's advertised as supporting Infrastructure mode, Wi-Fi Direct and soft-AP mode.
Does anyone know how to configure it on my RPi to work in Wi-Fi Direct mode ?
I want to use it to stream video to my Nexus 5 initially but ultimately to an RPi attached to a HDMIPi display.
I want to do this to avoid the hassle of setting up IP addresses etc.


I only know that the rtl8192cu chipset worked easily without creating any new drivers. You can test your adapter if any of the iwpriv commands work, those were the p2p commands needed in the code to make Wifi direct work. If it doesn't work with that command, I don't think I'll be able to help you with that adapter.

Regards,

John
Posts: 19
Joined: Fri Aug 31, 2012 2:32 pm
by kylehsu » Wed Feb 04, 2015 2:40 am
hi
i try to connect raspberry pi with another one.
but why GO's screen stop at the command "start hostapd"
Posts: 6
Joined: Tue Jan 27, 2015 6:44 am
by keerthipkumar » Wed Feb 04, 2015 9:46 am
hi
i am starting to use raspberry pi. I need to control it using my smart phone.i am using Edimax 150 mbps dongle.i need to install wifi direct in my pi.please tell me how to install it.should i need any other driver or software to install.Also what is 'dev'.please do reply.
Posts: 1
Joined: Wed Feb 04, 2015 9:21 am
by dcdan » Sat Mar 14, 2015 3:54 pm
edwin6938 wrote:Hi,

I succeed in installing, but i still don't have wifi... When i do :
- ifconfig : I have wlan0 (I didn't before)
- iwlist scanning, i have all the good networks

But i can't connect WIFI... When i do ifconfig, i have :
wlan0 Link encap:Ethernet ....

Is it normal to have "Ethernet"? Maybe i wrote wrong in /etc/network/interfaces?

I have :
auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0

iface wlan0 inet dhcp
wpa-ssid "SSID"
wpa-psk "PSK"


Did you succeed? I'm starting just like you did. Would you recommend the driver source you used? That is my first step i guess?
Posts: 3
Joined: Wed Feb 25, 2015 11:55 pm
by Naveen Kumar S » Mon Apr 06, 2015 7:09 am
I tried to enable the p2p using the following code but it didnt work can anyone give a solution how to enable wifi direct on the raspbian.
Code: Select all
pi@raspberrypi ~ $ iwpriv wlan0 p2p_set enable=1
wlan0     no private ioctls.
Posts: 41
Joined: Thu Feb 26, 2015 11:44 am
by bendavis » Mon Jul 13, 2015 8:39 pm
I bought the wifi adapter you suggested, but the driver loaded (r8712u) does not seem to support p2p. What driver are you using for this?
Posts: 8
Joined: Tue Jun 25, 2013 7:29 pm
by krb » Sun Oct 04, 2015 5:53 am
Hello John,

Thanks for your instructions. I followed them and got the WiFi_Direct_User_Interface installed. At the end of the build it prompted "WiFi_Direct_User_Interface install complete!!!!!!!". I run ./P2P_UI wlan0 and the UI shows up. But when I enter the command e, 1. It gives me an error:
Invalid command : p2p_get
Invalid command : p2p_get
Invalid command : p2p_get
Invalid command : p2p_get
Invalid command : p2p_get

I am not sure what I am missing?

Your help would be greatly appreciated.

Thanks,
KRB
Posts: 2
Joined: Sun Oct 04, 2015 5:33 am
by bass0324 » Mon Oct 12, 2015 6:27 pm
krb wrote:Hello John,

Thanks for your instructions. I followed them and got the WiFi_Direct_User_Interface installed. At the end of the build it prompted "WiFi_Direct_User_Interface install complete!!!!!!!". I run ./P2P_UI wlan0 and the UI shows up. But when I enter the command e, 1. It gives me an error:
Invalid command : p2p_get
Invalid command : p2p_get
Invalid command : p2p_get
Invalid command : p2p_get
Invalid command : p2p_get

I am not sure what I am missing?

Your help would be greatly appreciated.

Thanks,
KRB


What is the usb dongle you are using?

John
Posts: 19
Joined: Fri Aug 31, 2012 2:32 pm
by bass0324 » Mon Oct 12, 2015 6:30 pm
bendavis wrote:I bought the wifi adapter you suggested, but the driver loaded (r8712u) does not seem to support p2p. What driver are you using for this?


I used the standard Linux firmware for the Realtek devices, as seen by my install of it.

sudo apt-get install firmware-realtek

John
Posts: 19
Joined: Fri Aug 31, 2012 2:32 pm
by bass0324 » Mon Oct 12, 2015 8:12 pm
Naveen Kumar S wrote:I tried to enable the p2p using the following code but it didnt work can anyone give a solution how to enable wifi direct on the raspbian.
Code: Select all
pi@raspberrypi ~ $ iwpriv wlan0 p2p_set enable=1
wlan0     no private ioctls.


Sorry for the late post. No private ioctls typically means that the devices doesn't support the iwpriv commands. Had the same issue with a dongle that didn't have the Realtek device Ispecified. I didn't try many other devices since I didn't want to spend a lot, but I know this once works.
Posts: 19
Joined: Fri Aug 31, 2012 2:32 pm
by krb » Tue Oct 13, 2015 2:53 am
Hello,

I used the dongle that was suggested in this post: http://www.amazon.com/gp/product/B004HY ... 00_s00_i00

GMYLE Wireless N/G 802.11n/g USB WiFi WLAN Network Adapter (Realtek RTL8191SU) with high Gain 5dBi Antenna Up to 300Mbps

I also installed the standard realtek firmware.

Thanks for your help,
krb
Posts: 2
Joined: Sun Oct 04, 2015 5:33 am
by JangYoungwoo » Sun Nov 29, 2015 12:22 pm
Hi I'm Jang in South Korea
I did connect android to rpi with wifi direct but I can't do it..
I did search device rpi on android, but android was can't search rpi device
what happen this problem?
help me please

I've used RTL8188eu driver, RTL8192cu chipset, TP-Link WN725N and Rapsberry Pi
Posts: 1
Joined: Sun Nov 29, 2015 12:08 pm