background image

Copyright © Shenzhen Rakwireless Technology Co., Ltd

ETDX1602241830

50

RAK475 Instruction manual

4.7.8

Query IP inFormation

Command

at+ipconfig\r\n

Description

Query the current module’s MAC address inFormation, IP address, subnet

mask, gateway, DNS server, etc., if the DHCP is not assigned while setting; check out
the module address of 127.0.0.1.

Parameter instruction

NULL

Instruction for returned value

Parameter

Format

Length(byte)

Instruction

The command is successfully carried out

OK

ASCII

2

success query

<MAC>

HEX

6

module’s MAC address

<IP>

HEX

4

module’s IP address

<NETMASK>

HEX

4

module’s subnet mask

<GATEWAY>

HEX

4

gateway

<DNS SERVER1>

HEX

4

DNS server 1

<DNS SERVER2>

HEX

4

DNS server 2

\r\n

ASCII

2

End character

The command is unsuccessfully carried out

ERROR

ASCII

5

ERROR

<CODE>

HEX

1

0XFC=-2 query failed

Summary of Contents for RAK475 UART

Page 1: ...Ltd www rakwireless com info rakwireless com RAK copyright All rights reserved Companies and product names referred in the instruction belong to trademarks of their respective owners Any part of this...

Page 2: ...uration 24 4 Aided AT commands 26 4 1 Basic flow chart 26 4 2 AT command set 27 4 3 Command Format 28 4 4 Enter into aided commands 29 4 5 Module management instruction 31 4 5 1 Open ASCII display 31...

Page 3: ...7 4 10 Command for setting the certificate 58 4 10 1 Set ssl security certificate 58 4 11 InFormation storage commands for the user networking list 60 4 11 1 Read the number of current list 60 4 11 2...

Page 4: ...sion WIFI module External Interface Micro USB Input power supplied DC5V communication interface of USB to serial port Key Reset Module reset key WPS MODE WPS function is to instantly configured to the...

Page 5: ...ory Defaults for the module when the configuration is made by mistakes or the current configuration parameters are forgotten Press the Default key for over 3 seconds the indicator lamp Link and Status...

Page 6: ...If the status light is not on after powering on please try to press the Reset key If the light is always off please contact the After Sale Service Under the Factory Defaults mode of the module an open...

Page 7: ...the authenticated user name and PIN admin by default Figure 1 2 WEB webpage authentication 2 You can see the WEBSever interface with the built in module Figure 1 3 WEB webpage module status 3 The seri...

Page 8: ...sion data test 1 Open the serial port tools select the COM port connected to the module The default baud rate is 115200 data bit is 8 stop bit is 1 with no parity no flow control Open network debuggin...

Page 9: ...Establish TCP Client 2 After TCP is connected the data can be sent to each other At this time the serial port of the module is changed into the virtual serial port of the network and the serial port...

Page 10: ...es ultra low power consumption flexible usages it can meet various customer s requirements provide various test reports allow the customer to quickly start so as to reduce the research and development...

Page 11: ...transparent transmission supplemented by AT commands Support the UART communication with the data flow the maximum baud rate is 921600bps Support various configuration tools and the module can be con...

Page 12: ...s as AP access point at this time the module has independent network name fixed IP address etc The Factory Defaults mode ensures the recovery of the module so as to avoid the problems caused by users...

Page 13: ...for example 192 168 7 1 Under the STA mode add the router if IP address is automatically gotten the module can get the address from the home page s status bar via the coexisting AP it can access WEB s...

Page 14: ...Copyright Shenzhen Rakwireless Technology Co Ltd ETDX1602241830 14 RAK475 Instruction manual Figure 3 1 Module status page Figure 3 2 Module navigation page...

Page 15: ...ter the name and password of the router can be filled in for general settings select DHCP It is mainly used in local area network service and can also carry out the remote data application AP STA mode...

Page 16: ...igurations Router SSID The name length of the router is less than 32 bit Click add network you can select router name to connect from the scanning list sent back by the module click OK then the web pa...

Page 17: ...s of the router is the only parameter to confirm the router which is used to differentiate the same router name if you do not specify the same router or not to use it can be ignored fill in 0 Whether...

Page 18: ...Copyright Shenzhen Rakwireless Technology Co Ltd ETDX1602241830 18 RAK475 Instruction manual Figure 3 4 Parameters page of the module STA Figure 3 5 Module STA adds the network page...

Page 19: ...r TCP timeout and other parameters The module supports two communication Sockets SocketA can act as one of the five secure connections namely the TCP server TCP client UDP server UDP client TLS SSL se...

Page 20: ...nection is abnormally disconnected the module can be automatically restored The time range of the parameter is 1 to 600 seconds TCP reconnection interval settings can set delay time for the second con...

Page 21: ...3 7 TLS SSL Set page 3 2 4 Certificate management Certificate management interface can upload CA certificate client certificate and client private key file The status of the certificate is divided int...

Page 22: ...being the host name of the module can be displayed in the connected router In the equipment management the restart and recovering Factory Defaults parameters function buttons are provided Figure 3 9 A...

