Jason Reiss
Forum Replies Created
-
AuthorPosts
-
Jason Reiss
Keymasterhttps://developer.mbed.org/teams/MultiTech/code/libmDot-mbed5/file/0c4b59488f41/mDotEvent.h
PacketRx has number of retries if ack is missed.
Or a counter can be added to TxDone or MissedAck event.MDot.h has getStats() function with some statistic info.
On application server side monitor the frame counter of each packet.
Jason Reiss
KeymasterPing is a proprietary MAC command handled by the built-in network server on Conduit.
The network server will have to generate the response and send the downlink.
Ping 0x80
Pong 0x80[RSSI][SNR] where RSSI and SNR are int8 valuesJason Reiss
KeymasterThat directory should be created by /etc/init.d/lora-packet-forwarder at the beginning of do_start()
However the symlinks do not look like they are being setup correctly.
Try this updated package install. Renable the lora-packet-forwarder in /etc/default after install.
http://www.multitech.net/downloads/lora-packet-forwarder_3.1.0-r9.1_mtcdt.ipk
Jason Reiss
KeymasterAre you connected to the internet?
$ nslookup iot.semtech.com
Jason Reiss
KeymasterTry this
$ cd /var/run/lora/1
$ ./lora_pkt_fwdJason Reiss
KeymasterDid you reset the counter on the device?
The counters are strictly checked to be increasing.If a counter is found to be less than last received then the packet is invalid which is why CHECK-MIC reports failed.
FCNT is reported as FFFFFFFF as the packet is not authenticated.
Jason Reiss
KeymasterThe “node reset” command will reset the counters. Looks like it
iswas mis-documented as resetting stats.$ nc -u localhost 6677
node resetor
$ echo “node reset
” > /dev/udp/localhost/6677 -
This reply was modified 7 years, 11 months ago by
Jason Reiss.
-
This reply was modified 7 years, 11 months ago by
Jason Reiss.
Jason Reiss
Keymasterradio tx bypasses the LoRaWAN mac layer and is preforming a raw TX of the data provided using LoRa modulation.
When the data is received it is not in LoRaWAN protocol format. Minimum size of a LoRaWAN packet is 12 bytes, hence the error “Frame too short”.
Use the “mac tx” command instead after performing OTA or ABP activation to communicate with the gateway.
Jason Reiss
KeymasterYou will want to accept the received packets in the event handler
examples/inc/RadioEvent.h
Add your code to the MacEvent function.
RadioEvent::MacEvent(LoRaMacEventFlags* flags, LoRaMacEventInfo* info);
if (flags->Bits.Rx) { logDebug("Rx %d bytes", info->RxBufferSize); if (info->RxBufferSize > 0) { // print RX data as hexadecimal //printf("Rx data: %s\r\n", mts::Text::bin2hexString(info->RxBuffer, info->RxBufferSize).c_str()); // print RX data as string std::string rx((const char*)info->RxBuffer, info->RxBufferSize); printf("Rx data: %s\r\n", rx.c_str()); // TODO: output to UART } }
Jason Reiss
KeymasterThat is a logging error. The frame counter is not filled as it has been marked duplicate so a garbage value is logged. I will mark this to be fixed.
Jason Reiss
KeymasterTransmitting close to a gateway can cause the a packet to be received by the radio on adjacent channels.
The second packet will have much lower RSSI and SNR but can still be demodulated.Using SF12 makes this more likely with increased redundancy transmitted.
If you increase the distance or remove the antenna this should stop.
May 18, 2017 at 11:37 am in reply to: Can mLinux be installed on an AEP Model (and vice-versa)? #19170Jason Reiss
KeymasterBuy the AEP model.
It is a configuration difference. AEP is configured to connect to DeviceHQ, mLinux is not.Both firmwares work on both models.
AEP -> mLinux is easier.
When using mLinux the DeviceHQ features are not available, but if you go back to AEP they will be.
Jason Reiss
KeymasterWhat frequency was the transmission on?
The 863-868 frequencies are designated to 0.1% duty-cycle
If the band is limited to 865-868 frequencies a 1% duty-cycle can be used.So if the Addition Channels Frequency is set to 867.5 then the lowest band should be 1%.
It looks like the mDot uses 1%, similar to the Semtech reference implementation. However, the network server is still using 0.1% leading to a mismatch of duty-cycle availability on those channels and use of Rx2 instead.
May 17, 2017 at 12:07 pm in reply to: Custom App takes almost 2 minutes to start on bootup of conduit. #19138Jason Reiss
Keymasterhttps://www.google.com/search?q=mqtt+c%2B%2B
We use libmosquittopp
May 17, 2017 at 11:57 am in reply to: Unexpected Payload/Packet sent to MDot on a successful Network Join #19135Jason Reiss
KeymasterJust ignore all message received on port 0 if they have no meaning to your application.
Would be best to accept packets only on port values you expect to receive.
info->RxPort contains the port value, 1 is default AppPort
May 17, 2017 at 8:34 am in reply to: Unexpected Payload/Packet sent to MDot on a successful Network Join #19131Jason Reiss
KeymasterDepends on the application. I’d rather leave that decision to the application. The port value is provided to filter them.
Jason Reiss
KeymasterLook at inc/RadioEvent.h in the Dot-Examples project.
Jason Reiss
KeymasterThe coding rate has been fixed in the LoRaWAN implementation to 4/5.
The peer-to-peer mode borrows much of the LoRaWAN implementation and it has not been added as a feature to adjust the Code Rate.May 13, 2017 at 6:13 am in reply to: Unexpected Payload/Packet sent to MDot on a successful Network Join #19031Jason Reiss
KeymasterPackets received on port 0 are Network messages.
This one is an ADR command controlling the channels and datarate of the Dot.
The channels are set to the 8 configured on the gatewayTwo ADR commands are present
0340080071 – Disable all 125kHz channels and 1 500 kHz set to DR4
030000ff11 – Enable the 8 125 kHz channels set to DR0ID DR/PWR CHMASK CTRL/REP
03 40 0800 71This allows a device to join configured in 64+8 channel mode and then be assigned the proper channels. Of course a device using 64+8 channels may need multiple attempts to join as it is must guess the gateway channels.
Jason Reiss
KeymasterJason Reiss
KeymasterAre you connected to internet through cellular or LAN?
Network setup manual or DHCP?
See dns setup files:
Jason Reiss
KeymasterSee the security section at end of introduction page.
Introduction:
See OTA and ABP modes of activation in the specification.
Specification:
https://www.lora-alliance.org/portals/0/specs/LoRaWAN%20Specification%201R0.pdfSee how each is implemented.
Reference End-Device Implementation:
https://github.com/Lora-net/LoRaMac-nodeJason Reiss
KeymasterIn LoRaWAN uplink and downlink use opposite IQ settings.
The signals will be noise to each other, gateways will not
RX other gateways TX, likewise devices will not RX other device TX.Uplink ////////
Downlink \\\\\\\\Without the relay device (GW) or peer-to-peer mode direct communication will not be possible in a LoRaWAN.
April 27, 2017 at 8:09 am in reply to: LORA Packet not received by Node-Red, on a conduit power cycle. #18769Jason Reiss
Keymaster1. Device Joins Conduit via RF
2. Session is saved to DB in RAM on Conduit
3. DB is periodically backed up to FLASH (1 hour interval)
4. DB on shutdown is backed up to FLASH
5. On power-up DB is restored in RAM from FLASHWhen the power is pulled the DB is not backed up to flash. The restored database on power-up does not have a record of the session.
Even when joined the session counters between Conduit and end-device may be lost on power-loss. If the downlink counter on the Dot is ahead of the Conduit then downlink packets will be rejected as repeats until the counter catches up.
On Dot the getNetworkJoinStatus() returns the local state of the network session. It does not query the Conduit of session information.
Work-arounds:
1. UPS + GPIO card to gracefully shutdown gateway before UPS battery runs out.
2. Detect loss of session at end-device via lack of ACK from gateway and re-join. Periodic link check is also available to detect loss.See setLinkCheckCount and setLinkCheckThreshold in mDot.h.
See Ensuring Network Connectivity section of http://www.multitech.net/developer/software/mdot-software/at-command-firmware-user-guide/BR,
JasonJason Reiss
KeymasterWe do not officially support lora-network-server on MTCAP.
Jason Reiss
KeymasterThe SNR is reported by the LORA demodulator.
The value reported by AT+NLC should calculate the difference between the floor and the SNR of the received signal at the gateway. There appear to be a bug in the current release of network server on Conduit. It is only returning the SNR above 0.SF12BW125 -20 dBm floor
Each SF step raises the floor 2.5 dBm
A BW step from 125 to 250 or 250 to 500 raises the floor 3 dBm.In US915 the gateway RX floor then ranges from -15(DR0) to -4(DR4)
See page 3 of SF12 and SF10 margins.
https://www.semtech.com/images/datasheet/LoraDesignGuide_STD.pdfSee page 6 for SNR calculations.
http://www.semtech.com/images/datasheet/an1200.22.pdfJason Reiss
KeymasterWhat command do you use for sending? AT+SEND, AT+SENDB or serial data mode (AT+SD).
AT+SEND is a send string function and may be parse the backspace when converting to string.To send raw bytes use AT+SENDB=080D to see if it is the AT parser or at the receiving end.
Jason Reiss
KeymasterThe AEP version of Conduit provides a platform with Node-Red.
Jason Reiss
Keymaster1 hour 1% duty-cycle
36/3600 seconds
The first hour gets 36000 ms of time on air. After which the device must wait until the hour has expired.1-11 hours 0.1% duty-cycle
36/36000 seconds
The next ten hours also get 36000 ms of time on air. After which the device must wait until ten hours have expired.11+ hours 0.01% duty-cycle
After which each 24 hour period can use 8700 ms of time on air.The intermediate back-off (1-3 seconds) is a minimum designed with randomness in order stagger repeated attempts from multiple devices.
Only the total time on air per period is enforced to allow independent implementation flexibility.You could enforce a Y minute back-off after X failed attempts if you want the retries to be more staggered.
Please let me know if you need further clarity.
Jason Reiss
KeymasterThe MQTT broker service on Conduit is attached to the local interface (127.0.0.1) so it is not available from outside. Enabling the service on the remote interface has resulted in issues with the network server connection.
What you will want to do is setup a remote MQTT broker and then proxy the messages between the local MQTT service on Conduit and the remote.
A node.js application could use these packages to implement.
https://www.npmjs.com/package/mqtt
https://www.npmjs.com/package/mqtt-bridge -
This reply was modified 7 years, 11 months ago by
-
AuthorPosts