Neoway N720 Operation & User’s Manual

Specifications

Brand: Neoway
Category: GSM/GPRS Modules
Model: N720
File Type: PDF
File Size: —
Pages: 33

Read Online

Read the Neoway N720 Operation & User’s Manual online using the built-in PDF viewer.

Text of the manual

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd i Copyright © Neoway Technology Co., Ltd 2017. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means without prior written consent of Shenzhen Neoway Technology Co., Ltd. is the trademark of Neoway Technology Co., Ltd. All other trademarks and trade names mentioned in this document are the property of their respective holders. Notice This document provides guide for users to use the N720. This document is intended for system engineers (SEs), development engineers, and test engineers. The information in this document is subject to change without notice due to product version update or other reasons. Every effort has been made in preparation of this document to ensure accuracy of the contents, but all statements, information, and recommendations in this document do not constitute a warranty of any kind, express or implied. Neoway provides customers complete technical support. If you have any question, please contact your account manager or email to the following email addresses: [email protected] [email protected] Website: http://www.neoway.com

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd ii Revision Record Issue Changes Revised By Date V1.0 Initial draft Luojian 2017-07

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd iii Contents 1 Port Mapping...................................................................................................................... 2 2 Loading USB Driver .......................................................................................................... 3 2.1 Querying Devices ............................................................................................................................... 3 2.2 Adding VID and PID .......................................................................................................................... 3 2.3 Configuring Kernel ............................................................................................................................. 3 2.4 Testing AT Commands ........................................................................................................................ 4 3 Establishing Connection Using pppd ........................................................................... 8 3.1 Checking Device ................................................................................................................................ 8 3.2 Adding VID and PID .......................................................................................................................... 8 3.3 Adding pppd Driver to Kernel ............................................................................................................ 8 3.4 Dialing up ........................................................................................................................................... 9 3.5 Test and Disconnection ..................................................................................................................... 12 3.5.1 Testing the Connection ............................................................................................................ 12 3.5.2 Disconnecting the Connection................................................................................................. 12 4 Establishing Connection Using RMNET .................................................................... 14 4.1 Checking Device .............................................................................................................................. 14 4.2 Adding VID and PID ........................................................................................................................ 14 4.3 Adding GobiNet Driver to Kernel .................................................................................................... 14 4.4 Configuring Before Dialup ............................................................................................................... 16 4.5 Dialing Up Using RMNET ............................................................................................................... 17 4.6 Test and Disconnection ..................................................................................................................... 18 4.6.1 Testing the Connection ............................................................................................................ 18 4.6.2 Disconnecting the Connection................................................................................................. 19 5 Establishing Connection Using RNDIS ...................................................................... 20 5.1 Checking Device .............................................................................................................................. 20 5.2 Adding VID and PID ........................................................................................................................ 20 5.3 Adding RNDIS Driver to Kernel ...................................................................................................... 20 5.4 Dialing Up Using RNDIS ................................................................................................................. 21 5.5 Test and Disconnection ..................................................................................................................... 22 5.5.1 Testing the Connection ............................................................................................................ 22 5.5.2 Disconnecting the Connection................................................................................................. 23 6 Establishing Connection Using ECM .......................................................................... 24 6.1 Checking Device .............................................................................................................................. 24 6.2 Adding VID and PID ........................................................................................................................ 24

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd iv 6.3 Adding ECM Driver to Kernel ......................................................................................................... 24 6.4 Dialing Up Using RNDIS ................................................................................................................. 26 6.5 Test and Disconnection ..................................................................................................................... 27 6.5.1 Testing the Connection ............................................................................................................ 27 6.5.2 Disconnecting the Connection................................................................................................. 27 7 FAQ .................................................................................................................................... 28

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 1 About This Document This document provides guidance about how to add the USB driver of the N720 and how to share the Internet access of an N720 on Linux.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 2 1 Port Mapping N720 supports network share via pppd, RNDIS, ECM, and RMNET. Each mode corresponds to different VID and PID. Developers can switch the mode by sending AT command (AT+NETSHAREMODE). The mapping between the ports and share modes is shown as follows:  VID: 0x2949 PID: 0x8241 Support pppd/RNDIS dialup Default USB composition: RNDIS(00)+MODEM(02)+TTY(03 NMEA)+TTY(04 AT)+Diag(05)  VID: 0x2949 PID: 0x8242 Support pppd/ECM dialup USB composition (MI No.): ECM(00)+MODEM(02)+TTY(03 NMEA)+TTY(04 AT)+Diag(05)  VID:0x2949 PID:0x8243 Support pppd/RMNET dialup USB composition (MI No.): RMNET(00)+MODEM(01)+TTY(02 NMEA)+TTY(03 AT)+Diag(04) Table 1-1 N720 port mapping Model VID PID Share Mode Port Mapping Function N720 0x2949 0x8241 pppd/RNDIS RNDIS (00) RNDIS NIC port MODEM (02) Private data service port TTY (03 NMEA) GPS/BD data output port TTY (04 AT) AT Command port Diag (05) Diagnosis port 0x2949 0x8242 pppd/ECM ECM (00) ECM NIC port MODEM (02) Private data service port TTY (03 NMEA) GPS/BD data output port TTY (04 AT) AT command port Diag (05) Diagnosis port 0x2949 0x8243 pppd/GobiNet RMNET(00) GobiNet NIC port MODEM(01) Private data service port TTY(02 NMEA) GPS/BD data output pot TTY(03 AT) AT command port Diag(04) Diagnosis port

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 3 2 Loading USB Driver 2.1 Querying Devices Execute lsusb to check whether USB devices are displayed. Ensure that N720 is identified. In the figure above, the VID of N720 is 0x2949 and the PID of N720 is 0x8241. If the host does not identify N720, check whether N720 is connected to the host, whether it is powered up and started, or whether it is connected to the host through USB. 2.2 Adding VID and PID In kernel/drivers/usb/serial/option.c, add VID:0x2949 PID:0x8241 to option_ids. 2.3 Configuring Kernel On Linux, the USB-to-Serial driver is widely used. Before adding the driver, configure the Linux kernel following steps below: 1. Navigate to the kernel directory. 2. Execute make menuconfig. The kernel configuration is displayed.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 4 3. Configure kernel. 4. Click Save and Exit. 5. Compile kernel again and burn the compiled kernel files to the host. 6. Power up the host again and execute ls /dev/ttyUSB*. If N720 is loaded successfully, ttyUSB0 to ttyUSBx are listed under /dev. Two ttyUSB ports can be used to send AT commands. One is used as modem port and the other one is used as AT port. For example, ttyUSB0 and ttyUSB2 in the above figure can be used to send AT commands. ttyUSB0 is the modem port and ttyUSB2 is the AT port. If ttyUSB0 to ttyUSB4 are displayed and ttyUSB0 and ttyUSB2 can be used to send AT commands, ttyUSB0 is the modem port and ttyUSB2 is the AT port. If ttyUSB0 cannot be used to send AT commands, ttyUSB2 and ttyUSB4 can be used to send AT commands. ttyUSB2 is the modem port and ttyUSB4 is the AT port. 2.4 Testing AT Commands 1. Power up the host. 2. Execute ls /dev/ttyUSB* to check whether N720 is identified and whether ttyUSB are listed. Device Drivers ---> [*] USB support ---> <*> USB Serial Converter support ---> <*> USB driver for GSM and CDMA modems (CONFIG_USB_SERIAL_OPTION=y)

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 5 3. Test AT commands.  Using a serial port debugging tool Open the UART debugging tool and configure the UART port. minicom –s Configure the setting as shown in the above figure. Send AT commands.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 6 ATE //Enable terminal display. OK AT+CGMR //Query software version. +CGMR: N720_D0B0CM_BZ_V003 AT+CPIN? //Query PIN code. +CPIN: READY AT+CSQ //Query signal. +CSQ: 31,99 //RSSI: 31; bit error rate: 99 AT+CREG? //Query the registration status of the CS domain (SMS and voice call service) +CREG: 0,1 AT+CGREG? ////Query the registration status of the PS domain (data service) +CGREG: 0,1 AT$MYSYSINFO //Query the mode of the network registered. $MYSYSINFO: 4,03 //Registered China Telecom 4G network. AT+COPS? //Query carrier's information. +COPS: 0,0,"CHINA TELECOM",7 //China Telecom

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 7  Testing AT commands in CLI echo -e "AT+CSQ\r\n" > /dev/ttyUSB2;cat /dev/ttyUSB2  Only modem port or AT port can be used to send AT commands.  If any messages are displayed to ask for permission, modify the permission for the ttyUSB port.  If the AT command contains any special character, add \ before it.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 8 3 Establishing Connection Using pppd All three configuration modes of N720 VID:0x2949 PID:0x8241, VID:0x2949 PID:0x8242, and VID:0x2949 PID:0x8243 support network dialup using pppd. The following sections describe how to dial up and establish a PPP connection using pppd. 3.1 Checking Device Execute lsusb to check if N720 is identified. N720 has been identified with a VID of 0x2949 and a PID of 0x8241. 3.2 Adding VID and PID In kernel/drivers/usb/serial/option.c, add VID:0x2949 PID:0x8241 to option_ids. 3.3 Adding pppd Driver to Kernel 1. Navigate to the kernel directory and execute make menuconfig. The kernel configuration GUI is displayed. 2. Configure kernel. Select Device Drivers > Network device support > ppp options.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 9 3. Click Save and Exit. 4. Compile kernel again and burn the compiled kernel files to the host. 3.4 Dialing up 1. Repeat the processes of USB loading and AT interaction. Ensure that the module registers a network and the returned RSSI value is greater than 13. 2. Check whether the Linux OS embeds the pppd and chat tools. If the system does not contain pppd, install kppp, which contains pppd program. pppd 2.4.5 and pppd 2.4.7 are recommended. 3. Check if the following scripts are installed. ip-up: a script that configures settings after a connection is set up. ip-down: a script that is used after the connection is disconnected. pppd call gpra-dial: executed to dial up to set up a connection. gprs-chat: contains the AT commands and response to them between chat and the GPRS module. 4. Check the carrier information and network mode, and the set APN. AT+CGDCONT=1,”IP”,”APN_XXX” OK XXX indicates the carrier APN. For example, 2G, 3G, and 4G of China Mobile: CMNET /etc/ppp/: chap-secrets ioptions options resolv.conf connect-errors ip-down pap-secrets ip-up peers /etc/ppp/peers: gprs-dial gprs-chat

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 10 2G, 3G, and 4G of China Unicom: 3GNET 2G and 3G of China Telecom: CTNET 4G of China Telecom: CTLTE For other networks, consult your carriers.  The module will set APN based on current network mode if developers do not set it before PPPD dialup. If the APN is set before pppd dialup, the module will dial up the network using the set APN.  If developers use a private network SIM card, obtain the private network APN from carrier. 5. Execute *99# to dial up network. If developers use a private network SIM card or other SIM cards, obtain user and password from your carriers when necessary. 6. Create a pppd script and a chat script. − /etc/ppp/peers/gprs-dial Set the modem port as the dialup port. Otherwise, the module cannot dial up a network successfully. − /etc/ppp/gprs-chat /dev/ttyUSB0 115200 hide-password noauth debug noipdefault local lock dump nodetach user "card" password "card" remotename cmnet ipparam cmnet usepeerdns connect '/usr/sbin/chat -s -v -f /etc/ppp/peers/gprs-chat'

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 11 7. Execute pppd call gprs-dial &. TIMEOUT 5 ABORT "BUSY" ABORT "DELAYED" ABORT "ERROR" ABORT "NODIALTONE" ABORT "NOCARRIER" TIMEOUT 5 ''AT OK AT+CSQ OK AT+CGDCONT=1,"IP","ctnet" OK ATD*99# CONNECT ''

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 12 3.5 Test and Disconnection 3.5.1 Testing the Connection Input ifconfig to check the IP address of ppp0. Ping a valid IP address to check if the host is connected to the Internet. Ping a valid domain name. If a website can be reached through IP address but cannot be reached through its domain name, add DNS(114.114.114.114) to /etc/resolv.conf. 3.5.2 Disconnecting the Connection 1. Execute the ppp-off script.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 13 2. Run the # killall pppd command.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 14 4 Establishing Connection Using RMNET N720 supports dialup and connection setup using RMNET with a VID of 0x2949 and a PID of 0x8243. GobitNet driver is used to interact with N720 on the Linux for network dialup through RMNET. GobitNet will create a network device called ethX and a /dev/qcqmiX character device. After the two devices are created and N720 can register a network, developers can dial up the network using the dialup program. Send AT+NETSHAREMODE=2 to N720 to switch the configuration if the PID is not 0x8243. 4.1 Checking Device Execute lsusb to check if N720 is identified. N720 has been identified with a VID of 0x2949 and a PID of 0x8243. 4.2 Adding VID and PID In kernel/drivers/usb/serial/option.c, add VID:0x2949 PID:0x8243 to option_ids. 4.3 Adding GobiNet Driver to Kernel 1. Copy the GobiNet driver code (NWY-GobiNet/src/) to kernel/drivers/net/usb. 2. Add config USB_GOBI_NET to kernel/drivers/net/usb/Kconfig.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 15 3. Modify kernel/drivers/net/usb/Makefile to ensure that GobiNet module can be compiled. 4. Configure kernel. Select the GobiNet option and save the settings. 5. Compile the kernel again and burn the kernel to the host. 6. Power up the host and check whether the driver is loaded successfully. Input lsusb –t to check whether the driver is identified. obj-$(CONFIG_USB_GOBI_NET) += GobiNet.o GobiNet-objs:=GobiUSBNet.o QMIDevice.o QMI.o config USB_GOBI_NET tristate "Gobi USB Net driver for NWY module" help Support NWY module. A modem manager with support for GobiNet is recommended. Device Drivers ---> [*]Network device support ---> [*]USB Network Adapters ---> [M]Gobi USB driver for NWY module

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 16 Input ifconfig to check NIC information. If a new NIC, e.g. eth1, is displayed, the driver is loaded successfully. 7. Check if qcqmi1 is created successfully. 4.4 Configuring Before Dialup To dial up and set a connection through RMNET on Linux, developers need to use Neoway dialup program. Execute make under the NWY-CM-code/src directory to obtain the NWY-CM program. Assign the NWY-CM program execution permission. Input NWY-CM-h to check Help.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 17 NWY-CM (Option) (Parameter) Description -s [apn [user password auth]] Set APN/user name/ password/ authentication method. APN: Access point name China Mobile: CMNET China Unicom: 3GNET 2G and 3G of China Telecom: CTNET 4G of China Telecom: CTLTE For other networks, consult your carriers. user: User name Consult your carriers. password: password auth: authentication method 0: No authentication 1: PAP 2: CHAP -f logfilename Save dialing log. 4.5 Dialing Up Using RMNET 1. Run the following commands to confirm that N720 registered a network. AT+CPIN? AT+CSQ AT+CREG? AT+CGREG? AT$MYSYSINFO support@neoway:~/luo/rmnet/NWY-CM-code/src$ ./NWY-CM –h Usage: ./NWY-CM [-s [apn [user password auth]]] [-f logfilename] -s [apn [user password auth]] Set apn/user/password/auth get from your network provider -f logfilename Save log message of this program to file Example 1: ./NWY-CM Example 2: ./NWY-CM -s 3gnet card pwd 0 -f log.txt

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 18 2. Execute NWY0CM to dial up and establish a network connection. 4.6 Test and Disconnection 4.6.1 Testing the Connection Input ifconfig to check the IP address of eth1. Ping a valid IP address to check if the host is connected to the Internet.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 19 Ping a valid domain name. 4.6.2 Disconnecting the Connection Run the killall NWY-CM command.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 20 5 Establishing Connection Using RNDIS N720 supports dialup and connection setup using RMNET with a VID of 0x2949 and a PID of 0x8241. Send AT+NETSHAREMODE=2 to N720 to switch the configuration if t1.1he PID is not 0x8241. 5.1 Checking Device Execute lsusb to check if N720 is identified. N720 has been identified with a VID of 0x2949 and a PID of 0x8241. 5.2 Adding VID and PID In kernel/drivers/usb/serial/option.c, add VID:0x2949 PID:0x8241 to option_ids. 5.3 Adding RNDIS Driver to Kernel 1. Navigate to kernel and execute make menuconfig. 2. Configure kernel. Select RNDIIS option and save the settings. Device Drivers ---> -*- Network device support ---> {M} USB Network Adapters ---> -M- Multi-purpose USB Networking Framework (CONFIG_USB_NET=m) -M- Host for RNDIS and ActiveSync devices (CONFIG_USB_NET_RNDIS_HOST=m)

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 21 3. Compile the kernel again and burn the kernel to the host. 4. Power up the host and check whether the usb0 is displayed. 5. Query whether the RNDIS driver is loaded successfully. Input lsusb –t. Input lsmod | grep rndis. 5.4 Dialing Up Using RNDIS 1. Run the following commands to confirm that N720 registered a network. AT+CPIN? //Query SIM card status. AT+CSQ //Query signal. AT+CREG? AT+CGREG? AT$MYSYSINFO //Query network mode.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 22 2. Send AT commands to dial up. After dialing up and establishing a connection using RNDIS, the module cannot dial up or establish a connection using pppd anymore. 5.5 Test and Disconnection 5.5.1 Testing the Connection Input ifconfig to check the IP address of usb0.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 23 Ping a valid website to see if the connection works properly. 5.5.2 Disconnecting the Connection Send AT+NETSHAREACT=1,0,0 to disconnect the connection.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 24 6 Establishing Connection Using ECM N720 supports dialup and connection setup using ECM with a VID of 0x2949 and a PID of 0x8242. Send AT+NETSHAREMODE=2 to N720 to switch the configuration if t1.1he PID is not 0x8242. 6.1 Checking Device Execute lsusb to check if N720 is identified. N720 has been identified with a VID of 0x2949 and a PID of 0x8242. 6.2 Adding VID and PID In kernel/drivers/usb/serial/option.c, add VID:0x2949 PID:0x8242 to option_ids. 6.3 Adding ECM Driver to Kernel 1. Navigate to kernel and execute make menuconfig. 2. Configure kernel. Select RNDIIS option and save the settings.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 25 3. Compile the kernel again and burn the kernel to the host. 4. Power up the host and check whether the usb0 is displayed. 5. Query whether the ECM driver is loaded successfully. Input lsusb –t. Input lsmod | grep cdc. Device Drivers ---> -*- Network device support ---> {M} USB Network Adapters ---> -M- Multi-purpose USB Networking Framework (CONFIG_USB_NET=m) -M- CDC Ethernet support (smart devices such as cable modems) (CONFIG_USB_NET_CDCETHER=m)

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 26 6.4 Dialing Up Using RNDIS 1. Run the following commands to confirm that N720 registered a network. AT+CPIN? //Query SIM card status. AT+CSQ //Query signal. AT+CREG? AT+CGREG? AT$MYSYSINFO //Query network mode. 2. Send AT commands to dial up. After dialing up and establishing a connection using ECM, the module cannot dial up or establish a connection using pppd anymore.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 27 6.5 Test and Disconnection 6.5.1 Testing the Connection Input ifconfig to check the IP address of usb0. Ping a valid website to see if the connection works properly. 6.5.2 Disconnecting the Connection Send AT+NETSHAREACT=1,0,0 to disconnect the connection.

N720 User Manual (Linux)

Copyright © Neoway Technology Co., Ltd 28 7 FAQ Q: Why I cannot find the USB ports after adding the VID and PID of the module to the kernel and executing ls /dev/ttyUSB*? A: 1. Check if the module is powered up and connected through USB. Input lsusb or dmesg to check the USB device information. 2. Check the VID and PID are added correctly. 3. Check if the modifications are compiled by the system. You can find the USB ports by inputting ls /dev/ttyUSB* if all the above are correct.