mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Add JP_STRICT mode: enforce MAX_TEXT_LEN for ARIB STD-T108 compliance
JP_STRICT limits MAX_TEXT_LEN to 1*CIPHER_BLOCK_SIZE (16 bytes) to keep TX time under 4 seconds on SF12/BW125/CR4-8 (Japan LoRa settings). SF12/BW125/CR4-8 airtime: 60 bytes total packet = ~3809ms (within 4s limit) packet overhead ~44 bytes, leaving 16 bytes for text payload Enabled only for WioTrackerL1 and RAK_WisMesh_Tag builds.
This commit is contained in:
parent
52b9d877a6
commit
309a090958
3 changed files with 11 additions and 2 deletions
|
|
@ -5,7 +5,14 @@
|
|||
#include <helpers/AdvertDataHelpers.h>
|
||||
#include <helpers/TxtDataHelpers.h>
|
||||
|
||||
#define MAX_TEXT_LEN (10*CIPHER_BLOCK_SIZE) // must be LESS than (MAX_PACKET_PAYLOAD - 4 - CIPHER_MAC_SIZE - 1)
|
||||
// JP_STRICT: limit MAX_TEXT_LEN to keep TX time under 4s (ARIB STD-T108)
|
||||
// SF12/BW125/CR4-8: 60 bytes total packet = ~3809ms, overhead ~44 bytes
|
||||
// leaving 16 bytes (1*CIPHER_BLOCK_SIZE) for text payload
|
||||
#ifdef JP_STRICT
|
||||
#define MAX_TEXT_LEN (1*CIPHER_BLOCK_SIZE) // ~16 chars, TX <= 4s for JP
|
||||
#else
|
||||
#define MAX_TEXT_LEN (10*CIPHER_BLOCK_SIZE) // must be LESS than (MAX_PACKET_PAYLOAD - 4 - CIPHER_MAC_SIZE - 1)
|
||||
#endif
|
||||
|
||||
#include "ContactInfo.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue