Setting Up the Network Port for Ubuntu - QuanergySystems/quanergy_client GitHub Wiki
Setting Up the Network Port for Ubuntu
Depending on whether your computing environment is a Mac or a PC, you will select the appropriate network port setup instructions. You may run the LiDAR sensor on either platform through one of the following virtual machines (VMs):
-
VMware Fusion (Mac) or VMware Workstation (PC) : well-tested, well-functioning, and well-supported applications.
-
Oracle VirtualBox (Mac or PC) : free application has not been rigorously tested with the LIDAR sensor, but we include basic instructions as a courtesy to users who are curious about it.
Both methods are provided here, but Quanergy highly recommends using VMware Fusion if a virtual machine is necessary.
There are many factors involved in enabling the sensor’s Ethernet connection on a MacBook or a PC using a VM, so the procedures in this section are a general guide, where you can implement your own preferred workarounds. Contact your support representative if you need additional help.
For MacBook Port Via VMware Fusion
This section is for users who are setting up a network port in an Ubuntu virtual environment on a MacBook, using the recommended VMware Fusion application.
-
Start the 64-bit Ubuntu virtual machine, which you previously defined through VMware Fusion.
-
The VMware Fusion window looks different depending on whether a single VM or multiple VMs are defined:
-
If a single VM is defined (such as SDK Only in the Figure 3 example), click the Settings button to set up a network adapter.
-
If multiple VMs are defined (Figure 4), the left side of the Virtual Machine Library window lists them. For the VM you prefer to use, control-click its name (such as Security Demo in this example), and from the drop-down menu that appears, select the Settings item.
Figure 3. Mac VMware Fusion with Single VM Defined
Figure 4. Mac VMware Fusion with Multiple VMs Defined
- In the ...Settings dialog box that appears, click the Add Device button (Figure 5).
Figure 5. Mac VMware Fusion ...Settings Dialog Box
- In the ...Add Device dialog box that appears, select the Network Adapter icon, then click the Add button (Figure 6).
Figure 6. Mac VMware Fusion ...Add Device Dialog Box
- In the Network Adapter # dialog box that appears (Figure 7, where # indicates how many network adapters have been added previously):
- Select the Thunderbolt Ethernet item.
- Click the System Preferences button.
Figure 7. Mac VMware Fusion Network Adapter # Dialog Box
- In the System Preferences > Network dialog box (Figure 8), select the Thunderbolt Ethernet item to highlight it in the left column, then fill out the related fields, as follows:
-
Set the Configure IPv4 field to Using DHCP with manual address. This option allows the computer’s WiFi to still connect while in VM mode.
-
Specify the IP Address field of the MacBook, where the network address is 10.0.0, and the host address is any number from 2-254 that does not conflict.
-
Specify the Subnet Mask to be 255.255.255.0.
-
Specify the Router on the Thunderbolt Ethernet port to be 10.0.0.1.
-
To distinguish this Thunderbolt Ethernet port from others, you can rename it and make other changes through the Settings menu.
-
Click the Apply button in the lower right corner. After a few seconds, the red button next to the Thunderbolt Ethernet item turns green if the sensor is plugged in and powered on.
Figure 8. Mac Host Computer System Preferences > Network Dialog Box
-
Click the close button to dismiss the Network dialog box.
-
Continue with the “Setting Up the DHCP Server” section on page 24.
For MacBook Port Via Oracle VirtualBox
This section is for users who are setting up a network port in an Ubuntu virtual environment on a MacBook, using the Oracle VirtualBox application.
NOTE: The use of Oracle VirtualBox is not recommended. However, we provide it here as a courtesy.
-
Start the 64-bit Ubuntu virtual machine, which you previously defined through Oracle VirtualBox .
-
In the VirtualBox Manager window, select the name of one of the VMs that is listed in the right column (such as Ubuntu in the Figure 9 example).
-
From the drop-down menu that appears, select the Settings item.
Figure 9. Mac VirtualBox Manager Window
- In the ubuntu – General dialog box that appears, select the Network tab (Figure 10).
Figure 10. Mac VirtualBox ubuntu – General Dialog Box
- In the ubuntu – Network dialog box (Figure 11):
-
Of the four pre-defined adapters, select whichever is associated with the port your sensor is connected to, which is Adapter 2 in this figure.
-
Check the Enable Network Adapter checkbox.
-
From the Attached to drop-down menu, select the Bridged Adapter item.
-
From the Name drop-down menu, select en1: Thunderbolt 1.
-
Click the OK button to apply the changes and close the ubuntu – Network dialog box.
Figure 11. Mac VirtualBox ubuntu – Network Dialog Box
- Open the System Preferences > Network dialog box (Figure 12) as follows:
-
From the top-left corner of the MacBook screen, select the Apple icon.
-
From the drop-down menu, select the System Preferences item.
-
In the System Preferences dialog box that appears, select the Network tab.
Figure 12. Mac Host Computer System Preferences Window
- In the System Preferences > Network dialog box (Figure 8), select the Thunderbolt Ethernet item to highlight it in the left column, then fill out the related fields, as follows:
-
Set the Configure IPv4 field to Using DHCP with manual address. This option allows the computer’s WiFi to still connect while in VM mode.
-
Specify the IP Address field of the MacBook, where the network address is 10.0.0, and the host address is any number from 2-254 that does not conflict.
-
Specify the Subnet Mask to be 255.255.255.0.
-
Specify the Router on the Thunderbolt Ethernet port to be 10.0.0.1.
-
To distinguish this Thunderbolt Ethernet port from others, you can rename it and make other changes through the Settings menu.
-
Click the Apply button in the lower right corner. After a few seconds, the red button next to the Thunderbolt Ethernet item turns green if the sensor is plugged in and powered on.
-
Click the close button to dismiss the Network dialog box.
-
Continue with the “Setting Up the DHCP Server” section on page 24.
For PC Port Via VMware Workstation
This section is for users who are setting up a network port in an Ubuntu virtual environment on a PC, using the recommended VMware Workstation application.
-
Start the VMware Workstation application (Figure 13). The 64-bit Ubuntu virtual machines that you previously defined through this application are listed in the VMware Workstation window’s Library bar.
-
From the Library bar, select the name of the VM you prefer to use, such as Ubuntu 64-bit, as shown in the example. The Ubuntu 64-bit tab appears, listing the specifications of the Devices associated with this VM.
-
From the menu bar, select the Edit virtual machine settings item.
Figure 13. PC VMware Workstation with VMs Defined
- In the Virtual Machine Settings pop-up window that appears (Figure 14):
-
In the Hardware tab, the Memory item is already selected by default.
-
In the Hardware tab’s Device list, the default Network Adapter item is a NAT connection, which is necessary for WiFi.
-
In addition to the WiFi connection, you’ll need a second Network Adapter that is Bridged to allow for a direct connection to the physical network, so click the Add... button.
Figure 14. PC VMware Workstation Virtual Machine Settings Pop-Up Window
- The Add Hardware Wizard window appears (Figure 15) with a list of hardware types:
- The Hard Disk item is already selected by default.
- From the Hardware types list, select the Network Adapter item.
- Click the Next button to display the Network Adapter Type list).
-
From the Network connection options, click the Bridged radio button, then check its Replicate... checkbox.
-
Click the Finish button to close the Add Hardware Wizard window.
-
Click the OK button in the Virtual Machine Settings window to apply the changes.
Figure 15. PC VMware Workstation Add Hardware Wizard
-
If you are connecting your sensor directly to the computer (rather than through a router), continue with the next few steps, referring to a visual overview in Figure 16.
-
On your PC host computer, open the Control Panel, select the Network and Internet item, then select the Network Connection item.
-
In the Network Connections window, select the Local Area Connection tab.
-
In the Local Area Connection Properties dialog box, select the Networking tab, and click the Configure button.
-
Use the Internet Protocol Version 4 (TCP/IPv4) Properties dialog box to make sure the sensor and the host computer are on the same LAN:
-
Select the Use the following IP address radio button.
-
In the IP address field, type an IP address, where the network address is 10.0.0, and the host address is any number from 2-254 that does not conflict.
-
In the Subnet mask field, type the subnet that both computer and sensor are on.
-
In the Default gateway field, the first three values must match those of the IP address field (10.0.0), and the last value is a 1.
-
Select the OK button to apply the changes and close the dialog box.
- In the Local Area Connection Properties dialog box, select the OK button to close the box.
Figure 16. PC Host Computer Setting Subnet Mask and Gateway
- Continue with the “Setting Up the DHCP Server” section on page 24.
For PC Port Via Oracle VirtualBox
This section is for users who are setting up a network port in an Ubuntu virtual environment on a PC, using the Oracle VirtualBox application.
NOTE: The use of Oracle VirtualBox is not recommended. However, we provide it here as a courtesy.
-
Start the 64-bit Ubuntu virtual machine, which you previously defined through Oracle VirtualBox .
-
In the VirtualBox Manager window, select the name of one of the VMs that is listed in the right column (such as Ubuntu in the Figure 17 example).
-
From the drop-down menu that appears, select the Settings item.
Figure 17. PC VirtualBox Manager Window
- In the ubuntu – Settings > General dialog box that appears, select the left-hand navigation bar’s Network tab, as shown in Figure 18.
Figure 18. Mac VirtualBox ubuntu – Settings > General Dialog Box
- In the ubuntu – Settings > Network dialog box (Figure 19):
-
Of the four pre-defined adapters, select whichever is associated with the port your sensor is connected to, which is Adapter 1 in this figure.
-
Check the Enable Network Adapter checkbox.
-
From the Attached to drop-down menu, select the Bridged Adapter item.
-
From the Name drop-down menu, select Broadcom 802.11ac Network Adapter.
-
Click the OK button to apply the changes and close the ubuntu – Settings dialog box.
Figure 19. PC VirtualBox ubuntu – Settings > Network Dialog Box
-
On your PC host computer, open the Control Panel, and select the Network and Internet item, then the Network Connection item. Refer to Figure 16 for a visual example of the procedure described in the remaining steps.
-
In the Network Connections window, select the Local Area Connection tab.
-
In the Local Area Connection Properties dialog box, select the Networking tab, and click the Configure button.
-
Use the Internet Protocol Version 4 (TCP/IPv4) Properties dialog box to make sure the sensor and the host computer are on the same LAN:
-
Select the Use the following IP address radio button.
-
In the IP address field, type an IP address, where the network address is 10.0.0, and the host address is any number from 2-254 that does not conflict.
-
In the Subnet mask field, type the subnet that both computer and sensor are on.
-
In the Default gateway field, the first three values must match those of the IP address field (10.0.0), and the last value is a 1.
-
Select the OK button to apply the changes and close the dialog box.
-
In the Local Area Connection Properties dialog box, select the OK button to close the box.
-
Continue with the “Setting Up the DHCP Server” section on page 24.