Network Switch or Change

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
Network Switch or Change

Network Switch or Change 

WiFi EZConfig is a good demo reference for handling network switch. 

 

In WiFi EZConfig, the function prototype WFEasyConfigProcess() is called to execute a network change. 

MRF24W is put into Hibernate mode, which implies a reset operation, whereby the LDO is turned off. 

Old connection profile is deleted and new connection profile is created. New parameters, linked to selected network, are configured into new profile. Then exit out of Hibernate mode. 

 

The recommend sequences are

  1. Disconnect from current network by invoking WF_CMDisconnect()
  2. Delete the profile by invoking WF_CPDelete()
  3. Create new profile by invoking WF_CPCreate()
  4. Set up parameters for this new profile such as setting SSID, Wi-Fi security, network type.
  5. Enter Hibernate mode by setting WF_hibernate.state = WF_HB_ENTER_SLEEP and WF_hibernate.wakeup_notice = FALSE
  6. Have a short time delay such as DelayMs(50)
  7. Exit from Hibernate mode by setting WF_hibernate.wakeup_notice = TRUE
Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.