From 7328ae3045e83635176e51c53213bd6065a03245 Mon Sep 17 00:00:00 2001 From: Cesar Alvernaz Date: Sat, 16 Mar 2019 09:05:37 +0000 Subject: [PATCH 1/5] Fixes broken link and removes unnecessary redirect --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ad1c8606..47679e25 100644 --- a/README.md +++ b/README.md @@ -15,18 +15,18 @@ project. ### Component links -* [LoRa Gateway Bridge](https://docs.loraserver.io/lora-gateway-bridge) -* [LoRa Gateway Config](https://docs.loraserver/lora-gateway-config) -* [LoRa Server](https://docs.loraserver.io/loraserver/) -* [LoRa App Server](https://docs.loraserver.io/lora-app-server/) +* [LoRa Gateway Bridge](https://www.loraserver.io/lora-gateway-bridge) +* [LoRa Gateway Config](https://www.loraserver.io/lora-app-server/install/config/) +* [LoRa Server](https://www.loraserver.io/loraserver) +* [LoRa App Server](https://www.loraserver.io/lora-app-server) ## Links -* [Downloads](https://docs.loraserver.io/lora-gateway-bridge/overview/downloads/) +* [Downloads](https://www.loraserver.io/lora-gateway-bridge/overview/downloads/) * [Docker image](https://hub.docker.com/r/loraserver/lora-gateway-bridge/) -* [Documentation](https://docs.loraserver.io/lora-gateway-bridge/) -* [Building from source](https://docs.loraserver.io/lora-gateway-bridge/community/source/) -* [Contributing](https://docs.loraserver.io/lora-gateway-bridge/community/contribute/) +* [Documentation](https://www.loraserver.io/lora-gateway-bridge/) +* [Building from source](https://www.loraserver.io/lora-gateway-bridge/community/source/) +* [Contributing](https://www.loraserver.io/lora-gateway-bridge/community/contribute/) * Support * [Support forum](https://forum.loraserver.io) * [Bug or feature requests](https://github.com/brocaar/lora-gateway-bridge/issues) From b0dac502dec24fc9853abf6210fd0a7ea175aca3 Mon Sep 17 00:00:00 2001 From: Cesar Alvernaz Date: Sat, 16 Mar 2019 09:18:14 +0000 Subject: [PATCH 2/5] Fixes broken link and removes unnecessary redirect --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 47679e25..a5c9a8ac 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,12 @@ project. ### Component links * [LoRa Gateway Bridge](https://www.loraserver.io/lora-gateway-bridge) -* [LoRa Gateway Config](https://www.loraserver.io/lora-app-server/install/config/) +* [LoRa Gateway Config](https://www.loraserver.io/lora-gateway-bridge/install/config) * [LoRa Server](https://www.loraserver.io/loraserver) * [LoRa App Server](https://www.loraserver.io/lora-app-server) ## Links - +**** * [Downloads](https://www.loraserver.io/lora-gateway-bridge/overview/downloads/) * [Docker image](https://hub.docker.com/r/loraserver/lora-gateway-bridge/) * [Documentation](https://www.loraserver.io/lora-gateway-bridge/) From 1fb73db2569e4885887edac075132abf5459ab38 Mon Sep 17 00:00:00 2001 From: Cesar Alvernaz Date: Sat, 16 Mar 2019 22:38:19 +0000 Subject: [PATCH 3/5] Improves struct layout. --- internal/gateway/semtech/packets/pull_resp.go | 10 +++++----- internal/gateway/semtech/packets/push_data.go | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/gateway/semtech/packets/pull_resp.go b/internal/gateway/semtech/packets/pull_resp.go index b27973db..18bdbb6f 100644 --- a/internal/gateway/semtech/packets/pull_resp.go +++ b/internal/gateway/semtech/packets/pull_resp.go @@ -63,22 +63,22 @@ type PullRespPayload struct { // TXPK contains a RF packet to be emitted and associated metadata. type TXPK struct { Imme bool `json:"imme"` // Send packet immediately (will ignore tmst & time) + RFCh uint8 `json:"rfch"` // Concentrator "RF chain" used for TX (unsigned integer) + Powe uint8 `json:"powe"` // TX output power in dBm (unsigned integer, dBm precision) + Ant uint8 `json:"ant"` // Antenna number on which signal has been received + Brd uint32 `json:"brd"` // Concentrator board used for RX (unsigned integer) Tmst *uint32 `json:"tmst,omitempty"` // Send packet on a certain timestamp value (will ignore time) Tmms *int64 `json:"tmms,omitempty"` // Send packet at a certain GPS time (GPS synchronization required) Freq float64 `json:"freq"` // TX central frequency in MHz (unsigned float, Hz precision) - RFCh uint8 `json:"rfch"` // Concentrator "RF chain" used for TX (unsigned integer) - Powe uint8 `json:"powe"` // TX output power in dBm (unsigned integer, dBm precision) Modu string `json:"modu"` // Modulation identifier "LORA" or "FSK" DatR DatR `json:"datr"` // LoRa datarate identifier (eg. SF12BW500) || FSK datarate (unsigned, in bits per second) CodR string `json:"codr,omitempty"` // LoRa ECC coding rate identifier FDev uint16 `json:"fdev,omitempty"` // FSK frequency deviation (unsigned integer, in Hz) + NCRC bool `json:"ncrc,omitempty"` // If true, disable the CRC of the physical layer (optional) IPol bool `json:"ipol"` // Lora modulation polarization inversion Prea uint16 `json:"prea,omitempty"` // RF preamble size (unsigned integer) Size uint16 `json:"size"` // RF packet payload size in bytes (unsigned integer) - NCRC bool `json:"ncrc,omitempty"` // If true, disable the CRC of the physical layer (optional) Data []byte `json:"data"` // Base64 encoded RF packet payload, padding optional - Brd uint32 `json:"brd"` // Concentrator board used for RX (unsigned integer) - Ant uint8 `json:"ant"` // Antenna number on which signal has been received } // GetPullRespPacket returns a PullRespPacket for the given gw.DownlinkFrame. diff --git a/internal/gateway/semtech/packets/push_data.go b/internal/gateway/semtech/packets/push_data.go index 38ce08e3..ad757a47 100644 --- a/internal/gateway/semtech/packets/push_data.go +++ b/internal/gateway/semtech/packets/push_data.go @@ -246,18 +246,18 @@ type RXPK struct { Time *CompactTime `json:"time"` // UTC time of pkt RX, us precision, ISO 8601 'compact' format (e.g. 2013-03-31T16:21:17.528002Z) Tmms *int64 `json:"tmms"` // GPS time of pkt RX, number of milliseconds since 06.Jan.1980 Tmst uint32 `json:"tmst"` // Internal timestamp of "RX finished" event (32b unsigned) - Freq float64 `json:"freq"` // RX central frequency in MHz (unsigned float, Hz precision) - Brd uint32 `json:"brd"` // Concentrator board used for RX (unsigned integer) AESK uint8 `json:"aesk"` //AES key index used for encrypting fine timestamps Chan uint8 `json:"chan"` // Concentrator "IF" channel used for RX (unsigned integer) RFCh uint8 `json:"rfch"` // Concentrator "RF chain" used for RX (unsigned integer) Stat int8 `json:"stat"` // CRC status: 1 = OK, -1 = fail, 0 = no CRC - Modu string `json:"modu"` // Modulation identifier "LORA" or "FSK" + Freq float64 `json:"freq"` // RX central frequency in MHz (unsigned float, Hz precision) + Brd uint32 `json:"brd"` // Concentrator board used for RX (unsigned integer) + RSSI int16 `json:"rssi"` // RSSI in dBm (signed integer, 1 dB precision) + Size uint16 `json:"size"` // RF packet payload size in bytes (unsigned integer) DatR DatR `json:"datr"` // LoRa datarate identifier (eg. SF12BW500) || FSK datarate (unsigned, in bits per second) + Modu string `json:"modu"` // Modulation identifier "LORA" or "FSK" CodR string `json:"codr"` // LoRa ECC coding rate identifier - RSSI int16 `json:"rssi"` // RSSI in dBm (signed integer, 1 dB precision) LSNR float64 `json:"lsnr"` // Lora SNR ratio in dB (signed float, 0.1 dB precision) - Size uint16 `json:"size"` // RF packet payload size in bytes (unsigned integer) Data []byte `json:"data"` // Base64 encoded RF packet payload, padded RSig []RSig `json:"rsig"` // Received signal information, per antenna (Optional) } From 648430bc58207bf873bdd6ed6fe1c34b26bbc1c1 Mon Sep 17 00:00:00 2001 From: Cesar Alvernaz Date: Sat, 16 Mar 2019 22:47:12 +0000 Subject: [PATCH 4/5] Revert "Improves struct layout." This reverts commit 1fb73db2569e4885887edac075132abf5459ab38. --- internal/gateway/semtech/packets/pull_resp.go | 10 +++++----- internal/gateway/semtech/packets/push_data.go | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/gateway/semtech/packets/pull_resp.go b/internal/gateway/semtech/packets/pull_resp.go index 18bdbb6f..b27973db 100644 --- a/internal/gateway/semtech/packets/pull_resp.go +++ b/internal/gateway/semtech/packets/pull_resp.go @@ -63,22 +63,22 @@ type PullRespPayload struct { // TXPK contains a RF packet to be emitted and associated metadata. type TXPK struct { Imme bool `json:"imme"` // Send packet immediately (will ignore tmst & time) - RFCh uint8 `json:"rfch"` // Concentrator "RF chain" used for TX (unsigned integer) - Powe uint8 `json:"powe"` // TX output power in dBm (unsigned integer, dBm precision) - Ant uint8 `json:"ant"` // Antenna number on which signal has been received - Brd uint32 `json:"brd"` // Concentrator board used for RX (unsigned integer) Tmst *uint32 `json:"tmst,omitempty"` // Send packet on a certain timestamp value (will ignore time) Tmms *int64 `json:"tmms,omitempty"` // Send packet at a certain GPS time (GPS synchronization required) Freq float64 `json:"freq"` // TX central frequency in MHz (unsigned float, Hz precision) + RFCh uint8 `json:"rfch"` // Concentrator "RF chain" used for TX (unsigned integer) + Powe uint8 `json:"powe"` // TX output power in dBm (unsigned integer, dBm precision) Modu string `json:"modu"` // Modulation identifier "LORA" or "FSK" DatR DatR `json:"datr"` // LoRa datarate identifier (eg. SF12BW500) || FSK datarate (unsigned, in bits per second) CodR string `json:"codr,omitempty"` // LoRa ECC coding rate identifier FDev uint16 `json:"fdev,omitempty"` // FSK frequency deviation (unsigned integer, in Hz) - NCRC bool `json:"ncrc,omitempty"` // If true, disable the CRC of the physical layer (optional) IPol bool `json:"ipol"` // Lora modulation polarization inversion Prea uint16 `json:"prea,omitempty"` // RF preamble size (unsigned integer) Size uint16 `json:"size"` // RF packet payload size in bytes (unsigned integer) + NCRC bool `json:"ncrc,omitempty"` // If true, disable the CRC of the physical layer (optional) Data []byte `json:"data"` // Base64 encoded RF packet payload, padding optional + Brd uint32 `json:"brd"` // Concentrator board used for RX (unsigned integer) + Ant uint8 `json:"ant"` // Antenna number on which signal has been received } // GetPullRespPacket returns a PullRespPacket for the given gw.DownlinkFrame. diff --git a/internal/gateway/semtech/packets/push_data.go b/internal/gateway/semtech/packets/push_data.go index ad757a47..38ce08e3 100644 --- a/internal/gateway/semtech/packets/push_data.go +++ b/internal/gateway/semtech/packets/push_data.go @@ -246,18 +246,18 @@ type RXPK struct { Time *CompactTime `json:"time"` // UTC time of pkt RX, us precision, ISO 8601 'compact' format (e.g. 2013-03-31T16:21:17.528002Z) Tmms *int64 `json:"tmms"` // GPS time of pkt RX, number of milliseconds since 06.Jan.1980 Tmst uint32 `json:"tmst"` // Internal timestamp of "RX finished" event (32b unsigned) + Freq float64 `json:"freq"` // RX central frequency in MHz (unsigned float, Hz precision) + Brd uint32 `json:"brd"` // Concentrator board used for RX (unsigned integer) AESK uint8 `json:"aesk"` //AES key index used for encrypting fine timestamps Chan uint8 `json:"chan"` // Concentrator "IF" channel used for RX (unsigned integer) RFCh uint8 `json:"rfch"` // Concentrator "RF chain" used for RX (unsigned integer) Stat int8 `json:"stat"` // CRC status: 1 = OK, -1 = fail, 0 = no CRC - Freq float64 `json:"freq"` // RX central frequency in MHz (unsigned float, Hz precision) - Brd uint32 `json:"brd"` // Concentrator board used for RX (unsigned integer) - RSSI int16 `json:"rssi"` // RSSI in dBm (signed integer, 1 dB precision) - Size uint16 `json:"size"` // RF packet payload size in bytes (unsigned integer) - DatR DatR `json:"datr"` // LoRa datarate identifier (eg. SF12BW500) || FSK datarate (unsigned, in bits per second) Modu string `json:"modu"` // Modulation identifier "LORA" or "FSK" + DatR DatR `json:"datr"` // LoRa datarate identifier (eg. SF12BW500) || FSK datarate (unsigned, in bits per second) CodR string `json:"codr"` // LoRa ECC coding rate identifier + RSSI int16 `json:"rssi"` // RSSI in dBm (signed integer, 1 dB precision) LSNR float64 `json:"lsnr"` // Lora SNR ratio in dB (signed float, 0.1 dB precision) + Size uint16 `json:"size"` // RF packet payload size in bytes (unsigned integer) Data []byte `json:"data"` // Base64 encoded RF packet payload, padded RSig []RSig `json:"rsig"` // Received signal information, per antenna (Optional) } From 2228b7deedfdb88612a4a64148601905dd2660dc Mon Sep 17 00:00:00 2001 From: Cesar Alvernaz Date: Sat, 16 Mar 2019 22:38:19 +0000 Subject: [PATCH 5/5] Improves struct layout. --- internal/gateway/semtech/packets/pull_resp.go | 10 +++++----- internal/gateway/semtech/packets/push_data.go | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/gateway/semtech/packets/pull_resp.go b/internal/gateway/semtech/packets/pull_resp.go index b27973db..18bdbb6f 100644 --- a/internal/gateway/semtech/packets/pull_resp.go +++ b/internal/gateway/semtech/packets/pull_resp.go @@ -63,22 +63,22 @@ type PullRespPayload struct { // TXPK contains a RF packet to be emitted and associated metadata. type TXPK struct { Imme bool `json:"imme"` // Send packet immediately (will ignore tmst & time) + RFCh uint8 `json:"rfch"` // Concentrator "RF chain" used for TX (unsigned integer) + Powe uint8 `json:"powe"` // TX output power in dBm (unsigned integer, dBm precision) + Ant uint8 `json:"ant"` // Antenna number on which signal has been received + Brd uint32 `json:"brd"` // Concentrator board used for RX (unsigned integer) Tmst *uint32 `json:"tmst,omitempty"` // Send packet on a certain timestamp value (will ignore time) Tmms *int64 `json:"tmms,omitempty"` // Send packet at a certain GPS time (GPS synchronization required) Freq float64 `json:"freq"` // TX central frequency in MHz (unsigned float, Hz precision) - RFCh uint8 `json:"rfch"` // Concentrator "RF chain" used for TX (unsigned integer) - Powe uint8 `json:"powe"` // TX output power in dBm (unsigned integer, dBm precision) Modu string `json:"modu"` // Modulation identifier "LORA" or "FSK" DatR DatR `json:"datr"` // LoRa datarate identifier (eg. SF12BW500) || FSK datarate (unsigned, in bits per second) CodR string `json:"codr,omitempty"` // LoRa ECC coding rate identifier FDev uint16 `json:"fdev,omitempty"` // FSK frequency deviation (unsigned integer, in Hz) + NCRC bool `json:"ncrc,omitempty"` // If true, disable the CRC of the physical layer (optional) IPol bool `json:"ipol"` // Lora modulation polarization inversion Prea uint16 `json:"prea,omitempty"` // RF preamble size (unsigned integer) Size uint16 `json:"size"` // RF packet payload size in bytes (unsigned integer) - NCRC bool `json:"ncrc,omitempty"` // If true, disable the CRC of the physical layer (optional) Data []byte `json:"data"` // Base64 encoded RF packet payload, padding optional - Brd uint32 `json:"brd"` // Concentrator board used for RX (unsigned integer) - Ant uint8 `json:"ant"` // Antenna number on which signal has been received } // GetPullRespPacket returns a PullRespPacket for the given gw.DownlinkFrame. diff --git a/internal/gateway/semtech/packets/push_data.go b/internal/gateway/semtech/packets/push_data.go index 38ce08e3..ad757a47 100644 --- a/internal/gateway/semtech/packets/push_data.go +++ b/internal/gateway/semtech/packets/push_data.go @@ -246,18 +246,18 @@ type RXPK struct { Time *CompactTime `json:"time"` // UTC time of pkt RX, us precision, ISO 8601 'compact' format (e.g. 2013-03-31T16:21:17.528002Z) Tmms *int64 `json:"tmms"` // GPS time of pkt RX, number of milliseconds since 06.Jan.1980 Tmst uint32 `json:"tmst"` // Internal timestamp of "RX finished" event (32b unsigned) - Freq float64 `json:"freq"` // RX central frequency in MHz (unsigned float, Hz precision) - Brd uint32 `json:"brd"` // Concentrator board used for RX (unsigned integer) AESK uint8 `json:"aesk"` //AES key index used for encrypting fine timestamps Chan uint8 `json:"chan"` // Concentrator "IF" channel used for RX (unsigned integer) RFCh uint8 `json:"rfch"` // Concentrator "RF chain" used for RX (unsigned integer) Stat int8 `json:"stat"` // CRC status: 1 = OK, -1 = fail, 0 = no CRC - Modu string `json:"modu"` // Modulation identifier "LORA" or "FSK" + Freq float64 `json:"freq"` // RX central frequency in MHz (unsigned float, Hz precision) + Brd uint32 `json:"brd"` // Concentrator board used for RX (unsigned integer) + RSSI int16 `json:"rssi"` // RSSI in dBm (signed integer, 1 dB precision) + Size uint16 `json:"size"` // RF packet payload size in bytes (unsigned integer) DatR DatR `json:"datr"` // LoRa datarate identifier (eg. SF12BW500) || FSK datarate (unsigned, in bits per second) + Modu string `json:"modu"` // Modulation identifier "LORA" or "FSK" CodR string `json:"codr"` // LoRa ECC coding rate identifier - RSSI int16 `json:"rssi"` // RSSI in dBm (signed integer, 1 dB precision) LSNR float64 `json:"lsnr"` // Lora SNR ratio in dB (signed float, 0.1 dB precision) - Size uint16 `json:"size"` // RF packet payload size in bytes (unsigned integer) Data []byte `json:"data"` // Base64 encoded RF packet payload, padded RSig []RSig `json:"rsig"` // Received signal information, per antenna (Optional) }