Microchip Technology RN2483 LoRa Скачать руководство пользователя страница 1

 2015-2018 Microchip Technology Inc.

DS40001784G

RN2483 LoRa

®

 Technology

Module Command Reference

User’s Guide

Содержание RN2483 LoRa

Страница 1: ... 2015 2018 Microchip Technology Inc DS40001784G RN2483 LoRa Technology Module Command Reference User s Guide ...

Страница 2: ...p received ISO TS 16949 2009 certification for its worldwide headquarters design and wafer fabrication facilities in Chandler and Tempe Arizona Gresham Oregon and design centers in California and India The Company s quality system processes and procedures are for its PIC MCUs and dsPIC DSCs KEELOQ code hopping devices Serial EEPROMs microperipherals nonvolatile memory and analog products In additi...

Страница 3: ... set pindig pinName pinState 18 2 3 5 3 sys set pinmode pinname pinmode 18 2 3 6 System Get Commands 19 2 3 6 1 sys get ver 19 2 3 6 2 sys get nvm address 19 2 3 6 3 sys get vdd 19 2 3 6 4 sys get hweui 20 2 3 6 5 sys get pindig pinname 20 2 3 6 6 sys get pinana pinName 20 2 4 MAC Commands 21 2 4 1 mac reset band 21 2 4 2 mac tx type portno data 22 2 4 3 mac join mode 24 2 4 4 mac save 25 2 4 5 ma...

Страница 4: ... adr 37 2 4 9 2 mac get appeui 37 2 4 9 3 mac get ar 38 2 4 9 4 MAC Get Channel Commands 38 2 4 9 5 mac get class 40 2 4 9 6 mac get dcycleps 40 2 4 9 7 mac get devaddr 40 2 4 9 8 mac get deveui 40 2 4 9 9 mac get dnctr 40 2 4 9 10 mac get dr 40 2 4 9 11 mac get gwnb 41 2 4 9 12 mac get mcast 41 2 4 9 13 mac get mcastdevaddr 41 2 4 9 14 mac get mcastdnctr 41 2 4 9 15 mac get mrgn 41 2 4 9 16 mac g...

Страница 5: ... 6 radio get crc 52 2 5 6 7 radio get fdev 52 2 5 6 8 radio get freq 52 2 5 6 9 radio get iqi 53 2 5 6 10 radio get mod 53 2 5 6 11 radio get prlen 53 2 5 6 12 radio get pwr 53 2 5 6 13 radio get rssi 53 2 5 6 14 radio get rxbw 53 2 5 6 15 radio get sf 54 2 5 6 16 radio get snr 54 2 5 6 17 radio get sync 54 2 5 6 18 radio get wdt 54 Chapter 3 Bootloader Usage 3 1 Bootloader Hosts 55 3 2 Protocol 5...

Страница 6: ...tion on the commands used to configure the RN2483 module with examples Chapter 3 Bootloader Usage Gives further information on the bootloader usage and protocol commands Appendix A Current Firmware Features and Fixes Provides information on the release notes for each revision of the firmware NOTICE TO CUSTOMERS All documentation becomes dated and this manual is no exception Microchip tools and doc...

Страница 7: ...s A dialog button Click OK A tab Click the Power tab N Rnnnn A number in verilog format where N is the total number of digits R is the radix and n is a digit 4 b0010 2 hF1 Text in angle brackets A key on the keyboard Press Enter F1 Courier New font Plain Courier New Sample source code define START Filenames autoexec bat File paths c mcc18 h Keywords _asm _endasm static Command line options Opa Opa...

Страница 8: ...at http www lora alliance org To obtain any of Microchip s documents visit the Microchip website at www microchip com THE MICROCHIP WEBSITE Microchip provides online support via our website at www microchip com This website is used as a means to make files and information easily available to customers Acces sible by using your favorite Internet browser the website contains the following infor mati...