Page 23: ...odule click on the scan to find module choose the firm ware to upgrade click start to upgrade waiting for the upgrading to complete Figure 3 11 PC wireless upgrading page 3 3 App wireless configuratio...

Page 24: ...twork and can also find and upgrade the module in the same network The following demonstrates the instant configuration of RAK475 connect to the 2 4 required to configured open the software and choose...

Page 25: ...Copyright Shenzhen Rakwireless Technology Co Ltd ETDX1602241830 25 RAK475 Instruction manual Figure 3 13 Instant configuration page...

Page 26: ...also provides an auxiliary command mode in order to manage and query the parameters for the module Module interpret based on the MODE pin level high level by default and enter into the transparent tr...

Page 27: ...n at read_config r n Read the user configuration at read_restoreconfig r n Read Factory Defaults at write_restoreconfig Configure the parameter length and parameter of r n Modify the Factory Defaults...

Page 28: ...rt cert_type file_len data_strea m r n Set ssl security certificate InFormation storage commands for the user networking list at read_userlist_num r n Read the inFormation number of current list at re...

Page 29: ...is hexadecimal system code ERROR r n HEX 45 52 52 4F 52 FE 0D 0A code 0XFE AT command Format instruction AT command begins with at all are lowercase and ends with r n the maximum command length of 80...

Page 30: ...il the module successfully return U 0x55 It shows that the module is ready to enter into the command mode waiting for final confirmation waiting for 3 seconds 3 Timing for 200ms wait for the module to...

Page 31: ...mand There is no need to open while programming Parameter instruction Parameter Parameter value Instruction mode 0 Prohibit conversion 1 Open conversion Instruction for returned value Parameter Format...

Page 32: ...n NULL Instruction for returned value Parameter Format Length byte Instruction The command is successfully carried out OK ASCII 2 OK MAC HEX 6 MAC address r n ASCII 2 End character The command is unsu...

Page 33: ...r n ASCII 2 End character The command is unsuccessfully carried out ERROR ASCII 5 ERROR CODE HEX 1 For details see ERROR list r n ASCII 2 End character Remarks 4 5 4 Query the software version Comman...

Page 34: ...K STRING Character string r n ASCII 2 End character The command is unsuccessfully carried out ERROR ASCII 5 ERROR CODE HEX 1 For details see ERROR list r n ASCII 2 End character Remarks 4 5 5 Reset to...

Page 35: ...e ERROR list r n ASCII 2 End character Remarks 4 5 6 Reset to Factory Defaults Command at restore r n Description Recover the module parameters to the Factory Defaults parameters Parameter instruction...

Page 36: ...ata_length data_stream r n Description Write the user configuration parameters with one step the user send all the configuration parameters to the module at one time Including network model network pa...

Page 37: ...ction The command is successfully carried out OK ASCII 2 The reset is successful r n ASCII 2 End character The command is unsuccessfully carried out ERROR ASCII 5 ERROR CODE HEX 1 For details see ERRO...

Page 38: ...gateway 0 0 0 0 sta_dns1 0 0 0 0 sta_dns2 0 0 0 0 r n Instruction for returned value Parameter Format Length byte Instruction The command is successfully carried out OK ASCII 2 OK STRING Character str...

Page 39: ...s unsuccessfully carried out ERROR ASCII 5 ERROR CODE HEX 1 For details see ERROR list r n ASCII 2 End character Remarks 4 6 4 Read Factory Defaults Command at read_restoreconfig r n Descripion Read F...

Page 40: ...s Command at write_restoreconfig data_length data_stream r n Description Read Factory Defaults parameters configuration of the module returning structure is the same with reading user s configuration...

Page 41: ...haracter Remarks 4 7 AP STA operating instruction 4 7 1 Query the connection status of STA Command at con_status r n Description If the module works under the STA mode the command will be used for the...

Page 42: ...2 End character Remarks 4 7 2 Query the connection status of AP Command at ap_status r n Description If the module works under the AP mode the command will be used for determining the connection statu...

Page 43: ...marks 4 7 3 The wireless signal intensity of STA Command at rssi r n Description Querying the wireless network intensity under STA mode will be effective Parameter instruction NULL Instruction for ret...

Page 44: ...escription Scan the wireless network through this command and access the wireless inFormation including encryption inFormation channel signal strength BSSID etc Parameter instruction The scan command...

Page 45: ...e network name of RAKwireless in channel 8 at scan 6 r n Scan all the SSID in channel 6 Instruction for returned value If the command is executed successfully then it returns OK and the number of wire...

Page 46: ...mmand this command must be called after the at scan scan wireless network command Note If the wireless network inFormation is not required the command can be omitted Scanned inFormation has been read...

Page 47: ...returned value Parameter Format Length byte Instruction The command is successfully carried out OK ASCII 2 Get the inFormation correctly SSID HEX 33 SSID BSSID HEX 6 BSSID CHANNEL HEX 1 Channel RSSI...

Page 48: ...at easy_config r n Description Send the command the module enters into an instant configuration mode waiting for the phone to send configuration inFormation Customers can query whether the network is...

