Ks0287 keyestudio SIM5320E 3G Module (Black): Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 77: Line 77:
<br>[[File:Ks0287-9.png|500px|frameless|thumb]]<br>
<br>[[File:Ks0287-9.png|500px|frameless|thumb]]<br>
<br>[[File:Ks0287-10.png|500px|frameless|thumb]]<br>
<br>[[File:Ks0287-10.png|500px|frameless|thumb]]<br>
2、Connect to serial module via the serial port on J2, J6. RX pin is connected to STXD, TX to SRXD, GND to GND. Or directly connect to the computer via USB cable,                                then set the baud rate 115200, open the serial port,[[File:Ks0287-11.png|500px|frameless|thumb]], you can use the AT command.
1> After registering the network, first pass the AT command AT + CSDVC = 3,0 (open SIM5320E speakerphone function). Specific settings please refer to AT command introduction.
2> AT + COLP = 1 // Set to display the called number
3> AT + COLP = 1 // Set to display the caller ID
4> ATD32523094; / / make a call, the semicolon can not be less.
5> ATA // answer the call
6> ATH // hang up the phone
== SMS Function ==
1> AT + CPMS? // Check the storage capacity of short message in the SIM card
2> AT + CNMI = 2,1 // Set a new SMS prompt function
3> AT + CMGR = 10 // Read SMS
== TCP/IP Function ==
Before building TCP/IP connection, confirm the module has been registered the network and attach GPRS network. <br>
//preparations as below
AT+CSQ
//signal quality inquiry
+CSQ: 18,99
OK
AT+CPIN?
// SIM card status inquiry
+CPIN: READY
OK
AT+CGATT?
+CGATT: 1//GPRS attachment inquiry
OK
AT+CGSOCKCONT=1,"IP","cmnet"
//set APN
OK
AT+CSOCKSETPN=1
//no modification
OK
AT+CIPMODE=0
//set as non-serialnet mode                                                                                   
OK
AT+NETOPEN
OK
+NETOPEN: 0
AT+IPADDR
//get the local IP address
+IPADDR: 10.119.116.22
OK
AT+CIPOPEN=0,"TCP","118.190.93.84",2317
//only support IP address, not supporting domain name.
OK
+CIPOPEN: 0,0//connecting successfully
AT+CIPSEND=0,5
//send 5 bytes content
>12345// The content is sent automatically for 5 bytes. If less than 5 bytes, the module will wait. Extra 5 bytes, its back bytes are automatically discarded.
OK
+CIPSEND: 0,5,5
AT+CIPSEND=0,
//Do not specify a fixed length.
>1234556 // After the content is input, enter a hexadecimal 1A, close the content to start sending
OK
+CIPSEND: 0,9,9//send successfully
AT+CIPCLOSE=0
//send this command if need to close the connection.
OK
+CIPCLOSE: 0,0//close the connection
//UDP connecting way
AT+CIPOPEN=0,"UDP",,,9000
//9000 is local port, generally not need to be changed.
+CIPOPEN: 0,0
OK
AT+CIPSEND=0,5,"123.166.19.86",9015
//revise as server’s IP address, the second parameter is 5, fixedly sending 5 bytes.
>12345
OK
+CIPSEND: 0,5,5
AT+CIPSEND=0,,"123.166.19.86",9015
//The second parameter is empty, it needs to send a hexadecimal 1A after sending the content.
>123
OK
+CIPSEND: 0,5,5
</br>

Revision as of 08:57, 15 November 2017

keyestudio SIM5320E 3G Module (Black)


thumb

Description

keyestudio SIM5320E 3G module is a mobile phone module, it can be used for GPRS data transmission, supporting both Mobile and Unicom. This module has the function of GPS positioning, with the features of powerful functions and less external circuits,etc. When registering the network and RF multi-slot sending,the current consumption peak may reach 2A, which will inevitably lead to voltage sags, so the power system generally requires more than 2A current supply capability.

Interface Explanation

  • Power Supply: DC 5V 2A or above.
  • Communication Interface: a group of TTL-level serial port, compatible with 5V/3.3V microcontroller; with a USB interface, can be directly connected to the computer debugging.
  • GPS Antenna Interface: a group of IPXmini antenna interface, the default connecting to active GPS antenna.
  • GMS Antenna Interface: a group of IPXmini antenna interface, the default providing PCB antenna.
  • SIM Card Interface: drawer type
  • USB Interface: mini USB interface
  • Voice Mike Interface: Lead out, the interface is a 2.54 * 4P single row pin form.
  • Other Interfaces: a group of IIC interfaces, a group of interface can control the module’s opening and closing (the module default self-starting).
  • Indicator LEDs: one LED is used to indicate the working status of the module; another 0603 LED is used to indicate the network status.

Preparation

