Two Network Interfaces
WiFi-enabled EZBs may be put into one of two available modes (AP or Client). Some cloud-based robot skills require an internet connection, such as PandoraBot, Microsoft Cognitive Emotion, Microsoft Cognitive Vision, or Bing Speech Recognition. While it is possible to connect a WiFi EZB to a local network in Client Mode, some users may prefer to simply add a second Wi-Fi network adapter to their PC. Adding a second WiFi adapter is the easiest solution to maintain an internet connection and the robot at the same time.
Alternatively, some users may use an Ethernet cable plugged into their PC for internet access while using a WiFi connection to the EZB. While this tutorial covers how to connect with dual WiFi antennas, Ethernet users may find the "Possible Network Conflict" section useful for diagnosing connection problems.
Adding a second WiFi adapter to the PC is great for people who travel with their EZB. Using a dedicated Wi-Fi adapter to connect to the EZB makes direct connecting much easier than mucking about with client network passwords, etc.
What Kind Of WiFi Adapter?
The easiest secondary WiFi adapter connects via USB. They are simple USB dongles that, once connected, provide a second Wi-Fi network interface for your computer. This means you can connect to two WiFi networks at the same time... One to the internet via your router, and the second directly to the EZB. USB WiFi adapters can cost as low as new $1 from eBay, or slightly more if purchasing at your local computer store (staples, best buy, etc.). Here is an eBay search of new 802.11n USB WiFi adapters sorted by lowest price: Search eBay.
How Does It Work?
This is the easiest part - simply connect the WiFi adapter to your PC. Once the drivers are automatically installed by Windows Update, your computer will now have two wireless devices when the Wi-Fi icon is selected from the system tray. The first WiFi device in the list will be the local WiFi adapter within the computer. The second WiFi device in the list will be the newly inserted USB device. I recommend using the second WiFi device for connecting to the EZB.
Possible Network Conflict
The EZB uses the default network of 192.168.1.0. There may be a slight chance that your home network and the EZB are both configured for the same TCP/IP Network. Without getting into too much technical detail about TCP/IP Networking, there cannot be the same network across two or more adapters. Imagine if there were two streets in your city with the same name and house number as yours. There would be no way for the mail service to know which physical house to deliver the mail. This means one of the two houses will get all of the mail. The same scenario applies when two WiFi devices have the same network.
You will know if a network conflict is occurring because the EZ-Builder will not connect to the EZB even when the WiFi is connected -or- The computer will not reach the internet while connected to the EZB even though both WiFi devices are connected correctly. Also, you can view the IP Addresses of all network devices by typing the following in the CMD.EXE console window.
- Press WIN + R
- Type: cmd.exe and press enter
- In the console window, type: ipconfig and press enter
In the image above, the addresses of two network devices are shown with ipconfig. The red circle is showing the network part of the address and marked with A. These numbers must be different between network devices, they cannot be the same. In the image marked with an A, there is no network conflict, as the network part of the address is different. However, the image marked with B has a network conflict.
Change EZB IP Address
Depending on the type of Wi-Fi-enabled EZB, the method of changing the default IP address varies. It is most likely easier to change the IP address on your local router for the network to 192.168.0.1. However, if you wish to change the IP Address of the EZB, that can be done as well.
*NOTE: If you change the default IP Address of the EZ-B, you will also have to enter the new address in ARC when connecting -or- use the SCAN tool in both the Camera and Connection controls to discover the new IP Address of the robot.
In the top of the ESP32 or ESP32Cam EZB sourcecode are the default values. Edit the sourcecode and change the default network. Re-upload the sourcefile to the ESP and the new IP Network will be used.
Raspberry Pi has a network configuration interface by launching sudo raspi-config from a command shell. Select the network settings and enter a new IP Address.
EZ-Robot EZB v4 or IoTiny
You may change the IP Address in the EZ-B v4 Web Configuration Interface on the EZ-B v4.x/2 or IoTiny. If you have an IP/Network Conflict, then you will have to disconnect from the internet to remove the network conflict, and re-connect to the EZ-B v4 in order to view its web server configuration. Once you have disconnected from the internet and reconnected to the EZBs Wi-Fi, visit the default address of http://192.168.1.1 in a web browser, select Wi-Fi AP Mode, locate the IP Address, change it to 192.168.10.1, and press SAVE.