Join the Module’s Wi-Fi

Now we need our computer to join our module's network:

Activity Board WX

  • Set PWR switch to 1.
  • Set the module's mode to AP (access point):
    • If you have an Activity Board WX, press/release its RST button rapidly 4 times (within two seconds).
    • If you have a non-WX Activity Board, run the program below. It also works on an Activity Board WX wired in USB_PGM_TERM mode as shown in Connect WX Wi-Fi Module to Your Propeller
#include "simpletools.h"
#include "wifi.h"

int main()
{
  wifi_start(9, 8, 115200, USB_PGM_TERM);

  print("Leave a Network\r");
 
  // Leaves network where it was a station and sets
  // the Wi-Fi module's mode to AP.

  wifi_leave(AP);

  // Verify mode after leaving the network.

  int mode = wifi_mode(CHECK);

  switch(mode)
  {
    case STA:    //0xf4:
      print("mode=STA\r");
      break;
    case AP:     //0xf3  
      print("mode=AP\r");
      break;
    case STA_AP: //0xf2
      print("mode=STA+AP");
      break;
  }     
}
  • With your computer, find and join the module’s network. It will begin with either ESP_ or WX_ followed by a unique six-digit number.