androidwifi-directwifip2p

No private ioctls


So I'm trying to connect a raspberry pi zero to an android phone using wifi direct. I found this repo https://github.com/ninjablocks/rtl8192cu and I am using the P2P_UI to try and make sure it works before I work on writing a program to do it.

I initially tried on my laptop running linux with the TP-Link tl-wn725n usb adapter and when I tried to enable wifi direct I got the error "wlan0: no private ioctls" over and over again until I did a keyboard interrupt. Even though I've seen it done before with the same adapter (https://www.youtube.com/watch?v=6GPv8TfZqe4&list=WL&index=177&t=145s), I assumed that it was a hardware problem because the tl-wn725n isnt actually a rtl8192cu, which the repo is made for, and I ordered an Edimax EW-7811Un adapter.

I then tried with the new adapter on the raspberry pi zero and I'm getting the exact same error. I didn't do anything in terms of setting up the adapter or downloading a driver, but it seemed to work fine automatically and lsmod shows that a driver is there. There may be some configuration issue, but I'm not knowledgeable enough to know where to look and I can't find anyone that has a similar issue or any resource that seems to pertain to my problem. I posted an issue on the github repo but it's an old repo and I don't expect them to respond

Can anyone give me an idea of what might be causing my issue and help point me in the right direction to look for a solution? Is this a hardware issue, a driver issue, an os issue (incompatible kernel version or something like that) or an issue with the repo? Any other resources concerning wifi p2p are appreciated as well. Thanks!


Solution

  • So I ended up using a Pi Zero W with a wifi card that supports p2p built in. It made the whole process much simpler. The issue was just that my drivers weren't installed or setup correctly and also the driver for a lot of the rtl series cards are just not the best. You probably can set it up using one of these cards, but it makes more sense to just use the Pi Zero W, it's cheaper and just a better solution.

    Here is a github repo I made with a shell script that sets up all of the interfaces for p2p starting from a fresh out of the box Pi Zero W and the 2020 raspbian os: https://github.com/MrStashley/Android-RasPi-WifiP2P-Communication. It also has resources on everything that the script does and what it all means