Difference between revisions of "Template:A7600X Cat-1/GSM/GPRS HAT User Manual"
Line 192: | Line 192: | ||
*Refer to the link below for detailed operation: | *Refer to the link below for detailed operation: | ||
[https://www.waveshare.com/wiki/SIM868_PPP_Dail-up_Networking PPPD Dial-up Internet] | [https://www.waveshare.com/wiki/SIM868_PPP_Dail-up_Networking PPPD Dial-up Internet] | ||
+ | [https://www.waveshare.com/wiki/A7600X_RNDIS_Dail-up_Networking RNDIS Dail-up Networking] | ||
+ | |||
=== Demo Code=== | === Demo Code=== | ||
1、Insert the module to raspberry pi<br> | 1、Insert the module to raspberry pi<br> |
Revision as of 08:09, 28 April 2021
Features
- Standard Raspberry Pi 40PIN GPIO extension header, supports Raspberry Pi series boards, Jetson Nano
- Supports protocols including TCP/IP, HTTP(s), MQTT(s), FTP(s), and SSL
- Supports dial-up, telephone call, SMS
- Supports LBS base station positioning, it is able to get the approximate position info via mobile network
- TTS (Text To Speech) feature, texts in Chinese/English can be converted into spoken words
- Onboard USB interface, for testing AT Commands, network communication, and so on
- Onboard audio jack for sound recording, making telephone call, listening the TTS resulting speech, etc.
- Onboard USB to UART converter, for serial debugging, or accessing the Raspberry Pi
- Breakout common used control pins of the A7600X module, make it easy to connect with hosts boards like Arduino/STM32
- SIM card slot, supports 1.8V/3V SIM card
- TF card slot for storing data like files, audio data, etc.
- 2x LED indicators, easy to monitor the operating status
- Onboard voltage translator, operating voltage can be configured to 3.3V or 5V via 0Ω resistor jumper
- Baudrate: 300bps ~ 4Mbps (default: 115200bps)
- Comes with development resources and manual (examples for Raspberry Pi/Jetson Nano/Arduino/STM32)
Testing
Hardware connection
- Prepare the following things before using the module::
4G SIM card (China Mobile, China Unicom or Telecom card, without shutdown and GPRS enabled); Headset cable with microphone (optional); Micro SD card (optional); micro USB cable LTE antenna
- Insert the SIM card and earphone to the A7600X board, if you want to test the TF card slot, you can also insert a TF card to the card slot.
- Connect the USB interface of A7600X board to PC.
- The PWR indicator turns on after connecting
- When the default jumper cap is set to 3V3<->PWR (as shown in the figure above), the module will automatically turn on when it is powered on.
If it is set to PWR<->P22, you must manually press the PWR button to turn on: Press the PWR button for about 1 second, wait for about ten seconds to turn on;
When the NET light starts to flash, the module starts to network normally. - Open the device manager and install the windows driver file Windows Driver,Refer to the figure below:
PPPD dial-up Internet In Windows system
LTE Cat-1 dial-up Internet operation
- In Windows 10, the operation is as follows:
Note:
The ideal uplink and downlink rates that Cat-1 and 2G can achieve are as follows,The actual test will be affected by network coverage and congestion:
Network | Uplink | Downlink |
---|---|---|
LTE Cat-1 | 5Mbps | 10Mbps |
EDGE | 236.8Kbps | 236.8Kbps |
GPRS | 85.6Kbps | 85.6Kbps |
Serial assistant debugging
For software settings, refer to the frame selection in the following figure:
Common AT Commands
AT Command | Description | Return |
---|---|---|
AT | AT test command | OK |
ATE | ATE1 set echo ATE0 close echo |
OK |
AT+SIMCOMATI | Query module information | OK |
AT+IPREX | Set the module hardware serial port baud rate | +IPREX: OK |
AT+CRESET | Reset module | OK |
AT+CSQ | Network signal quality query, return signal value | +CSQ: 25,99 OK |
AT+CPIN? | Query the status of the SIM card and return READY, indicating that the SIM card can be recognized normally | +CPIN: READY |
AT+COPS? | Query the current operator, the operator information will be returned after the normal network | +COPS: OK |
AT+CREG? | Query network registration status | +CREG: OK |
AT+CPSI? | Query UE system information | |
AT+CNMP | Network mode selection command: 2:Automatic 13:GSM only 14:WCDMA only 38:LTE only |
OK |
- For more information about the AT command, you can refer to AT command manual:File:A7600 Series_AT Command Manual_V1.01.pdf
TCP/UDP data transparent transmission
AT Command | Description | Return |
---|---|---|
AT+NETOPEN | Start Socket Service | OK +NETOPEN: 0 |
AT+CIPRXGET=1 | Set the Mode to Retrieve Data | OK |
AT+CIPOPEN=0,"TCP","118.190.93.84",2317 | Establish Connection in Multi-Socket Mode | +CIPOPEN: 0,0 OK |
AT+CIPSEND=0,9 | Send data through TCP or UDP Connection | > |
wavehare | data | OK +CIPSEND: 0,9,9 |
AT+CIPCLOSE=0 | Close TCP or UDP Socket | +CSQ: 25,99 OK |
AT+NETCLOSE | Stop Socket Service | OK +NETCLOSE: 0 |
- For more information about the AT command, you can refer to AT command manual:File:A7600_Series_TCPIP_Applicati0n_Note_V1.00.pdf
TTS text-to-speech
AT commands for TTS text-to-speech are as follows:
AT+CTTSPARAM=? //TTS parameters setting help AT+CTTSPARAM=1,3,0,1,1 //Set TTS parameters AT+CTTSPARAM? //Read TTS parameters AT+CTTS=1,"6B228FCE4F7F75288BED97F3540862107CFB7EDF" //synth and play UCS2 text AT+CTTS=2,"1234567890" //synth and play ASCII text
- For more information:A7600_Series_Audio_Application Note
LBS (Location Based Services)
LBS Commands:
AT+CLBS=? //Check base station location parameters AT+SIMEI=xxxxx //set IMEI first if no IMEI, xxxxx must correspond to the IMEI code on the module label AT+CLBS=2 //type = 2,get detail address AT+CLBS=1 ///type = 1,get longitude and latitude
- For more information:A7600_Series_LBS_Application Note
Phone Call
ATD<phone_number>; //For example, dial 10000: ATD10000; AT+CHUP //Hang up the call
If you think the output volume is too low, you can use the following command to adjust::
AT+COUTGAIN=? //Adjust the volume, (0-7) AT+COUTGAIN=7 //Set the volume to 7, return OK
SMS
Send English SMS
AT+CMGF=1 //Set the SMS mode to TEXT AT+CMGS="phone number" //Set the receiver's mobile phone number
AT+CMGR=20 //read the 20th information (AT+CMGL="ALL" means to read all information)
Raspberry Pi
Hardware connection
- Onboard Raspberry Pi 40PIN GPIO extension header,can be directly connected to the Raspberry Pi.
- Pinout Definition:
Note:Set the PWR on/off selection jumper:3V3-PWR
- Raspberry Pi serial port configuration
sudo raspi-config
Select Interfacing Options ->Serial ->no -> yes,then restart raspberry pi
sudo reboot
edit /boot/config.txt,add the config below at the end of the file:
enable_uart=1
Restart to take effect
Raspberry Pi minicom serial port debugging
1.Insert the A7600X into the Raspberry Pi
2.Install minicom:
sudo apt-get install minicom
3.Execute command:sudo minicom -D /dev/ttyS0(ttyS0 is the UART of Raspberry Pi 3B/3B+/4B,ttyAMA0 is the UART of Raspberry pi 2B/zero)
Baud rate is 115200 by default.If you need to change the baud rate, for example 9600, you can add
the parameter -b 9600.
4.Send related AT commands, as shown in the figure below:
Note: Minicom can enter the setting mode by pressing Ctrl+a, then press z, and select X to exit.
Raspberry Pi Dial-up Internet
- Connect the A7600X USB to the raspberry pi
- Refer to the link below for detailed operation:
PPPD Dial-up Internet RNDIS Dail-up Networking
Demo Code
1、Insert the module to raspberry pi
2、Download the Demo to the Raspberry pi /home/pi/
cd ~ wget https://www.waveshare.com/w/upload/f/f3/AT7600X_Cat_Hat_Demo.7z sudo apt-get install p7zip-full 7z x A7600X_Cat_HAT_Demo.7z -r -o/home/pi sudo chmod 777 -R /home/pi/A7600X_Cat_HAT_Demo
- TCP
- LBS
- HTTP
- MQTT
- SSL
- FTP
The demo code needs to set the FTP server ip address and port, user name and password
- TTS
Jetson Nano
Hardware connection
Jetson nano serial port debugging
1.Insert the A7600X into the Jetson Nano 2.Install minicom:
sudo apt-get install minicom
3.Type in the terminal:
sudo minicom -D /dev/ttyTHS1 -b 115200
Note: Minicom can enter the setting mode by pressing Ctrl+a, then press z, and select X to exit.
Jetson Nano PPPD Dial-up Internet
Set the jumper:3V3-PWR
PPPD Dial-up Internet
Internet test:
ping -I ppp0 www.baidu.com route add -net 0.0.0.0 ppp0
Python Code
Install related python library:
sudo apt-get python3-pip sudo pip3 install pyserial sudo apt-get install p7zip
Download the demo code into the jetson nano
cd ~ wget https://www.waveshare.com/w/upload/f/f3/AT7600X_Cat_Hat_Demo.7z sudo apt-get install p7zip-full 7z x A7600X_Cat_HAT_Demo.7z -r -o./ sudo chmod 777 -R /home/pi/A7600X_Cat_HAT_Demo
Run the demo code
sudo python TCP.py
STM32
Hardware Connection
- STM32 Board:STM32F103ZET6
- STM32 UART2 is connected to A7600X UART,
STM32 UART1 is connected to PC
Demo Code
Download:STM32 demo code