5、Static IP and WiFi hotspot mode

This section takes Raspberry Pi as an example.

5.1、Static IP

1)Open a terminal.

2)Input nm-connection-editor in the terminal.

3)The Network Connections dialog box will pop up, then select the connected wifi, double-click to enter the settings.

image-20211119114216454

Choose 【Wi-Fi】option, 【Mode】choose【Client】.

image-20211119114105670

Choose【IPv4 Settings】, click 【Add】and input IP address, click 【save】.

image-20211119105852862

Modify .bashrc file, input following command.

Set ROS_IP to the IP modified in the previous step, as shown below.

Note: if you do not connect to this Wi-Fi, be sure to shield the modified line (add # in front of it).

505

When we open new terminal, 【 binary operator expected】 will appear, don't care it.

5.2、WiFi hotspot mode

1)Open a terminal.

2)Input nm-connection-editor in the terminal.

image-20211119101530064

The system will display the frame as shown in the figure below, click 【+】to select 【Wi-Fi】mode, and click 【Create...】.

Screenshot from 2021-09-01 09-59-22

Choose【Wi-Fi】option, choose 【SSID】add 【yah】, choose 【Hotspot】in the 【Mode】.

Screenshot from 2021-09-01 10-00-37t

Choose【Wi-Fi Security】option, choose【WPA & WPA2 Personal】in【Security】, input password in 【Password】.

Screenshot from 2021-09-01 10-00-30

Choose【IPv4 Settings】option, click 【Add】, input password, as shown below.

Screenshot from 2021-09-01 10-01-47

Choose【IPv4 Settings】, click 【Ignore】in【Method】, click 【save】.

Screenshot from 2021-09-01 10-01-41

Choose 【Wi-Fi】mode, the new WiFi we created will appear.

Screenshot from 2021-09-01 10-02-39

At this point, the new WIFI has been successfully created, and then we can connect to this new WIFI.

Follow the steps in the figure below.

image-20211119102527488

The system will pop up a dialog box 【WiFi】 column, select the location shown in 1, and click 【Connect to Hidden Network】.

image-20211119102849014

Then select 【Connection】, select the wifi hotspot just built by yourself (the icon is the wifi built by the author), and then click 【Connect】.

image-20211119103431704