1、Insert the SIM card
2、J2: power supply DC 5V 2A
3、3G ANT interface: connecting 3G antenna
4、GPS ANT interface: connecting GPS antenna
5、Connecting to MICRO USB interface.
Done drive installation, it will build communication between USB and system,5 ports will be mapped on the system as follows:

  • USB Modem COM port:used to dial-up networking.
  • AT command COM port:used to process AT command.
  • NMEA COM port:used for GPS information output.
  • Diagnostics COM port:used for debugging, grab the log information of module.
  • Ethernet Adapter:not supporting.

1)Windows 7: 5 COM ports mapping shown in the below figure:


thumb

2)Linux: corresponding COM ports, such as:

      Device file simcom’s composite device;
      ttyUSB0 diag interface;
      ttyUSB1 nmea interface;
      ttyUSB2 at interface;
      ttyUSB3 modem interface;
      ttyUSB4 Wireless Ethernet Adapter interface.

3)Wince: corresponding COM ports, such as(only map out 3 com ports,ranging 1-9):

      "Index"=dword:X
      "FriendlyName"="SimTech HS-USB NMEA 9000"
      "Index"=dword:X
      "FriendlyName"="SimTech HS-USB ATCOM 9000"
      "Index"=dword:X
      "FriendlyName"="SimTech HS-USB Modem 9000"

COM Port Connection

1>. Send the AT command through the serial port on the J6 pin. Connect the RX pin of TTL level to STXD of module; TX is connected to SRXD; GND is connected to GND. Open the serial debugging software. Select the current port, set the baud rate to 115200. Specific as shown below:


thumb

Set up well as the above figure, then open the serial port, in the string text field input AT, click Send, it will show AT OK. It means that the communication between the computer and the module is normal.

2>. Communicate with the computer via the serial port on the USB interface. The settings are the same as the above figure except the COM port. The specific AT command port like thumb

GPS Testing

Before using the GPS function, you should first check whether the GPS function is enabled by using the AT command, or directly open the GPS function. Use AT + CGPS =1, getting feedback OK, as shown below, you can view the corresponding information through GPS software.


thumb

Select COM port like thumb , set baud rate to 115200. Setting well, open the serial port, you can see the related information about current positioning, including latitude, longitude, elevation and other information, as shown below.
thumb

thumb

Calling Function

1、First,on the J9 of module, connect speakers to SPKM and SPKP, connect MIC to MICN and MICP.

  Please refer to the corresponding circuit file like thumb


thumb

thumb

2、Connect to serial module via the serial port on J2, J6. RX pin is connected to STXD, TX to SRXD, GND to GND. Or directly connect to the computer via USB cable, then set the baud rate 115200, open the serial port,thumb, you can use the AT command.

1> After registering the network, first pass the AT command AT + CSDVC = 3,0 (open SIM5320E speakerphone function). Specific settings please refer to AT command introduction. 2> AT + COLP = 1 // Set to display the called number 3> AT + COLP = 1 // Set to display the caller ID 4> ATD32523094; / / make a call, the semicolon can not be less. 5> ATA // answer the call 6> ATH // hang up the phone

SMS Function

1> AT + CPMS? // Check the storage capacity of short message in the SIM card 2> AT + CNMI = 2,1 // Set a new SMS prompt function 3> AT + CMGR = 10 // Read SMS

TCP/IP Function

Before building TCP/IP connection, confirm the module has been registered the network and attach GPRS network.
//preparations as below AT+CSQ //signal quality inquiry +CSQ: 18,99 OK AT+CPIN? // SIM card status inquiry +CPIN: READY OK AT+CGATT? +CGATT: 1//GPRS attachment inquiry OK AT+CGSOCKCONT=1,"IP","cmnet" //set APN OK AT+CSOCKSETPN=1 //no modification OK AT+CIPMODE=0 //set as non-serialnet mode OK AT+NETOPEN OK +NETOPEN: 0 AT+IPADDR //get the local IP address +IPADDR: 10.119.116.22 OK AT+CIPOPEN=0,"TCP","118.190.93.84",2317 //only support IP address, not supporting domain name. OK +CIPOPEN: 0,0//connecting successfully AT+CIPSEND=0,5 //send 5 bytes content >12345// The content is sent automatically for 5 bytes. If less than 5 bytes, the module will wait. Extra 5 bytes, its back bytes are automatically discarded. OK +CIPSEND: 0,5,5 AT+CIPSEND=0, //Do not specify a fixed length. >1234556 // After the content is input, enter a hexadecimal 1A, close the content to start sending OK +CIPSEND: 0,9,9//send successfully AT+CIPCLOSE=0 //send this command if need to close the connection. OK +CIPCLOSE: 0,0//close the connection //UDP connecting way AT+CIPOPEN=0,"UDP",,,9000 //9000 is local port, generally not need to be changed. +CIPOPEN: 0,0 OK AT+CIPSEND=0,5,"123.166.19.86",9015 //revise as server’s IP address, the second parameter is 5, fixedly sending 5 bytes. >12345 OK +CIPSEND: 0,5,5 AT+CIPSEND=0,,"123.166.19.86",9015 //The second parameter is empty, it needs to send a hexadecimal 1A after sending the content. >123 OK +CIPSEND: 0,5,5