background image

 

 

Gateway TLG8411V1 User Manual V1.0.0

 

19 

July 2020

 

 
 

3.7. 

System Status 

System Upgrade and Reset 

Upgrading and Reset are located in the 

System Status

 as shown in Figure 3-17. TLG8411V1 

provides online upgrading functionality to let the off-the-shelf gateway refresh with new firm-
ware; when a new firmware published, you can download a new firmware from our website, 
and use 

Choose File

 to select a new firmware and Upgrade. The upgrading must keep the 

gateway power-on until upgrading finished. The gateway time can be modified using 

Modify

 

button, and final when something wrong,  you can press 

Reboot

  to restore gateway  in an 

initial status. 

 
If you press 

Factory

 

Reset

 button on the TLG8411V1 front panel, TLG8411V1 restores its 

system  configuration  to  original  status. All  settings,  such  as  concentrator  channel,  packet 
forwarder and MQTT, would be restored as default settings. Be careful to use 

Factory

 

Reset

the important settings might be lost in restore operation. When system is in reset, the LED of 
power status at front-side is turned to red. 

 

Auto Reboot 

Auto Reboot is a function that can let gateway reboot at specified time every day. 

 

 

Figure 3-17 TLG8411V1 Upgrading 

 

 

Содержание TLG8411V1

Страница 1: ...Gateway TLG8411V1 User Manual V1 0 0 July 2020 ...

Страница 2: ... System Status 19 4 Application Development 22 4 1 LoRaScript 22 4 1 1 LoRaScript API 29 4 1 2 Parse LoRaWAN Packet 34 4 1 3 Implement a Simple Protocol 36 4 2 Node RED 39 4 2 1 Node RED Example Receive LoRa Packet 39 4 2 2 Node RED Example Send LoRa Packet 41 4 2 3 Node RED Example Parse LoRaWAN Packet 43 5 MQTT Basic Concept and Demo 45 6 LoRa Packet Statistics and Logs 48 7 Troubleshooting 49 7...

Страница 3: ...ng data processing You can use modern browsers such as Chrome and Firefox to manage TLG8411V1 to setup concentrator channel packet forwarding MQTT broker and network configuration and cus tomize your plugins for designated purpose The followings are TLG8411V1 s software and hardware specification and its overall views Software Specification Table 1 1 Software Specification of TLG8411V1 Administrat...

Страница 4: ... DDRIII Flash 256 Mbytes NAND Type Connectivity Ethernet 10 100 Mbps Wireless LTE Full duplex LoRa Power Supply 12V 2A DC Adaptor Frequency Range 920 MHz 928 MHz Modulation LoRa spreading spectrum Number of Channels 16 Operation Temp 20 65 Storage Temp 40 85 IP Rating IP52 Figure 1 1 TLG8411V1 Gateway Overall View SD Card Slot Ethernet USB SIM Card Slot Power Jack Front View Rear View Left View Ri...

Страница 5: ...ing to use TLG8411V1 gateway the power and Ethernet need to be connected well The RJ45 is used to connect to a network router which can access Internet The power supply is used a DC12V power input To access Internet through LTE cellular network a SIM card nano sim must be installed Figure 2 1 Setup ...

Страница 6: ...wn in Figure 2 3 4 Enter username and password to login the default username is admin and password is admin 5 Go to System Network Configuration to check the IP address of Ethernet and make sure it can access Internet 6 Go to Setup Channel Setup to set up the LoRa concentrator including receiving fre quency spreading factor For more detailed refers to section 3 2 Channel Setup 7 Activate your LoRa...

Страница 7: ...our particular components for visualizing deploy ment in a data flow Figure 3 1 TLG8411V1 Portal Figure 3 1 is TLG8411V1 gateway portal overview the portal provides concentrator channel setup and LoRaWAN packet forwarder in Setup section We also provide Concentrator and MQTT controlling for enable disable concentrator and manage MQTT broker and publisher status A demonstration of MQTT is present i...

Страница 8: ...erver you can choose any one of them in customizing network environments For security and system management TLG8411V1 can change its password and support online upgrading in the Change Password and System Status Section 3 3 describes LoRaWAN Packet forwarder Setup section 3 4 and 3 5 introduces Node RED and MQTT settings System settings and network configuration are illustrated in 3 6 and 3 7 pres...

Страница 9: ... receiv ing packets there are some parameters must be set such as using LoRaWAN or not de fine Sync Word for identifying the packet prefix choosing each radio s central frequencies setup frequency bias in each channel to define standard LoRa channel bandwidth and other options Table 3 1 describes each parameter s options Figure 3 2 Channel Setup ...

