AWS FreeRTOS Curiosity PIC32MZEF Board Wifi and Ethernet

leandropg wrote on June 12, 2019:


I am developing an C application in a Microchip PIC32 using the Curiosity PIC32MZEF Board with AWS FreeRTOS. I connected in the mikro BUS Socket 2 the MikroElectronika WiFi 7 click Board for WiFi connection and the PIC32 LAN8720 PHY daughter board for Ethernet connection.

WiFi Module

Ethernet Module

When I compiled the default AWS FreeRTOS with the Microchip Curiosity PIC32MZ EF, the Internet connection is handle by the WiFi Module and it works fine. After, I need test the Ethernet Module, so I found in the AWS forums that is necessary added the level macro PIC32_USE_ETHERNET in the project properties and the Ethernet works fine.

Now, my application need use both the Wifi OR Ethernet connection, selecting the network interface by code, but I don’t find how make it.

I need first to detect if exists Internet connection in the Ethernet interface. If doesn’t has internet I need selected the Wifi interface. If the Wifi interface doesn’t has internet come back the Ethernet connection and so.

Thanks for your help.

Edited by: leandropg on Jun 12, 2019 1:44 PM

Gaurav-Aggarwal-AWS wrote on June 12, 2019:

Thank you for your query. We, currently, do not have support for dynamically switching between Ethernet and WiFi interface and you will need to write it. You can however refer to the Network Manager in our release-1.5 branch here:

The network manager provides example to switch between BLE and WiFi networks for provisioning WiFi credentials. You can write something similar to switch between Ethernet and WiFi.

Please let us know if you need any other help.


Gaurav-Aggarwal-AWS wrote on June 14, 2019:

You can find the documentation about FreeRTOS+TCP here:

As I mentioned in my previous response also, you can take a look at the Network Manager code too.


leandropg wrote on June 27, 2019:

Thank you