How To Perform WisGateOS Recovery Procedure for MacOS

Requirements

  • Apple PC or MacBook with MacOS
  • One free USB type A port and a LAN port
  • USB type A to USB type C cable
  • Ethernet cable
  • Latest firmware

Connecting the Gateway

Make sure the gateway is off.

Connect the USB-C end of the cable to the gateway and the Type-A end to the PC/laptop

Connect the Ethernet cable between the Gateway and the PC/laptop.

Do not power the gateway, leave it off.

Serial Communication Configuration

To be able to interact with the serial console of the gateway you need to open the serial terminal. In this guide, we will use the “screen”.

Open an OS X terminal session by pressing Cmd+Space, type terminal and start it.

List the connected devices ls /dev/cu.*

KHM-035-01.png

If there are no other USB serial devices connected the one starting with cu.usbserial* will be the gateway.

To establish a connection, type in screen /dev/cu.usbserial-XXXXX 57600 (Change the XXXXX with your specific USB serial port number.)

KHM-035-02.png

The terminal will clear.

KHM-035-03.png

Power on the gateway.

If everything is configured correctly, you will see the booting of the gateway with some additional options.

KHM-035-04.png

LAN Card Configuration

To be able to send the firmware to the gateway, you need to set the LAN card to a static address.

Go to the Network Preferences of your MAC OS and select the LAN card settings. In this example, it is a USB LAN card.

KHM-035-05.png

Change the Configure IPv4 option to Manually.

KHM-035-06.png

Change the IP Address to 192.168.1.10 and the Subnet Mask to 255.255.255.0.

KHM-035-07.png

Apply the changes by pressing the Apply button.

Downloading the Firmware

Based on the used model, download the latest available firmware:

After downloading, unzip it and rename the WisGateOS_X.Y.Z.bin file to recovery.bin.

Set Up the TFTP

You can use the built-in TFTP server in the MAC OS X. Usually, the server uses the /private/tftpboot folder. Have in mind that by default, the folder is hidden in the finder. To access it, open the finder. Use Cmd+Shift+G and enter /private/ftpboot.

KHM-035-08.png

Copy the recovery.bin file from earlier into the tftpboot folder.

KHM-035-09.png

Open another terminal and run the following commands:

To start the TFTP server:

sudo launchctl load –F /System/Library/LaunchDaemons/tftp.plist
sudo launchctl start com.apple.tftpd

To set the permissions to the tftpboot folder and the files inside:

sudo chmod 777 /private/tftpboot
sudo chmod 777 /private/tftpboot/*

KHM-035-010.png

Flashing the Gateway

Go back to the terminal you used to configure the communication.

Restart the gateway with the reset button.

KHM-035-011.png

A dialog will appear in the terminal, press 2 on the keyboard to select the Load system code then write to Flash via TFTP option.

For the next dialog enter the answers below:

  • Are you sure? (Y/N) – press Y;
  • Input device IP - type 192.168.1.1, then press Enter;
  • Input server IP - type 192.168.1.10, then press Enter;
  • Input Linux Kernel filename - type recovery.bin, then press Enter.

KHM-035-012.png

KHM-035-013.png

If everything is ok you should see the firmware transfer and flash. It takes some time to download, flash, and boot. Do not power off or disconnect anything.

When the console output prints Boot done, you are good to go. You should be able to see the Wi-Fi AP and connect to your gateway as usual.

KHM-035-014.png

Stopping the TFTP

To stop the TFTP server, type in the terminal:

sudo launchctl unload -F /System/Library/LaunchDaemons/tftp.plist

Updated