Страница 10: ...n Figure 3 2 chan_multiSF 0 7 The general channel settings include enable disable channel inter face hooking radio_0 radio_1 and frequency bias The chan_multiSF_x will receive packets with all spreading factor SF7 SF12 in designated frequency The actual frequency is shown as red color at last field in Figure 3 2 Note that chan_multiSF_x can only operate in 125K bandwidth Because radio_0 and radio_...

Страница 11: ...ver two independent chunk of 1 0MHz as shown in Figure 3 5 The two 1 0MHz intervals can overlap without problem and the number of channels in each interval is also arbitrary as show in Figure 3 6 915 7 MHz radio 0 916 5 MHz multiSF0 LoRaStd multiSF1 multiSF2 multiSF3 multiSF4 multiSF5 multiSF6 multiSF7 1 0MHz radio 1 1 0MHz Figure 3 5 Overlap of Radio Interval 912 5 MHz radio 0 916 5 MHz multiSF0 ...

Страница 12: ...er Address and Server Port Up are used to set LoRaWAN server to forward packets All for warding packets will through IP UDP link to a destination The Keepalive Interval Statistic Interval and Push Timeout define the aggressive connection policy and its refresh time If the Fake GPS enable each forward packet would append the GPS information The Packet Forwarder Control provide user to stop or resta...

Страница 13: ...ED For login Node RED the default login user account and the password are admin however for a customizing the password can reset through Reset Password In the setting page the Status shows the Node RED stopped or running You can change Node RED sta tus through Stop and Start button but be patient the initialization start time of the Node RED in TLG8411V1 is about 20 seconds Because TLG8411V1 is an...

Страница 14: ...cribers in designated topics MQTT Publisher is a charge of receiving LoRa packets and publish message to MQTT broker MQTT Subscriber subscribes transmit packet from broker and emit the packet The topic string for MQTT Publisher and MQTT Subscriber can be set at Receive Packet Publish Topic and Transmit Packet Subscribe Topic You can stop or restart MQTT broker or MQTT publisher subscriber through ...

Страница 15: ...password as shown in Figure 3 10 Fill the new password and press Reset Password button the new password applied in the next login Instead of the default password which is admin password needs to be at least 8 letters and must contain at least one number and one uppercase alphabet Figure 3 10 Change Password ...

Страница 16: ...P Figure 3 11 Static IP Figure 3 12 and DHCP Server Figure 3 13 To use the DHCP enable the DHCP checkbox Static IP needs information about IP address network mask and default gateway To act as DHCP Server the IP address network mask and DHCP start and end address must be provided Figure 3 11 Network Configuration Figure 3 12 Static IP Setup ...

Страница 17: ...Setting TLG8411V1 provides a wireless AP for connected by laptop This wireless AP function can be enable disable from Wireless Network Figure 3 14 The SSID is also shown on this con figuration page The password for connecting to TLG8411V1 via wireless is tlg8411ap Figure 3 14 Wireless Configuration ...

Страница 18: ... module is present The setup of cel lular network is shown at Figure 3 15 Please contact your cellular operator for the setting of APN Username and Password some operator setting only needs APN The Dial Number is usually 99 1 in most of countries DONOT change APN if you are not sure the number Figure 3 15 Cellular Network Setup ...

Страница 19: ...ing IP Forward is a function to share TLG8411V1 network to devices connecting to TLG8411V1 through wireless or LAN For example a laptop can access Internet via wireless connection to TLG8411V1 if cellular network onTLG8411V1 is connected Figure 3 16 IP Forward Setup ...

Страница 20: ...inished The gateway time can be modified using Modify button and final when something wrong you can press Reboot to restore gateway in an initial status If you press Factory Reset button on the TLG8411V1 front panel TLG8411V1 restores its system configuration to original status All settings such as concentrator channel packet forwarder and MQTT would be restored as default settings Be careful to u...

Страница 21: ...l system LoRa Furthermore system process status memory usage and CPU usage are also shown here All this infor mation can be downloaded by clicking Download button Figure 3 18 System Logs LoRa Packet Statistics LoRa Packet Statistics shows the number of packets received by each channel Figure 3 19 LoRa Packet Statistics ...

Страница 22: ...Gateway TLG8411V1 User Manual V1 0 0 21 July 2020 LoRa Receive Logs In this page it will display received data in real time Figure 3 20 LoRa Receive Logs ...

