Many friends have asked me how to open hotspots through SIM8200, the following arrangements are for you:
0. After connecting the device, copy the following commands to Terminal:
wget https://www.waveshare.net/w/upload/1/1e/SIM820X_RNDIS.zip
sudo apt-get install python3-pip
sudo pip3 install pyserial
sudo apt-get install unzip
unzip SIM820X_RNDIS.zip
sudo chmod 777 SIM820X_RNDIS.py
sudo python3 SIM820X_RNDIS.py
1.After dialing, the Raspberry Pi can see that usb0 gets the ip through the following command:
ifconfig
2. Enter the super administrator user
sudo -i
3.Test usb0 networking status
ping -I usb0 www.baidu.com
4. Install the library files
sudo apt-get install util-linux procps hostapd iproute2 iw haveged dnsmasq
5. Install AP software
git clone git://github.com/oblique/create_ap
cd create_ap
sudo make install
6. Create AP
Create a Wi-Fi network with WPA + WPA2 password:
sudo create_ap --no-virt wlan0 eth0 PI 12345678
This command creates a wireless network named PI on the wlan0 channel, and the password is 12345678.
After completing the creation of a wireless network, you can connect to a device with WiFi function such as a mobile phone.
7. Connect your phone to WIFI
Select Service Set Identifier Service Set Identifier: PI
Enter the corresponding Password: 12345678
Mobile phone WIFI connected to SSID: PI
FAQ:
1)If it appears that Your adapter can not be a station (i.e. be connected) and an AP at the same time, you need to disconnect the WIFI connection. Be careful not to turn off the WIFI, but forget the network. Do not connect to other hotspots, otherwise there will be conflict:
2)If there is an Operation not possible due to RF-kill problem, use the following command to unlock:
rfkill unblock all