06-17-2016 05:01 PM
Currently, there are no official examples related C codes for WiFi direct. You can find some information in the http://www.intel.com/content/dam/support/us/en/documents/edison/sb/edison_wifi_331438001.pdf WiFi User Guide and in https://communities.intel.com/docs/DOC-109932 https://communities.intel.com/docs/DOC-109932, for these methods you would need to program in Linux and not in C.
For C coding, you will need the required libraries. There are libraries like linux/wireless.h that could help you with it, look at https://w1.fi/wpa_supplicant/ for more information about wpa_supplicant and hostapd, there is an API from https://w1.fi/cgit/hostap/tree/ that could help you too, look at the developer's guide: https://w1.fi/wpa_supplicant/devel/
I also found this one: https://github.com/01org/wds in /p2p/ there is an example for C++ that may be useful, I haven't found examples for C yet. There are some examples in the Internet related to Android and P2P that may be useful for you too.
I hope this gives you an idea on how to start.
06-27-2016 10:22 AM
Do you have updates on this? We would like to know if you have found some examples that could help other makers in the future or if you have tried with the methods suggested above