Страница 9: ...t Debuggers The latest information on the Microchip in circuit debuggers This includes MPLAB ICD 4 and PICkit 4 in circuit debuggers MPLAB IDE The latest information on Microchip MPLAB IDE the Windows Integrated Development Environment for development systems tools This list is focused on the MPLAB IDE MPLAB IDE Project Manager MPLAB Editor and MPLAB SIM simulator as well as general editing and de...

Страница 10: ... section 2 4 9 16 and Figure 2 1 added A 3 section Other minor corrections Revision E February 2016 Removed Version 1 0 2 in section A 4 Other minor corrections Revision F March 2017 Added Chapter 3 Bootloader Usage Other minor corrections Revision G September 2018 Updated Note in section 1 4 Updated section 2 2 and Table 2 4 Added a new Note box in section 2 3 6 6 Updated 2 4 4 and 2 4 6 Updated ...

Страница 11: ... can be configured through the UART interface A simple use case is described in Figure 1 1 where an end device containing a host MCU which reads a sensor commands the RN2483 to transmit the sensor reading over the LoRa network Data are encrypted by the RN2483 and the radio packet is received by one or multiple gateways which forward it to the network server The network server sends the data to the...

Страница 12: ...uration and control using the mac group of commands Low level radio configuration and control using the radio group of commands Other module functions using the sys group of commands FIGURE 1 2 RN2483 COMMAND INTERFACE YELLOW AND ITS RELATIONSHIP TO THE MODULE S INTERNAL COMPONENTS The available commands can be used to configure and control the LoRaWAN protocol layer the radio driver and some syst...

Страница 13: ...equence of the module To do this the host system needs to transmit a Break condition to the module followed by a 0x55 character at the new baud rate The auto baud detection mechanism can also be triggered during sleep to wake the module up before the predetermined time has expired Note A break condition is signaled to the module by keeping the UART_RX pin low for longer than the time to transmit a...

Страница 14: ...RN2483 LoRa Technology Module Command Reference User s Guide DS40001784G page 14 2015 2018 Microchip Technology Inc NOTES ...

Страница 15: ...orm refer to the command description for the expected form For example when configuring the frequency the command expects a decimal value in Hertz such as 868100000 868 1 MHz Alternatively when configuring the LoRaWAN device address the hex value is entered into the parameter as aabbccdd To enter a number in hex form use the value directly For example the hex value 0xFF would be entered as FF 2 2 ...

Страница 16: ... not_joined silent err Note To facilitate the sharing of the radio between user custom applications and the LoRaWAN MAC refer to the mac pause and mac resume commands Since no sharing exists between sys and other types of commands there is no need for additional pause commands TABLE 2 2 SYSTEM COMMANDS Parameter Description sleep Puts the system in sleep for a finite number of milliseconds reset R...

Страница 17: ... format HW FW Date Time Date and Time refer to the release of the firmware This command resets and restarts the RN2483 module stored LoRaWAN protocol settings will be loaded automatically upon reboot Example sys reset Resets and restarts the RN2483 module 2 3 3 sys eraseFW Response no response This command deletes the current RN2483 module application firmware and prepares it for firmware upgrade ...

Страница 18: ...he parameters pinname pinstate are not valid This command allows the user to modify the unused pins available for use by the module The selected pinname is driven high or low depending on the desired pinstate Default GPIO0 GPIO13 UART_CTS UART_RTS TEST0 and TEST1 are driven low value 0 Example sys set pindig GPIO5 1 Drives GPIO5 high 1 VDD 2 3 5 3 sys set pinmode pinname pinmode pinname string rep...

Страница 19: ...rom 300 to 3FF Response 00 FF hexadecimal value from 00 to FF if the address is valid invalid_param if the address is not valid This command returns the data stored in the user EEPROM of the RN2483 module at the requested address location Example sys get nvm 300 Returns the 8 bit hex value stored at 300 2 3 6 3 sys get vdd Response 0 3600 decimal value from 0 to 3600 This command informs the RN248...

Страница 20: ... Reads the state of the GPIO0 digital input 2 3 6 6 sys get pinana pinname pinname string representing the pin Parameters can be GPIO0 GPIO3 GPIO5 GPIO13 Response decimal number representing the result of the conversion from 0 to 1023 where 0 represents 0V and 1023 is VDD the supply voltage of the module This command allows the user to read the state of an analog input To be used as an analog inpu...