Page 49: ...sing the router s WPS button generally WPS s configuration timeout period is 2 minutes Customers can query whether the network is connected or not through querying network status command Instruction f...

Page 50: ...k out the module address of 127 0 0 1 Parameter instruction NULL Instruction for returned value Parameter Format Length byte Instruction The command is successfully carried out OK ASCII 2 success quer...

Page 51: ...Indicated host COUNT Quantity of the data packets with default value of 1 optional SIZE Size of data packet the maximum data packet has 1000bytes with default value of 64bytes optional For example at...

Page 52: ...ucture Example OKwlan_mode 2 sta_ssid RAK_2 4GHz sta_bssid 8C 21 0A D9 EB 7B sta_se c_mode 1 sta_psk rakwireless205 sta_dhcp 1 sta_ip 192 168 1 119 sta_netm ask 255 255 255 0 sta_gateway 192 168 1 1 s...

Page 53: ...and with the maximum data length of 1024 wherein data_stream can be any Format of the data the module will keep the original data and send without carrying out any process If the connection is a TCP c...

Page 54: ...h the identifier of 0 the data content is ABCD Instruction for returned value Parameter Format Length b yte Instruction The command is successfully carried out OK ASCII 2 The data was sent successfull...

Page 55: ...programming If socket is set to the UDP type the UDP receives a packet of less than 1024B per packet Most of them will be discarded UDP sending end need to set the sending packet s maximum length Para...

Page 56: ...Write data to NVM Command at nvm_write addr len data r n Description Write data to the indicated address in NVM via the command The command includes three parameters the scope of addr is 0 to 160K len...

Page 57: ...n The command is successfully carried out OK ASCII 2 Open successfully r n ASCII 2 End character The command is unsuccessfully carried out ERROR ASCII 5 ERROR CODE HEX 1 0XFE 2 Data write failed r n A...

Page 58: ...r Format Length byte Instruction The command is successfully carried out OK ASCII 2 Open successfully data_length HEX 2 Length of actually returned data data_stream HEX data_length Data r n ASCII 2 En...

Page 59: ...0 SSL Client Private Key 1 SSL Client Certificate 2 SSL CA Certificate file_len 4 1024 Certificate length Instruction for returned value Parameter Forma t Length byte Instruction The command is succes...

Page 60: ...saved networking inFormation list Parameter instruction NULL Instruction for returned value Parameter Format Length byte Instruction The command is successfully carried out OK ASCII 2 OK NUM HEX 1 Lis...

Page 61: ...list to read the networking inFormation For example OKsta_ssid RAK_2 4GHz sta_sec_mode 1 sta_psk rakwireless205 sta_bssid 8C 21 0A D9 EB 7B r n Instruction for returned value Parameter Format Length...

Page 62: ...rameter value Instruction index 0 4 Indicate the list to read the networking inFormation len Data length The data length of the networking inFormation data data networking inFormation For example at w...

Page 63: ...icated lists Command at delete_userlist index r n Description Delete the networking inFormation in the current list Parameter instruction Parameter Parameter value Instruction index 0 4 Indicate the l...

Page 64: ...de r n to the module and request to enter into the upgrading mode 2 Until the command is executed successfully the module returns OK the host computer host MCU sends u to confirm entering into the upg...

Page 65: ...less Technology Co Ltd ETDX1602241830 65 RAK475 Instruction manual r n ASCII 2 End character The command is unsuccessfully carried out ERROR ASCII 5 ERROR CODE HEX 1 Invalid stored inFormation r n ASC...

Page 66: ...1 13 ap_sec_mode 0 No encryption 1 Encryption ap_psk 1234567890 The PIN is between 8B and 32B ap_ip 192 168 7 1 ap_bdcast 0 No broadcast 1 Broadcast ap_max_clts The maximum connection number of AP Th...

Page 67: ...uart_rtscts_en 0 disable 1 enable uart_timeout 5 Timeout time unit for the serial port to be frame ms The serial port is recommended to send interval per 10ms the minimum interval is 5ms uart_recvlen...

Page 68: ...le 1 enable When the user is configured from the Factory Defaults parameter to the user parameter the configured router is not able to connect switch to the Factory Defaults parameter last_user_switch...

Page 69: ...rtificate is enabled socketA_tls_clt 0 disable 1 enable Tls client certificate is enabled socketA_max_clts 2 The maximum connecting number of Tcp server The maximum number is 4 socketA_localport 25000...

Page 70: ...localport 25001 1 65535 socketB_destip 192 168 1 101 socketB_destport 25001 1 65535 socketB_tcp_timeou t 0 disable 1 600 valid TCP idle timeout time unit s socketB_tcp_reconv al 0 disable 1 600 valid...

Page 71: ...Copyright Shenzhen Rakwireless Technology Co Ltd ETDX1602241830 71 RAK475 Instruction manual 6 Version Version Date Modified records V1 0 2016 3 1 Create a document V1 1 2016 5 6 Add sections 3 3 3 4...

Reviews: