bnanapi R2 4G模組使用

2021-10-10 20:06:08 字數 4328 閱讀 3633

4g模組使用配置步驟

一.聯網設定(ppp模式)

1.輸入lsusb檢視4g模組是否連線成功(bus 003 device 002: id 2c7c:0125為4g模組)

root@bpi-iot-ros-ai:~# lsusb

bus 004 device 001: id 1d6b:0003 linux foundation 3.0 root hub

bus 003 device 002: id 2c7c:0125

bus 003 device 001: id 1d6b:0002 linux foundation 2.0 root hub

bus 002 device 001: id 1d6b:0003 linux foundation 3.0 root hub

bus 001 device 001: id 1d6b:0002 linux foundation 2.0 root hub

2.輸入ls /dev/ttyusb* 4g模組進入開發模式

root@bpi-iot-ros-ai:~# ls /dev/ttyusb*

/dev/ttyusb0 /dev/ttyusb1 /dev/ttyusb2 /dev/ttyusb3

3.鍵入ppp1檔案目錄,執行./ppp1.sh &命令

root@bpi-iot-ros-ai:~# cd /home/pi/downloads/ppp1/

root@bpi-iot-ros-ai:/home/pi/downloads/ppp1# ./ppp1.sh &

4.等待ppp.sh指令碼執行完畢輸入ifconfig檢視是否存在ppp0網路

root@bpi-iot-ros-ai:/home/pi/downloads/ppp1# ifconfig

docker0 link encap:ethernet hwaddr 02:42:6b:22:18:84

inet addr:172.17.0.1 bcast:0.0.0.0 mask:255.255.0.0

up broadcast multicast mtu:1500 metric:1

rx packets:0 errors:0 dropped:0 overruns:0 frame:0

tx packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

rx bytes:0 (0.0 b) tx bytes:0 (0.0 b)

eth0 link encap:ethernet hwaddr 2a:85:dd:f2:14:e2

up broadcast running multicast mtu:1500 metric:1

rx packets:0 errors:0 dropped:0 overruns:0 frame:0

tx packets:109 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

rx bytes:0 (0.0 b) tx bytes:20972 (20.9 kb)

interrupt:71

eth1 link encap:ethernet hwaddr 76:29:3b:88:53:03

up broadcast running multicast mtu:1500 metric:1

rx packets:0 errors:0 dropped:0 overruns:0 frame:0

tx packets:115 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

rx bytes:0 (0.0 b) tx bytes:23048 (23.0 kb)

interrupt:71

lo link encap:local loopback

inet addr:127.0.0.1 mask:255.0.0.0

inet6 addr: ::1/128 scope:host

up loopback running mtu:65536 metric:1

rx packets:1623 errors:0 dropped:0 overruns:0 frame:0

tx packets:1623 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1

rx bytes:238771 (238.7 kb) tx bytes:238771 (238.7 kb)

ppp0 link encap:point-to-point protocol

inet addr:10.87.168.72 p-t-p:10.64.64.64 mask:255.255.255.255

up pointopoint running noarp multicast mtu:1500 metric:1

rx packets:31 errors:0 dropped:0 overruns:0 frame:0

tx packets:71 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:3

rx bytes:12486 (12.4 kb) tx bytes:7964 (7.9 kb)

二.測速

鍵入 speedtest-cli所在目錄

輸入chmod +x ./speedtest-cli 給該檔案讀寫許可權

輸入 ./speedtest-cli 執行測速檔案,等待測速完成

root@bpi-iot-ros-ai:~# chmod +x ./speedtest-cli

root@bpi-iot-ros-ai:~# ./speedtest-cli

retrieving speedtest.net configuration...

testing from china mobile guangdong (223.72.105.188)

...retrieving speedtest.net server list...

selecting best server based on ping...

hosted by 湖南聯通5g (changsha)

[1341.73 km]: 91.24 ms

testing download speed..

....

....

....

....

....

....

....

....

....

....

....

....

....

....

....

....

....

....

....

..download: 11.44 mbit/s

testing upload speed..

....

....

....

....

....

....

....

....

....

....

....

....

....

....

....

....

....

....

....

....

....

....

....

..upload: 2.81 mbit/s

三、阿里雲內網穿透

1.配置linux服務端

鍵入ssh -fncr 2333:localhost:22 [email protected]

root@bpi-iot-ros-ai:~# ssh -fncr 2333:localhost:22 [email protected]
鍵入密碼:zhou1996.

2.配置阿里雲服務端

鍵入ssh -fncl 2555:localhost:2333 localhost

鍵入密碼:zhou1996.

3.本地計算機ssh設定

ip:101.200.240.218

埠:2555

使用者名稱:pi

密碼:bananapi

2 4G無線音訊模組方案

2.4g 一對遠距離的2.4g無線音訊傳輸模組。專業的rf電路設計配合獨有的軟體跳頻機制,有效提高了rf的抗干擾能力及傳輸距離。模組內建高效能的音訊轉換器,支援48k 16bit高品質的音訊取樣,實現了無壓縮的數字音訊傳輸。可直接與電視機,電腦,vcd,mp4等凡具有音訊輸出介面的產品配合使用.完全...

幾種2 4G無線數傳模組電路

一 幾種2.4g無線數傳模組介紹 無線數傳按傳輸速率區分,分為低速數傳模組和高速數傳模組兩大類,低速數傳模組使用的載頻均較低,一般都在 315mhz,433mhz 和915mhz 這幾個頻段,所以一般最高傳輸速率均不大於150kb s。但這些使用在uhf頻段無線裝置,載波仍具有一定的穿透和繞射能力,...

Arduino 2 4G模組做航模遙控器

萌新第一次發文,多多關照 玩航模估計有七八年了,玩arduino和各類微控制器也有一兩年啦,今年回家以後因為疫情被困在家裡回不去,就尋思著用arduino做個2.4g的遙控和接收。閒話不多說,開始正文。接線還有其他的基礎介紹可以參考凌順實驗室的介紹和示意,我感覺很不錯 arduino 2.4g通訊實...