WiFi Direct/p2p support in ModusToolbox

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
zsilet
Level 1
Level 1
10 sign-ins First solution authored 5 sign-ins

Hello,

I am exploring using the CYW43907 in a product that would require WiFi Direct operation. I am currently using the CYW943907 devkit with ModusToolbox, since the WICED Studio SDK indicates "Not recommended for new designs." 

I understand that WiFi direct/p2p mode was supported on WICED, but I cannot find the corresponding API in the ModusToolbox for WiFi API reference (I've been looking at the APIs listed in https://github.com/Infineon/modustoolbox-software).

Can anyone tell me if either a) what are the appropriate APIs to use or b) WiFi direct mode is no longer supported?

Thank you
Andor


0 Likes
3 Replies
jsk2
Level 1
Level 1
First like received First solution authored First reply posted

WiFi Direct (P2P) is supported on the CYW943907 in ModusToolbox, but the API has been updated from the WICED SDK. The APIs you should use are in the "wiced_wifidirect.h" header file, and the function names start with "wifidirect_".

Here is an example of how to initialize WiFi Direct:

arduino
Copy code
wiced_wifidirect_config_t config;
memset(&config, 0, sizeof(config));
config.group_owner_intent = 0;
strcpy(config.group_owner_intent_name, "MyDevice");
wifidirect_init(&config);
After initializing WiFi Direct, you can start a scan for other WiFi Direct devices using the "wifidirect_scan" function:

scss
Copy code
wiced_wifidirect_device_list_t device_list;
wifidirect_scan(&device_list);
You can then connect to a device using the "wifidirect_connect" function:

scss
Copy code
wiced_wifidirect_device_t device;
strcpy(device.device_address, "00:11:22:33:44:55");
wifidirect_connect(&device);
Note that the WiFi Direct API in ModusToolbox may differ from the WICED SDK, so you may need to refer to the ModusToolbox documentation or sample code for further guidance.

0 Likes
attilaz
Level 1
Level 1
First reply posted Welcome!

I have a similar problem.  Can I use WICED on a CY8CPROTO-062S2-43439 or where to find this wifidirect_XXX apis in ModusToolbox? I have installed every example for this board but I haven't found it.

0 Likes
zsilet
Level 1
Level 1
10 sign-ins First solution authored 5 sign-ins

Thanks for your quick response, any chance you can point me to the repo that contains the wiced_wifidirect API you mention, or the ModusToolbox documentation or sample code locations you are referring to?

I have tried a variety of searches (google, github codesearch), but I cannot locate the wiced_wifidirect.h or any of the quoted functions. I am on the other hand able to find other APIs used by my project using the same searches, so I think my search method is valid.

0 Likes