Component: LoRaWAN (Seeed WIO-E5) (LORAWAN-E5) (Comms: IoT/Cloud)

From Flowcode Help
Jump to navigationJump to search
Author Jac Kersing
Version 1.0
Category Comms: IoT/Cloud


LoRaWAN (Seeed WIO-E5) component

LoRaWAN Component for the Seeed WIO-E5 module.

Detailed description

No detailed description exists yet for this component

Examples

LoraWAN Demo

Example LoRaWAN demo file.

FC6 Icon.png LoRaWAN Demo

Macro reference

ChkConnected

Fc9-comp-macro.png ChkConnected
Sends AT command and checks response to check the LoRa E5 module is connected to the controller. 
Fc9-s16-icon.png - INT Return


FreeUart

Fc9-comp-macro.png FreeUart
Release UART resources (to allow for sleeping on some microcontrollers) 
Fc9-void-icon.png - VOID Return


GetDownlinkByte

Fc9-comp-macro.png GetDownlinkByte
Get one byte from the received downlink message, returns -1 if no more bytes are available. 
Fc9-s16-icon.png - INT Return


GetId

Fc9-comp-macro.png GetId
Get the specified ID from the LoRaWAN module. Valid types are DevEUI, AppEUI and DevAddr  
Fc9-string-icon.png - STRING type
 
Fc9-string-icon.png - STRING Return


GetPort

Fc9-comp-macro.png GetPort
Get the portnumber of the downlink message. 
Fc9-u8-icon.png - BYTE Return


GotDownlink

Fc9-comp-macro.png GotDownlink
Was a downlink received? 
Fc9-bool-icon.png - BOOL Return


Initialize

Fc9-comp-macro.png Initialize
Initialize the component. Should be called before any other function is used but after the component received a hardware reset. (Toggle of the reset pin) 
Fc9-void-icon.png - VOID Return


Join

Fc9-comp-macro.png Join
Execute a join command to have the module join the LoRaWAN network. Returns 1 on a successfull join, 0 if the join failed. Keep in mind there is no interaction with the LoRaWAN network if Join mode is ABP so it will always succeed if all parameters have been initialized correctly. In Join mode OTAA a join will fail if the module does not get a valid response from teh network which may occur if the DevEUI, AppEUI or AppKey are not correct or if there is no coverage at the location. 
Fc9-u8-icon.png - BYTE Return


LowPowerSleep

Fc9-comp-macro.png LowPowerSleep
Set low power sleep mode. Specify the number of seconds to sleep in the range 6-12959. 
Fc9-s16-icon.png - INT seconds
 
Fc9-u8-icon.png - BYTE Return


ReInitUart

Fc9-comp-macro.png ReInitUart
Reclaim the UART after low power sleep of the CONTROLLER (not the LoRaWAN module). 
Fc9-void-icon.png - VOID Return


SendMsg

Fc9-comp-macro.png SendMsg
Send LoRaWAN message, the message should be an array of byte values. To conserve airtime no ASCII strings should be used. 
Fc9-u8-icon.png - BYTE msg
 
Fc9-u8-icon.png - BYTE len
 
Fc9-u8-icon.png - BYTE Return


SendMsgConfirmed

Fc9-comp-macro.png SendMsgConfirmed
Send a confirmed LoRaWAN message, the message should be an array of byte values. To conserve airtime no ASCII strings should be used. Use confirmed messages sparingly as transmitting gateways can normally receive 8 parallel messages but not 1 message while transmitting. So it kills scalebility of a LoRaWAN network! 
Fc9-u8-icon.png - BYTE msg
 
Fc9-u8-icon.png - BYTE len
 
Fc9-u8-icon.png - BYTE Return


SetDr

Fc9-comp-macro.png SetDr
Explicitly set DataRate of transmissions. Valid values depend on the region used please consult the LoRaWAN regional parameter document to find them. 
Fc9-u8-icon.png - BYTE dr
 
Fc9-u8-icon.png - BYTE Return


SetId

Fc9-comp-macro.png SetId
Set an ID. Valid options are "AppEUI", "DevEUI" and "DevAddr". The value to use is an 16 HEX character long string for EUIs or a 8 HEX characters long string for DevAddr. Examples: AppEUI: "001122334455AABB" DevAddr: "001122AA" 
Fc9-string-icon.png - STRING type
 
Fc9-string-icon.png - STRING value
 
Fc9-u8-icon.png - BYTE Return


SetJoinMode

Fc9-comp-macro.png SetJoinMode
Set the join mode, valid options are MODE_OTAA or MODE_ABP. 
Fc9-string-icon.png - STRING mode
 
Fc9-u8-icon.png - BYTE Return


SetKey

Fc9-comp-macro.png SetKey
Set encryption key. Valid key types are: "APPKEY", "APPSKEY" and "NWKSKEY". For OTAA only APPKEY is required. For ABP both APPSKEY and NWKSKEY are required. The value shoud be a 32 HEX character string. Example value: "00112233445566778899AABBCCDDEEFF" 
Fc9-string-icon.png - STRING type
 
Fc9-string-icon.png - STRING value
 
Fc9-u8-icon.png - BYTE Return


SetLowPower

Fc9-comp-macro.png SetLowPower
Set the Low Power mode of the module. Low power can be off (false) or on (true) 
Fc9-bool-icon.png - BOOL on
 
Fc9-void-icon.png - VOID Return


SetPort

Fc9-comp-macro.png SetPort
Set the port used for transmissions 
Fc9-u8-icon.png - BYTE port
 
Fc9-u8-icon.png - BYTE Return


SetRegion

Fc9-comp-macro.png SetRegion
Set the LoRaWAN region to be used. For US915 the band (of 8 channels) to be used needs to be specified as well, the band is ignored for EU868 TTN uses band 1 in US915. 
Fc9-string-icon.png - STRING region
 
Fc9-u8-icon.png - BYTE band
 
Fc9-u8-icon.png - BYTE Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png LoRaWAN settings
Fc9-type-21-icon.png Max Downlink Size
Sets the number of byte elements inside the circular buffer. 
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Channel
UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
Fc9-type-16-icon.png Baud Options
Baud rate option selector 
Fc9-type-5-icon.png TX
Pin to be used for Transmit data 
Fc9-type-16-icon.png TX Remap Pin
Allows the hardware transmit pin to be configured from a list of available pins based on your target device, 
Fc9-type-5-icon.png RX
Pin to be used for Receive data 
Fc9-type-16-icon.png RX Remap Pin
Allows the hardware receive pin to be configured from a list of available pins based on your target device, 
Fc9-conn-icon.png Simulation
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not 
Fc9-type-16-icon.png Console Format
Controls if the data is shown as a log with time and date stamps or just as raw data 
Fc9-type-21-icon.png Console Columns
Number of characters that can be displayed on a single line of the console. 
Fc9-type-16-icon.png Data Source
Simulation data source used to allow the component to connect to various remote devices Nothing - Simulation data is ignored COM port - Routes the communication data to and from a physical or virtual COM port API - Routes the communication data via a data injector component on the Panel. 
Fc9-type-16-icon.png API
Selects which API component to route the communication data via. Add API components to the panel before they will be available in this list. API components are available from the Comms component category. 

Component Source Code

Please click here to download the component source project: FC_Comp_Source_lora-e5-component.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_lora-e5-component.fcfx