Страница 23: ...oRaScript is a proprietary plugin mechanism that it based on JavaScript and Node js for providing add on on TLG8411V1 Instead of providing all APIs from Node js LoRaScript only provides a set of Node js APIs and other third party APIs A list of APIs can be found at 4 1 1 Figure 4 1 LoRaScript ...

Страница 24: ... methods for the user Table 4 2 and Table 4 3 illustrate ANNWS 01 2 1 W SYS rxpk and txpk components respectively Table 4 1 LoRaScript Callbacks and Methods Name Type Usage onInit Callback Plugin initialization method plugin can setup its initial procedure in this callback onLoRaRx dat Callback It would be invoked on received an incoming packet The data is a JSON object which complies with 3 send_...

Страница 25: ...equals LORA datr comprises SFnBWm where n is an integer representing the frame s spreading factor and m is an integer representing the frame s bandwidth in units of kHz When modu equals FSK datr comprises an integer representing the frame s bit rate in Hz codr string required if modu equals LoRa ECC code rate codr comprises the string k n where k represents the carried bits and n the total number ...

Страница 26: ...nteger not required The output power which what the gateway is com manded to transmit the frame modu string not required The modulation technique used LORA representing LoRa modulation FSK representing FSK modulation datr string not required Datarate identifier When modu equals LORA datr comprises SFnBWm where n is an integer representing the frame s spreading factor and m is an integer representi...

Страница 27: ...l layer CRC generation by the transmitter List 4 1 rxpk Example time 2013 03 31T16 21 17 528002Z tmst 3512348611 chan 2 rfch 0 freq 866 349812 stat 1 modu LORA datr SF7BW125 codr 4 6 rssi 35 lsnr 5 1 size 32 data DS4CGaDCdG 48eJNM3Vai zDpsR71Pn9CPA9uCON84 List 4 2 txpk Example imme true freq 864 123456 rfch 0 powe 14 modu LORA datr SF11BW125 codr 4 6 ipol false size 32 data H3P3N2i9qc4yt7rK7ldqoeC...

Страница 28: ...Construct and Send a txpk Pakcet in LoRaScript function onInit setInterval period_send 1000 send a txpk in every 1 second function period_send var msg Hello World var msg_size Buffer byteLength msg asci var base64str new Buffer msg toString base64 var json_obj imme true freq 915 5 rfch 0 powe 14 modu LORA datr SF7BW125 codr 4 6 ipol false size msg_size data base64str send_pkt JSON stringify json_o...

Страница 29: ...r NwkSKey new Buffer 2b7e151628aed2a6abf7158809cf4f3c hex if lora_packet verifyMIC packet NwkSKey var AppSKey new Buffer 2b7e151628aed2a6abf7158809cf4f3c hex var dec lora_packet decrypt packet AppSKey NwkSKey toString hex var msg devaddr device toString hex data dec fport packet getFPort counter packet getFCnt freq raw freq datr raw datr debug_print JSON stringify msg ...

Страница 30: ...cs v0 12 7 api buffer html SlowBuffer Class crypto setEngine Function https nodejs org docs v0 12 7 api crypto html getCiphers Function getHashes Function createCredentials Function createHash Function Hash Class createHmac Function Hmac Class createCipher Function createCipheriv Function Cipher Class createDecipher Function createDecipheriv Function Decipher Class createSign Function Sign Class c...

Страница 31: ...olveMx resolveNaptr resolveNs resolveSoa resolveSrv resolvePtr resolveTxt reverse setServers http request Function https nodejs org docs v0 12 7 api http html get Function https request Function https nodejs org docs v0 12 7 api https html get Function net connect Function https nodejs org docs v0 12 7 api net html createConnection Function Sokcet Class isIP Function isIPv4 Function isIPV6 Functio...

Страница 32: ... org docs v0 12 7 api timers html clearTimeout Function setInterval Function clearInterval Function unref Function ref Function setImmediate Function clearImmediate Function url parse Function https nodejs org docs v0 12 7 api url html format Function resolve Function util debuglog Function https nodejs org docs v0 12 7 api util html format Function log Function inspect Function isArray Function i...

Страница 33: ...w Class Unzip Class deflate Function deflateSync Function deflateRaw Function deflateRawSync Function gzip Function gzipSync Function gunzip Function gunzipSync Function inflate Function inflateSync Function inflateRaw Function inflateRawSync Function unzip Function unzipSync Function bcryptjs setrandomfallbackran dom Function https www npmjs com package bcryptjs genSaltSync Function genSalt Funct...

Страница 34: ... https github com kawanet msgpac k lite decode Function Encoder Class Decoder Class createEncodeStream Function createDecodeStream Function createCodec Function codec Class lora packet fromWire Function https github com anthonykirby lor a packet fromFields Function verifyMIC Function calculateMIC Function recalculateMIC Function decrypt Function constants Function mqtt connect Function https www n...

Страница 35: ... debug_print on Recv data var raw JSON parse data var lorawan_packet new Buffer raw data base64 if lorawan_packet length 12 var device new Buffer 4 for var i 0 i 4 i device i lorawan_packet 4 i var packet lora_packet fromWire lorawan_packet var NwkSKey new Buffer 2b7e151628aed2a6abf7158809cf4f3c hex if lora_packet verifyMIC packet NwkSKey var AppSKey new Buffer 2b7e151628aed2a6abf7158809cf4f3c hex...

Страница 36: ...Gateway TLG8411V1 User Manual V1 0 0 35 July 2020 Figure 4 2 Execution of Parsing LoRaWAN Packet in LoRaScript ...

Страница 37: ...in Figure 4 3 Illustration of TDMA Because gateway can simultaneously receive 49 different channels each channel presents a TDMA protocol Therefore a lot of nodes can be served in the same time But note that channels with different spreading factor have different data rate it must be careful to calculate transmission time of data and assign period of each time slot Figure 4 3 Illustration of TDMA ...

Страница 38: ...createSocket udp4 cmd_sock on listening function var address cmd_sock address debug_print UDP Server listening on address address address port cmd_sock on message function message remote debug_print remote address remote port message cmd_node_address message 0 cmd_node_data message 1 update_cmd true cmd_sock bind cmd_port setInterval beacon 10000 broadcast beacon every 10 second function onLoRaRx ...

Страница 39: ...age sent to server_ip server_port function beacon if update_cmd true debug_print Send beacon with cmd beacon_pkt 3 cmd_node_address beacon_pkt 4 cmd_node_data update_cmd false else debug_print Send beacon beacon_pkt 3 0 beacon_pkt 4 0 beacon_pkt 2 0x11 beacon cmd beacon_channel data new Buffer beacon_pkt toString base64 send_pkt JSON stringify beacon_channel beacon_pkt 1 ...

Страница 40: ...D Example Receive LoRa Packet This section introduces how to receive LoRa packet in Node RED After login Node RED dragging lora node in input debug and udp node in output and function node in function into Flow 1 panel Then connecting output port of lora node to input port of debug node and output port of lora node to input port to function and output port of function to input port of udp as shown...

Страница 41: ...ending received LoRa data to other end point Because the data field is coded into Base64 Decode Base64 encoded payload in udp node configuration is checked as shown in Figure 4 7 Figure 4 7 Configure UDP Node Then pressing Deploy on up right for starting the flow Receiving LoRa packets can be seen at debug panel as shown in right side of Figure 4 8 and also send to the other host via udp ...

Страница 42: ...nel 4 2 2 Node RED Example Send LoRa Packet A sending LoRa packet example by Node RED is introduced in this section This example creates a inject input node and clicking left part of inject node triggers a packet sent out through gateway as shown in Figure 4 9 Figure 4 9 Example of Sending LoRa Packet ...

Страница 43: ...d field Figure 4 10 Edit Inject Node Next step is double clicking function node and input following JavaScript code in the node as shown in Figure 4 11 Then deploy this flow and clicking left part of inject node triggers a packet sent out each time var send_string new Buffer msg payload toString Base64 var send_json imme true freq 915 5 rfch 0 powe 14 modu LORA datr SF11BW125 codr 4 6 ipol false s...

Страница 44: ...4 11 Edit Function Node 4 2 3 Node RED Example Parse LoRaWAN Packet There is a LoRaWAN parser node in Node RED Users can utilize it to parse LoRaWAN packet which is received from TLG8411V1 as Figure 4 12 shown Figure 4 12 LoRaWAN Parser Node Fill device s key ...

Страница 45: ...Gateway TLG8411V1 User Manual V1 0 0 44 July 2020 Figure 4 13 is an example of parsing LoRaWAN packet which is received on TLG8411V1 Figure 4 13 Demonstration of LoRaWAN Parser Node ...