Страница 21: ...he RN2483 module to a specific frequency band tx Sends the data string on a specified port number and sets default values for most of the LoRaWAN parameters join Informs the RN2483 module to join the configured network save Saves LoRaWAN Class A configuration parameters to the user EEPROM forceENABLE Enables the RN2483 module after the LoRaWAN network server commanded the end device to become sile...

Страница 22: ...as paused and not resumed back invalid_data_len if application payload length is greater than the maximum application payload length corresponding to the current data rate Response after the first uplink transmission attempt mac_tx_ok if uplink transmission was successful and no downlink data was received back from the server mac_rx portno data if transmission was successful portno port number fro...

Страница 23: ...e Pending bit The module will display the second response mac_rx 1 AC The module will initiate an automatic uplink unconfirmed transmission with no application payload on the first free channel because the Frame Pending bit was set in the downlink transmission The server will send back the second confirmed packet 0xAF The module will display a third response mac_rx 1 AF The module will initiate an...

Страница 24: ...ding to the Join mode otaa or abp were not configured no_free_ch if all channels are busy silent if the device is in a Silent Immediately state busy if MAC state is not in an Idle state mac_paused if MAC was paused and not resumed back Response after the join procedure denied if the join procedure was unsuccessful the module attempted to join the network but was rejected accepted if the join proce...

Страница 25: ...e Range status Status class LoRaWAN operating Class devaddr End Device Address deveui End Device Identifier dnctr Downlink Frame Counter dr Data Rate join flags Join parameter flags appeui Application Identifier set appmultiskey Application Multicast Session Key set appskey Application Key set devaddr End Device Address set deveui End Device Identifer set devmultiskey End Device Multicast Session ...

Страница 26: ...sed without affecting the LoRaWAN functionality The maximum value 4294967295 is returned whenever the LoRaWAN stack functionality is in Idle state and the transceiver can be used without restrictions 0 is returned when the LoRaWAN stack functionality cannot be paused For example when operating in LoRaWAN Class C mode the receiver is continuously in receive The mac pause command will return 0 indic...

Страница 27: ...f the downlink frame counter that will be used for the next downlink reception dr Sets the data rate to be used for the next transmissions linkchk Sets the time interval for the link check process to be triggered mcast Sets the Multicast state to on or off mcastappskey Sets the multicast application session key mcastdevaddr Sets the multicast network device address mcastdnctr Sets the value of the...

Страница 28: ...e automatic reply process inside the module 2 4 8 4 mac set bat level level decimal number representing the level of the battery from 0 to 255 0 means external power 1 means low level 254 means high level 255 means the end device was not able to measure the battery level Response ok if the battery level is valid invalid_param if the battery level is not valid This command sets the battery level re...

Страница 29: ...t needs to be configured can be obtained from the actual duty cycle X in percentage using the following formula dutyCycle 100 X 1 The default settings consider only the three default channels 0 2 and their default duty cycle is 0 33 If a new channel is created either by the server or by the user all the channels including the default ones must be updated by the user in terms of duty cycle to compl...

Страница 30: ...ation Example mac set ch drrange 13 0 2 Using EU863 870 band on channel 13 the data rate can range from 0 SF12 125 kHz to 2 SF10 125 kHz as required 2 4 8 5 4 mac set ch status channelID status channelID decimal number representing the channel number from 0 to 15 status string value representing the state either on or off Response ok if parameters are valid invalid_param if parameters are not vali...

Страница 31: ...the current network This must be directly set solely for activation by personalization devices This parameter must not be set before attempting to join using over the air activation because it will be overwritten once the join process is over Example mac set devaddr ABCDEF01 2 4 8 8 mac set deveui devEUI devEUI 8 byte hexadecimal number representing the device EUI Response ok if address is valid i...

Страница 32: ... 5 On EU863 870 SF7 125 kHz 2 4 8 11 mac set linkchk linkCheck linkCheck decimal number that sets the time interval in seconds for the link check process from 0 to 65535 Response ok if the time interval is valid invalid_param if the time interval is not valid This command sets the time interval for the link check process to be triggered periodically A value of 0 will disable the link check process...

Страница 33: ...cast application session key used when the network sends a multicast message from an application Example mac set mcastappskey 29100192AFBECD564738837465FAEBDC 2 4 8 14mac set mcastdevaddr mcastAddress mcastAddress 4 byte hexadecimal number representing the device multicast address from 00000000 FFFFFFFF Response ok if address is valid invalid_param if the address is not valid This command configur...

Страница 34: ...ty for communication between the module and mul ticast network server Example mac set mcastnwkskey 6AFBECD1029384755647382910DACFEB 2 4 8 17 mac set nwkskey nwkSessKey nwkSessKey 16 byte hexadecimal number representing the network session key Response ok if key is valid invalid_param if key is not valid This command sets the network session key for the module This key is 16 bytes in length and pro...

Страница 35: ...255 Response ok if retx is valid invalid_param if retx is not valid This command sets the number of retransmissions to be used for an uplink confirmed packet if no downlink acknowledgment is received from the server Example mac set retx 5 The number of retransmissions made for an uplink confirmed packet is set to 5 2 4 8 20 mac set rx2 dataRate frequency dataRate decimal number representing the da...

Страница 36: ...nchWord one byte long hexadecimal number representing the synchronization word for the LoRaWAN communication Response ok if parameters are valid invalid_param if parameter is not valid This command sets the synchronization word for the LoRaWAN communication The configuration of the synchronization word should be in concordance with the Gateway configuration Example mac set sync 34 Synchronization ...

Страница 37: ...ts the current stored unique network device address for that specific end device deveui Gets the current stored globally unique identifier for that specific end device dnctr Gets the value of the downlink frame counter that will be used for the next downlink reception dr Gets the data rate to be used for the next transmission gwnb Gets the number of gateways that successfully received the last Lin...

Страница 38: ...ified channel ID status Gets the status for the specified channel ID to indicate if it is enabled for use TABLE 2 10 DEFAULT PARAMETERS FOR CHANNELS Channel Number Parameters Frequency band 868 433 Channel 0 Frequency Hz 868100000 433175000 Duty cycle 1 302 302 Data rate range 0 5 0 5 Status On On Channel 1 Frequency Hz 868300000 433375000 Duty cycle 1 302 302 Data rate range 0 5 0 5 Status On On ...

Страница 39: ...00 99 1 1 2 4 9 4 3 mac get ch drrange channelID channelID decimal number representing the channel number from 0 to 15 Response decimal number representing the minimum data rate of the channel from 0 to 7 and a decimal number representing the maximum data rate of the channel from 0 to 7 This command returns the allowed data rate index range on the requested channelID entered in decimal form The mi...

Страница 40: ...FFFF This command will return the current end device address of the module Default 00000000 Example mac get devaddr 2 4 9 8 mac get deveui Response 8 byte hexadecimal number representing the device EUI This command returns the globally unique end device identifier as set in the module Default pre programmed EUI node address Example mac get deveui 2 4 9 9 mac get dnctr Response decimal number repre...

Страница 41: ...t multicast end device address of the module Default 00000000 Example mac get mcastdevaddr 2 4 9 14 mac get mcastdnctr Response decimal number representing the value of the downlink frame counter that will be used for the next multilink downlink reception from 0 to 4294967295 This command will return the value of the downlink frame counter that will be used for the next downlink reception Default ...

Страница 42: ... window Default 0 869525000 for 868 band 0 434665000 for 433 band Example mac get rx2 868 2 4 9 19 mac get rxdelay1 Response decimal number representing the interval in milliseconds for rxdelay1 from 0 to 65535 This command will return the interval in milliseconds for rxdelay1 Default 1000 Example mac get rxdelay1 2 4 9 20 mac get rxdelay2 Response decimal number representing the interval in milli...

Страница 43: ...d 0 not updated 1 updated via LinkADRReq MAC command 3 Prescaler updated 0 not updated 1 updated via DutyCycleReq MAC command Second Receive window parameters updated 0 not updated 1 updated RX ParamSetupReq command RX timing setup updated 0 not updated 1 updated via RX TimingSetupReq MAC command Note 1 Bits 11 Channels updated 12 Output power updated 13 NbRep updated 14 Prescaler updated 15 Secon...

Страница 44: ...se rxstop This command causes the radio to exit Continuous Receive mode set This command allows modification to the radio setting directly This command allows for the user to change the method of radio operation within module type band limits get This command grants the ability to read out radio settings as they are currently configured Note 1 The mac pause command must be called before any radio ...

Страница 45: ... continuous Receive mode 2 5 2 radio tx data data hexadecimal value representing the data to be transmitted from 0 to 255 bytes for LoRa modulation and from 0 to 64 bytes for FSK modulation Response this command may reply with two responses The first response will be received immediately after entering the command If the command is valid ok reply received a second reply will be received after the ...

Страница 46: ...op command Example radio rxstop Note In order to meet ETSI regulations in the given frequency bands the radio has to use either Listen Before Talk LBT Adaptive Frequency Agility AFA or duty cycle limitations By issuing the radio tx data command the module does not perform LBT before transmission thus the user has to make sure that duty cycle limits are not violated For more information on duty cyc...

Страница 47: ... 0 5 0 3 Response ok if the data shaping is valid invalid_param if the data shaping is not valid This command modifies the data shaping applied to FSK transmissions Entering any gfBT other than none will result in a Gaussian Filter BT being applied to transmissions in FSK mode Example radio set bt none Data shaping in FSK mode is disabled or null TABLE 2 13 RADIO SET COMMANDS Parameter Description...

Страница 48: ...he state is valid invalid_param if the state is not valid This command enables or disables the CRC header for communications Example radio set crc on Enables the CRC header 2 5 5 7 radio set fdev freqDev freqDev decimal number representing the frequency deviation from 0 to 200000 Response ok if the frequency deviation is valid invalid_param if frequency deviation is not valid This command sets the...

Страница 49: ...ower is not valid This command changes the transceiver output power However note that the transceiver is designed to transmit a maximum of 14 dBm It is possible to set the output power above the regulatory limits This power setting allows some compensation on the cable or transmission line loss For more details on output power please check the RN2483 Low Power Long Range LoRa Technology Transceive...

Страница 50: ...l number representing the time out length for the Watchdog Timer from 0 to 4294967295 Set to 0 to disable this functionality Response ok if the watchdog time out is valid invalid_param if the watchdog time out is not valid This command updates the time out length in milliseconds applied to the radio Watchdog Timer If this functionality is enabled then the Watchdog Timer is started for every transc...

Страница 51: ...a shaping applied to FSK transmissions Default 0 5 Example radio get bt Reads the current data shaping FSK configuration TABLE 2 14 RADIO GET COMMANDS Parameter Description afcbw Get the value used by the automatic frequency correction bandwidth bitrate Get the frequency shift keying FSK bit rate bt Get the data shaping for frequency shift keying FSK modulation type bw Get the value used for the r...

Страница 52: ...back the current coding rate transceiver settings 2 5 6 6 radio get crc Response string representing the status of the CRC header either on or off This command reads back the status of the CRC header to determine if it is to be included during operation Default on Example radio get crc Reads back if the CRC header is enabled for use 2 5 6 7 radio get fdev Response signed decimal representing the f...

Страница 53: ...for communication Default 8 Example radio get prlen Reads back the preamble length used by the transceiver 2 5 6 12 radio get pwr Response signed decimal representing the current power level from 3 to 15 This command reads back the current power level settings used in operation Default 1 Example radio get pwr Reads back the current transmit output power 2 5 6 13 radio get rssi Response decimal rep...

Страница 54: ...eived packet Default 128 Example radio get snr Reads back the measured SNR for the previously packet reception 2 5 6 17 radio get sync Response hexadecimal number representing the synchronization word used for radio communication This command reads back the configured synchronization word used for radio communication One byte long synchronization word is used for the LoRa modulation while up to ei...

Страница 55: ...he RN2483 module for example during development Microchip has a bootloader host application that can be used The bootloader on the RN2483 module is based on the Microchip s standard 8 bit UART bootloader This document describes the specifics of the RN2483 bootloader implementation The RN2483 module bootloader is invoked automatically when the firmware becomes corrupted or if the firmware is erased...

Страница 56: ...n an Erase or Write command is issued the two key fields must be supplied with correct values For read operations they key fields are not used The values of the keys are always Key1 0x55 Key2 0xaa General Differences from 8 Bit Bootloader Module bootloader only uses the first length byte and ignores the second length byte in all commands The protocol still requires that the second length byte be s...

Страница 57: ...ODULE BOOTLOADER COMMANDS Byte 0 1 2 3 4 5 6 7 8 9 Fields 0x55 CMD Len 0x00 Key1 Key2 Address LSB MSB TABLE 3 4 GET VERSION INFO Byte 0 1 2 3 4 5 6 7 8 9 Values 0x55 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 TABLE 3 5 GET VERSION INFO COMMAND BYTES Byte Value 0 Bootloader version low byte 1 Bootloader version high byte 2 Max packet size low byte not used 3 Max packet size high byte not used 4 A...

Страница 58: ...at Address for a length of Len bytes If Len is odd 1 is added to make Len even The checksum algorithm treats the Flash memory as an array of 16 bit values during the calculation which is not performed byte by byte In MPLAB X this is known as Checksum Algorithm 2 Response calculate and return checksum command modified CSumLSB CSumMSB Status is either a 0 indicating that the command failed or a 1 in...

Страница 59: ...firmware checksum from the bootloader Compare to the value calculated by the host application Calculate and return Flash checksum Table 3 8 Reset the device Table 3 9 3 5 2 Using Bootloader with a PC Host This section describes using the Microchip LoRa Development Utility software application on a PC to update the firmware of the RN2483 module As of this writing the current version of the Microchi...

Страница 60: ...ink is disconnected the message RN Module n disconnected Communications Link Failure appears in the bottom pane of the LoRaDevUtility screen Perform the following steps to use the Boot Load Recover function 1 Remove any RN Module n devices listed in the left pane by clicking on the X next to the name 2 From the LoRaDevUtility Module menu select Boot Load Recover 3 A list of COM ports appear in the...

Страница 61: ...ed in nonvolatile memory whenever a mac save command is triggered LoRaWAN current data rate LoRaWAN RX2 window parameters data rate and frequency Adaptive Data Rate status LoRaWAN uplink frame counter LoRaWAN downlink frame counter Changed the default value for the LoRaWAN End Device Identifier deveui Changed the valid range for the radio set fdev parameter to 0 200000 Changed the valid range for ...

Страница 62: ...ParamSetupReq command Fixed an issue that may have caused the RN2483 module to mishandle the usage of LoraWAN ADRACKReq in packets A 4 Version 1 0 3 Release for LoRaWAN specification 1 0 1 Fixed an issue that impacted the Sleep mode current Fixed UART wake up from sleep issue Added support for RxTimingSetupAns and RxParamSetupAns responses in uplink frames until the next downlink is received Added...

Страница 63: ... 2015 2018 Microchip Technology Inc DS40001784G page 63 NOTES ...

Страница 64: ... 5300 China Xian Tel 86 29 8833 7252 China Xiamen Tel 86 592 2388138 China Zhuhai Tel 86 756 3210040 ASIA PACIFIC India Bangalore Tel 91 80 3090 4444 India New Delhi Tel 91 11 4160 8631 India Pune Tel 91 20 4121 0141 Japan Osaka Tel 81 6 6152 7160 Japan Tokyo Tel 81 3 6880 3770 Korea Daegu Tel 82 53 744 4301 Korea Seoul Tel 82 2 554 7200 Malaysia Kuala Lumpur Tel 60 3 7651 7906 Malaysia Penang Tel...

Отзывы: