WRTnode add USB device (3G network card, U disk, USB camera)

来自WRTnode Wiki
跳转至: 导航搜索
本页是页面添加相关USB设备(3G网卡、U盘、usb摄像头)翻译版本,翻译工作已完成100%。

其他语言:

3G network card

Hardware

  1. Here with GOBI2000 network card as a demo, does not represent WRTnode only support GOBI2000 network card. in fact, as long as it is Linux support network card WRTnode are also supported, regardless of 3G or 4G

software

Select drive

make menuconfig
LuCI            --->  Protocols     --->  <*> luci-proto-3g
Kernel modules  --->  USB Support   --->  <*>kmod-usb-serial 
                                          <*> kmod-usb-serial-option
					  -*- kmod-usb-serial-wwan 
                                          <*>kmod-usb-serial-qualcomm. 
                                          <*>kmod-usb-serial-sierrawireless

Save configuration and exit configuration interface. Compile the firmware:

make V=s

Flash firmware
Please refer toHow to compile a WRTnode firmware

Plug the SIM card into the SIM card slot of Qualcomm gobi 2000 3g module.
Install GOBI2000 module
Install GOBI2000 module and download mbn files

wget http://d.wrtnode.com/WikiDownload/Qualcomm-gobi-2000-3g/gobi_loader_0.7_ramips_24kec.ipk
opkg install /tmp/gobi_loader_0.7_ramips_24kec.ipk
mkdir /tmp/gobi
cd /tmp/gobi
wget http://d.wrtnode.com/WikiDownload/Qualcomm-gobi-2000-3g/apps.mbn
wget http://d.wrtnode.com/WikiDownload/Qualcomm-gobi-2000-3g/amss.mbn
wget http://d.wrtnode.com/WikiDownload/Qualcomm-gobi-2000-3g/UQCN.mbn
gobi_loader -2000 /dev/ttyUSB0 /tmp/gobi  

Open the browser and enter the URL http://192.168.8.1

Luci - > Network - > interfaces

Modify the configuration of Wan
3g&gps1.png


(The WAN port to switch to 3G Internet access)

3g&gps2.png



(Modem device is selected according to the actual network card, in which the Gobi module is /dev/ttyUSB0)
(3G parameters for the choice, which move, China Unicom's Prototal select UMTS or GSM, and Telecommunications options EVDO)
(Where PAP, CHAP account, passwords do not need to fill in)
(apn fill in the actual Internet apn, such as China Unicom to fill in: 3gnet, mobile fill: cmnet)
3g&gps3.png
Save&Apply.
Gps function:
After the module is loaded, use the following command:

echo -n "\$GPS_START" >/dev/ttyUSB2 
cat /dev/ttyUSB2

Then you can see the GPS related data has been output:
3g&gps4.png

Click to view GPGSA,GPGSV,GPGAV等参数详细介绍

WRTnode add USB mobile hard disk (for example, U disk)

Add driver support

Add USB support: ohci driver (usb1.x), ehci driver (usb2.0), usb-storage driver (usb storage device)

Kernel modules  --->   USB Support  --->       kmod-usb-ohci 
                                               kmod-usb2
                                               kmod-usb-storage
                                               kmod-usb-storage-extras

Add the commonly used file system driver support (which ntfs-3g use NTFS to drive, need to choose the kmod-fs-fuse)

Kernel modules  --->  Filesystems  --->        kmod-fs-ext4
                                               kmod-fs-vfat             												
                                               kmod-fs-autofs4
                                               kmod-fs-fuse

Add language encoding related (to dictation file system such as FAT32)

Kernel modules  ---> Native Language Support --->kmod-nls-cp437 
                                                 kmod-nls-utf8
                                                 kmod-nls-iso8859-1

Add tools

Utilities    --->   Filesystem  ---> ntfs-3g  /* NTFS partition driver /*
Base system  --->   block-mount  /* Boot automatically mount */
Utilities    --->   mount-utils /* install the uninstall tool */

Access to the U disk, which is commonly used in the format can refer to the following command to mount
NTFS:
U2.png

Fat32、EXT4:
U3.png

Mount USB camera

Hardware

WRTnode 开发板
WRTnode标准底板
Usb camera

Software

WRTnode sdk or openwrt trunk
Add driver

make menoconfig
Multimedia      --->   <*> mjpg-streamer -- >     [*]   Install input uvc plugin
                                                  [*]   Install output http plugin 
Kernel modules  --->   Video Support  --->        <*> kmod-video-core......
                                                  <*>   kmod-video-uvc....
                                                  -*-   kmod-video-videobuf2.

Compile firmware

make V=s

Please refer to Flash firmware and then do the following
1、Check if there is a video device

ls /dev

2、Get mjpg_streamer parameters and usage

mjpg_streamer --help

Video1.png

3、Open camera

mjpg_streamer -i "input_uvc.so -f 30 -r 1280*720" -o "output_http.so -p 8080"

Video2.png

The default device is video0, if not video0, you need to specify the device with -d:

mjpg_streamer -i "input_uvc.so -d /dev/video1 -f 30 -r 1280*720" -o "output_http.so -p 8080"

Among them, the interpretation of the relevant parameters are as follows
-f frames per second
-r The resolution of the video equipment
-p network port number
The fourth step: open the VLC player,Ctrl+n to open the window "open media"
The default IP address is 192.168.8.1
Video3.png

Video4.png