Страница 46: ...e a topic publishing on it is enough Topics are treated as a hierarchy using a slash as a separator Ex lora rxpk For MQTT topic subscription we provide a MQTT Demonstration using MQTT fx which can be downloaded from http www mqttfx org After downloading and installing MQTT fx please launch MQTT fx and setting MQTT broker information as Figure 5 1 shown The username and password need to be identica...

Страница 47: ...et on TLG8411V1 the Subscribe Topic must be filled with Receive Packet Public Topic in setting of MQTT on TLG8411V1 and clicking the Subscribe button Then we can send a LoRa packet from other nodes and see output on MQTT fx as Figure 5 3 shown Figure 5 3 Subscription Demonstration ...

Страница 48: ...nsmit Packet Subscribe Topic in setting of MQTT on TLG8411V1 Then entering transmitting packet information and clicking Publish button as Figure 5 4 shown The fol lowing string is used in this demonstration imme true freq 915 5 rfch 0 powe 14 modu LORA datr SF12BW125 codr 4 5 ipol false size 8 data MDAwMDAxMjM Figure 5 4 MQTT Publish Demonstration ...

Страница 49: ...tistics panel illus trated in Figure 6 1 It exhibits the total received packets and its total size in bytes on each frequency with different spreading factors This statistics would be refreshed periodically ac cording to internal concentrator report threshold On another side the LoRa Receive Logs is a console emulator all raw rxpk packets would be printed on this panel in real time but only useful...

Страница 50: ... the status of network connection please use following script at LoRaScript for checking network connection to determine whether the gateway can connect to specific server Figure 7 1 illustrates the result of executing script List 7 1 LoRaScript for Checking Network Connection function onInit var dns require dns dns lookup www google com 4 function err address family debug_print DNS Server dns get...

Страница 51: ...Gateway TLG8411V1 User Manual V1 0 0 50 July 2020 Figure 7 1 Result of Executing Script of Checking Network Connection ...

Страница 52: ...Gateway TLG8411V1 User Manual V1 0 0 51 July 2020 8 Revisions 8 1 V1 0 0 First Release Version ...

Страница 53: ...020 9 References 1 http www semtech com wireless rf iot html 2 http mqtt org 3 Semtech ANNWS 01 2 1 W SYS Gateway to Server Interface 4 https github com Lora net 5 http www taifatech com products long range communication 6 Node RED http nodered org ...

Страница 54: ...eiver it may cause radio interference Install and use equipment according to the instruction manual Equipment registered based on the confirmation measurement at the user installa tion site This is a product for which interference was measured at the present installation site and confirmed to comply with the standard of Voluntary Control Council for Interference by Information Technology Equipment...

Страница 55: ...nual The reproduction trans mission or use of this document or contents is not permitted without express written authority About The Symbols Various symbols are used in this manual the user s manual and on the product itself to ensure cor rect usage to prevent danger to the user and others and to prevent property damage The mean ings of these symbols are described below It is important that you re...

Страница 56: ...mediately turn off the power switch and then disconnect the power plug from the power outlet After making sure that the smoke or odor has stopped contact your dealer Never attempt to make repairs yourself because this could be dangerous Use special caution for children and pets Incorrect handling could result in fire electrical shock injury burn or vision problem Use special caution in households ...

Страница 57: ...tely turn off the power switch disconnect the power plug from the power outlet and contact your dealer Do not place the product on an unstable surface If the product should be dropped and or broken it could result in an injury and continued use could result in fire or electrical shock Do not place the product on an unstable slant or vibrant surface such as a wobbly or inclined stand Be cautious of...

Страница 58: ...andling the battery of the product Incorrect handling of the power source could result in fire or personal injury The power source may explode if not handled properly Keep the power source away from children and pets If swallowed consult a physician immedi ately for emergency treatment Do not allow the power source in a fire or water Avoid fire or high temperature environment Do not hold the power...

Страница 59: ... dusty place ex a smoking space a kitchen a beach etc Do not place the product outdoors Do not use a humidifier near the product Avoid a high temperature environment The heat could have adverse influence on the cabinet of the product and other parts Do not place the product the cable and other parts in direct sunlight or near a hot object such as heater etc Avoid Magnetism Manufacture strongly rec...

Страница 60: ...ral detergent in water wet and wring out the soft cloth and afterward wipe with a dry soft cloth Do not use un diluted detergent directly Do not use an aerosol sprays solvents volatile substances or abrasive cleaner Before using chemical wipes be sure to read and observe the instructions Do not allow long term close contact with rubber or vinyl Avoid radio interference Any interfering radiation co...

Отзывы: