8,367
edits
Changes
→create_ap method to create WIFI hotspot in bridge mode
<ol style="list-style-type: decimal;">
<li><p>Enter the following command to create a WIFI hotspot named '''orangepi''' and password '''orangepi''' in bridge mode</p>
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></li></olbig>|}
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~$ '''sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --no-virt'''
|}</li></ol>
<ol start="2" style="list-style-type: decimal;">
<li>If the following information is output, it means that the WIFI hotspot is created successfully</li></ol>
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~$ '''sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --no-virt'''
wlan0: EAPOL-4WAY-HS-COMPLETED ce:bd:9a:dd:a5:86
|}</ol>
<ol start="3" style="list-style-type: decimal;">
<li>Take out the mobile phone at this time, and you can find the WIFI hotspot named orangepi created by the development board in the searched WIFI list, and then you can click '''orangepi''' to connect to the hotspot, and the password is the '''orangepi''' set above</li></ol>
[[File:media/image119.png|265x211px]]
</ol>
<ol start="4" style="list-style-type: decimal;">
<li>After the connection is successful, the display is as shown in the figure below</li></ol>
[[File:media/image120.png|273x130px]]
</ol>
<ol start="5" style="list-style-type: decimal;">
<li>In bridge mode, the wireless device connected to the hotspot of the development board also requests an IP address from the DHCP service of the main router (the router connected to the development board), for example, the IP of the development board is '''192.168.1.X'''</li></ol>
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~$ '''sudo ifconfig eth0'''
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
::inet '''<span style="color:#FF0000">192.168.1.150</span>''' netmask 255.255.255.0 broadcast 192.168.1.255
::inet6 fe80::938f:8776:5783:afa2 prefixlen 64 scopeid 0x20<link>
::ether 4a:a0:c8:25:42:82 txqueuelen 1000 (Ethernet)
::RX packets 25370 bytes 2709590 (2.7 MB)
::RX errors 0 dropped 50 overruns 0 frame 0
::TX packets 3798 bytes 1519493 (1.5 MB)
::TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
::device interrupt 83|}
The IP of the device connected to the WIFI hotspot is also assigned by the main router, so the mobile phone connected to the WIFI hotspot and the development board are in the same network segment. At this time, click on the connected WIFI hotspot orangepi, and then you can see the IP address of the mobile phone Also '''192.168.1.X'''。
[[File:media/image124.png|282x159px]]
</ol>
<ol start="6" style="list-style-type: decimal;">
<li><p>If the '''--freq-band''' y band. If you want to create a hotspot in the 5G frequency band, you can specify the '''--freq-band 5''' parameter. The specific command is as follows</p>
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></li></olbig>|}
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~$ '''sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --freq-band 5 --no-virt'''
|}</li></ol>
<ol start="7" style="list-style-type: decimal;">
<li><p>If you need to hide the SSID, you can specify the '''--hidden''' parameter, the specific command is as follows</p>
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Note that in the following commands, Debian12 needs to change eth0 to end0.'''</p></li></olbig>|}
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~$ '''sudo create_ap -m bridge wlan0 eth0 orangepi orangepi --hidden --no-virt'''
|}
At this time, the mobile phone cannot search for the WIFI hotspot. You need to manually specify the name of the WIFI hotspot and enter the password to connect to the WIFI hotspot.
[[File:media/image123.png|228x191px]]
</li></ol>
<span id="how-to-set-static-ip-address"></span>