Template: A7670X Cat-1 HAT Pi Guide

From Waveshare Wiki
Jump to: navigation, search

Setup

  • AT7600X Cat-1/GSM/GPRS Hat has a 40PIN connector which is compatible with all the Raspberry Pi boards for easy connecting.

To communicate the 7670X module with the serial port, you need to set the yellow jumper of the 7670 module in B and 3V3 to PWR.

  • Configure the serial port of the Pi.

To use the hardware serial port, you need to first disable the login shell function and then enable the hardware serial.

sudo raspi-config

Choose Interfacing Options -> Serial -> no -> yes.
A7600C1-Cat-Hat-OpenSerial.jpg
Reboot the Raspberry Pi.

sudo reboot

Testing with minicom

1. Connect the 7670x module to Raspberry Pi.
2. Open a terminal and install the minicom tool.

sudo apt-get install minicom

3. Check the actual port:

sudo ls -l /dev/serial0

4. Run the command: sudo minicom -D /dev/ttyS0 to open the terminal and test(Please modify the ttyS0 if you get the different port with Step 3), the default baud rate is 115200.
4. Send AT commands to test the module, for example:
A7600C1-Cat-Hat-piSerial-test.jpg
【Note】: You can exit the minicom by pressing Ctrl+A and then press X. To configure the minicom, please press Ctrl+a and then Z.

Setup Network in Pi

  • Connect the USB port of A7600C1-Cat-1 GSM GPRS-HAT to Raspberry Pi by Micro USB cable.
RNDIS method
  • Connect the USB interface of A7670X modules to Raspberry Pi or Jetson Nano by micro USB cable. Check if the ttyUSB1 port is recognized normally.
sudo ls /dev/ttyUSB*
  • Configure the module by minicom.
sudo minicom -D /dev/ttyUSB1
  • Run the following commands and the A7670x module will reboot.
AT+DIALMODE=0
AT$MYCONFIG="usbnetmode",0
A7600 RNDIS (1).png
  • Check if a new USBx port is recognized by ifconfig command. (It is USB0 for Pi and USB1 for Jetson Nano).
 ifconfig
A7600 RNDIS (2).png
  • Applay the IP address of the USBx port.
sudo dhclient -v usb0
  • Test the USBx port and try to ping a website, for example, google.com.
sudo ping -I usb0 www.google.com

A7600 RNDIS (3).png

  • If the network is not available, please configure DNS for a try.
sudo route add -net 0.0.0.0 usb0
  • If you want to restore the network mode, please send the following AT command by minicom:
AT+DIALMODE=1
If you want to use PPPD method, please refer to this guide

Examples

1. Connect the A7670X module to Raspberry Pi.
2. Download the example and unzip to /home/pi/

cd ~
wget https://files.waveshare.com/upload/f/f3/AT7600X_Cat_Hat_Demo.7z
sudo apt-get install p7zip-full
7z x AT7600X_Cat_Hat_Demo.7z   -r -o/home/pi
sudo chmod 777 -R /home/pi/AT7600X_Cat_Hat_Demo
  • TCP example.
  • LBS position example.
  • HTTP example.
  • MQTT example.
  • SSL example.
  • FTP example.

You need to set up the FTP server yourself.

  • TTS example: