From 7344fcbfb7dbc1ed758b72e336a7f1a627870c82 Mon Sep 17 00:00:00 2001 From: n30nex Date: Wed, 9 Sep 2026 19:07:44 -0400 Subject: [PATCH] Document the separate Canada preset and three-byte path default --- data/communities.json | 2 +- docs/analyzer/builds/mqtt-firmware.fr.md | 4 +- docs/analyzer/builds/mqtt-firmware.md | 4 +- docs/analyzer/intro.fr.md | 4 +- docs/analyzer/intro.md | 4 +- docs/analyzer/observer-config.json | 6 +-- docs/assets/regions/regions.js | 3 ++ docs/config/index.fr.md | 2 +- docs/config/index.md | 2 +- docs/config/map.fr.md | 2 +- docs/config/map.md | 2 +- docs/index.fr.md | 4 +- docs/index.md | 4 +- docs/meshcore/flash-companion.fr.md | 4 +- docs/meshcore/flash-companion.md | 4 +- docs/meshcore/flash-repeater.fr.md | 4 +- docs/meshcore/flash-repeater.md | 4 +- docs/meshcore/flash-room-server.fr.md | 4 +- docs/meshcore/flash-room-server.md | 4 +- docs/meshcore/general-faq.fr.md | 14 ++++-- docs/meshcore/general-faq.md | 12 +++-- docs/provinces/index.fr.md | 12 ++++- docs/provinces/index.md | 11 ++++- docs/start/companion.fr.md | 4 +- docs/start/companion.md | 4 +- docs/start/observer.fr.md | 4 +- docs/start/observer.md | 4 +- docs/start/repeater.fr.md | 4 +- docs/start/repeater.md | 4 +- docs/start/room-server.fr.md | 4 +- docs/start/room-server.md | 4 +- scripts/validate-communities.py | 19 ++++++++ tests/browser/canada-preset.spec.mjs | 36 +++++++++++++++ tests/content/canada-preset.test.mjs | 59 ++++++++++++++++++++++++ tests/content/p0-content-safety.test.mjs | 3 +- 35 files changed, 223 insertions(+), 42 deletions(-) create mode 100644 tests/browser/canada-preset.spec.mjs create mode 100644 tests/content/canada-preset.test.mjs diff --git a/data/communities.json b/data/communities.json index 628f2854..b18a272f 100644 --- a/data/communities.json +++ b/data/communities.json @@ -10,7 +10,7 @@ "update_route": "../submit-idea.md" }, "national_defaults": { - "radio_preset": "USA/Canada (Recommended)", + "radio_preset": "Canada", "raw_radio": { "frequency_mhz": 910.525, "bandwidth_khz": 62.5, diff --git a/docs/analyzer/builds/mqtt-firmware.fr.md b/docs/analyzer/builds/mqtt-firmware.fr.md index 54410865..6b3236d7 100644 --- a/docs/analyzer/builds/mqtt-firmware.fr.md +++ b/docs/analyzer/builds/mqtt-firmware.fr.md @@ -92,13 +92,15 @@ propre à la communauté, la configuration canadienne de départ est : | Paramètre | Valeur | |---|---| -| Préréglage radio | **USA/Canada (Recommended)** | +| Préréglage radio | **Canada** | | Valeurs radio brutes | `910.525 MHz / 62.5 kHz / SF7 / CR5` | | Empreintes de chemin | 3 octets (`set path.hash.mode 2`) | | Préréglage principal | `meshcore-ca-1` | | Préréglage de secours | `meshcore-ca-2` | | Wi-Fi | Un réseau 2,4 GHz | +Si Canada n’apparaît pas dans l’outil de configuration, suivez les [consignes pour l’ancien préréglage](../../provinces/index.md#canada-baseline). + ### 3. Générer les commandes Ces commandes remplacent les emplacements MQTT **1 et 2**. S’ils servent déjà à un diff --git a/docs/analyzer/builds/mqtt-firmware.md b/docs/analyzer/builds/mqtt-firmware.md index f86cae55..8adf170d 100644 --- a/docs/analyzer/builds/mqtt-firmware.md +++ b/docs/analyzer/builds/mqtt-firmware.md @@ -80,13 +80,15 @@ Use the local mesh settings. When no community override exists, the Canadian onb | Setting | Value | |---|---| -| Radio preset | **USA/Canada (Recommended)** | +| Radio preset | **Canada** | | Raw radio values | `910.525 MHz / 62.5 kHz / SF7 / CR5` | | Path hashes | 3 bytes (`set path.hash.mode 2`) | | Primary preset | `meshcore-ca-1` | | Backup preset | `meshcore-ca-2` | | Wi-Fi | A 2.4 GHz network | +If Canada is not listed in the setup tool, follow the [older-preset instructions](../../provinces/index.md#canada-baseline). + ### 3. Build the commands These commands replace MQTT slots **1 and 2**. Check those slots first; if they diff --git a/docs/analyzer/intro.fr.md b/docs/analyzer/intro.fr.md index 116596a2..59860bff 100644 --- a/docs/analyzer/intro.fr.md +++ b/docs/analyzer/intro.fr.md @@ -83,10 +83,12 @@ Quelle que soit la méthode choisie, il vous faut : - la publication des paquets, et non seulement de l’état; - un hôte ou une carte toujours en ligne. -La configuration canadienne de départ est **USA/Canada (Recommended)**, +La configuration canadienne de départ est **Canada**, `910.525 MHz / 62.5 kHz / SF7 / CR5`, avec le hachage des chemins sur 3 octets. Une configuration locale publiée a priorité. +Consultez les [détails du préréglage Canada et les consignes pour les anciennes applications](../provinces/index.md#canada-baseline). + Pour connaître les champs exacts du courtier, consultez les [paramètres de connexion des observateurs](broker-reference.md). diff --git a/docs/analyzer/intro.md b/docs/analyzer/intro.md index 2f5e6604..3ab769e6 100644 --- a/docs/analyzer/intro.md +++ b/docs/analyzer/intro.md @@ -78,7 +78,9 @@ Whichever setup you choose, you need: - packet publishing, not status-only publishing; and - an always-on host or board. -The Canadian onboarding baseline is **USA/Canada (Recommended)**, `910.525 MHz / 62.5 kHz / SF7 / CR5`, with 3-byte path hashes. A published local setting takes priority. +The Canadian onboarding baseline is **Canada**, `910.525 MHz / 62.5 kHz / SF7 / CR5`, with 3-byte path hashes. A published local setting takes priority. + +See the [Canada preset and older-app guidance](../provinces/index.md#canada-baseline). For exact broker fields, use the [observer connection reference](broker-reference.md). diff --git a/docs/analyzer/observer-config.json b/docs/analyzer/observer-config.json index bb79abfa..9628c246 100644 --- a/docs/analyzer/observer-config.json +++ b/docs/analyzer/observer-config.json @@ -1,9 +1,9 @@ { "schema_version": 1, - "version": "2026.07", - "last_reviewed": "2026-07-19", + "version": "2026.09", + "last_reviewed": "2026-09-09", "network": { - "preset": "USA/Canada (Recommended)", + "preset": "Canada", "frequency_mhz": 910.525, "bandwidth_khz": 62.5, "spreading_factor": 7, diff --git a/docs/assets/regions/regions.js b/docs/assets/regions/regions.js index 96240f01..45e1b899 100644 --- a/docs/assets/regions/regions.js +++ b/docs/assets/regions/regions.js @@ -23,6 +23,8 @@ "Advert ID size": "Taille de l’identifiant d’annonce", "Keep current settings": "Conserver les réglages actuels", "Choose a profile only after checking with your community. A region does not select a radio network.": "Confirmez le profil auprès de votre communauté. Une région ne détermine pas les réglages radio.", + "The Canada app preset uses 3-byte paths. Here, choose radio and advert ID settings separately.": "Le préréglage Canada de l’application utilise des parcours de 3 octets. Ici, choisissez séparément les réglages radio et la taille de l’identifiant d’annonce.", + "Canada preset details": "Détails du préréglage Canada", "Radio changes take effect after reboot.": "Les changements radio prennent effet après le redémarrage.", "Choose the region you mean:": "Choisissez la région recherchée :", "This saved location is invalid or no longer available. Choose a region again.": "Cet emplacement est invalide ou n’est plus disponible. Choisissez une région à nouveau.", @@ -2086,6 +2088,7 @@ '

Choose a profile only after checking with your community. A region does not select a radio network.

' + '' + '' + + '

The Canada app preset uses 3-byte paths. Here, choose radio and advert ID settings separately. Canada preset details

' + '
' + 'Firmware version' + '

Firmware version

' + diff --git a/docs/config/index.fr.md b/docs/config/index.fr.md index 28b8095b..64f055e3 100644 --- a/docs/config/index.fr.md +++ b/docs/config/index.fr.md @@ -18,7 +18,7 @@ page_styles: page_scripts: - assets/javascripts/radio-profiles.js?v=20260904-1 - assets/regions/modules/configurator-support.js?v=20260904-1 - - assets/regions/regions.js?v=20260905-1 + - assets/regions/regions.js?v=20260909-1 hide: - navigation - toc diff --git a/docs/config/index.md b/docs/config/index.md index 375f7e72..b9e3f9c5 100644 --- a/docs/config/index.md +++ b/docs/config/index.md @@ -18,7 +18,7 @@ page_styles: page_scripts: - assets/javascripts/radio-profiles.js?v=20260904-1 - assets/regions/modules/configurator-support.js?v=20260904-1 - - assets/regions/regions.js?v=20260905-1 + - assets/regions/regions.js?v=20260909-1 hide: - navigation - toc diff --git a/docs/config/map.fr.md b/docs/config/map.fr.md index ffa4ca5f..759e1aa8 100644 --- a/docs/config/map.fr.md +++ b/docs/config/map.fr.md @@ -19,7 +19,7 @@ page_styles: page_scripts: - assets/javascripts/radio-profiles.js?v=20260904-1 - assets/regions/modules/configurator-support.js?v=20260904-1 - - assets/regions/regions.js?v=20260905-1 + - assets/regions/regions.js?v=20260909-1 hide: - toc --- diff --git a/docs/config/map.md b/docs/config/map.md index 27454db0..02e15933 100644 --- a/docs/config/map.md +++ b/docs/config/map.md @@ -19,7 +19,7 @@ page_styles: page_scripts: - assets/javascripts/radio-profiles.js?v=20260904-1 - assets/regions/modules/configurator-support.js?v=20260904-1 - - assets/regions/regions.js?v=20260905-1 + - assets/regions/regions.js?v=20260909-1 hide: - toc --- diff --git a/docs/index.fr.md b/docs/index.fr.md index 622fe0f4..cbb5efd8 100644 --- a/docs/index.fr.md +++ b/docs/index.fr.md @@ -110,14 +110,14 @@ Utilisez ces paramètres, sauf si votre communauté en indique d’autres. | Paramètre | Valeur par défaut au Canada | |---|---| -| Préréglage radio | **USA/Canada (Recommended)** | +| Préréglage radio | **Canada** | | Valeurs radio détaillées | `910.525 MHz / 62.5 kHz / SF7 / CR5` | | Hachage des chemins | **3 octets** | | Commande correspondante | `set path.hash.mode 2` | -

Prévu : un préréglage Canada distinct, avec les mêmes paramètres radio que USA/Canada et un hachage de 3 octets par défaut pour tous les types d’appareils. Suivre la discussion.

+

Le préréglage Canada de l’application conserve les paramètres radio de l’ancien USA/Canada et choisit des parcours de 3 octets. Le préréglage distinct USA ne modifie pas la taille du hachage. Détails et anciennes applications · Annonce du changement.

## Améliorer MeshCore Canada diff --git a/docs/index.md b/docs/index.md index e4ef2177..1a302640 100644 --- a/docs/index.md +++ b/docs/index.md @@ -108,14 +108,14 @@ Use these defaults unless your local community lists different settings. | Setting | Canada default | |---|---| -| Radio preset | **USA/Canada (Recommended)** | +| Radio preset | **Canada** | | Raw radio values | `910.525 MHz / 62.5 kHz / SF7 / CR5` | | Path setting | **3-byte** | | Command-line path setting | `set path.hash.mode 2` | -

Planned: a separate Canada preset with the same radio settings as USA/Canada and 3-byte hash mode by default for all device types. Follow the preset discussion.

+

The app’s Canada preset keeps the former USA/Canada radio settings and selects 3-byte paths. The separate USA preset leaves the path-hash setting unchanged. Preset details and older apps · Upstream update.

## Improve MeshCore Canada diff --git a/docs/meshcore/flash-companion.fr.md b/docs/meshcore/flash-companion.fr.md index fdec5835..344cc990 100644 --- a/docs/meshcore/flash-companion.fr.md +++ b/docs/meshcore/flash-companion.fr.md @@ -94,9 +94,11 @@ réglage. 1. Jumelez le nœud à une application MeshCore compatible sur votre téléphone ou votre ordinateur. 2. Donnez-lui un nom descriptif qui ne révèle pas un emplacement privé. 3. Vérifiez si la page de votre communauté locale indique des réglages différents. -4. Si elle n’en indique aucun, utilisez les réglages par défaut du Canada : **USA/Canada (Recommended)** (`910.525 MHz / 62.5 kHz / SF7 / CR5`). +4. Si elle n’en indique aucun, choisissez **Canada** (`910.525 MHz / 62.5 kHz / SF7 / CR5`) et confirmez les parcours de **3 octets**. 5. Enregistrez les réglages, puis reconnectez-vous après le redémarrage de l’appareil. +Si Canada n’apparaît pas dans votre application ou outil de programmation, suivez les [consignes pour l’ancien préréglage](../provinces/index.md#canada-baseline). + Le réglage facultatif **Message Settings → Auto Reset Path** détermine comment l’application gère les changements de parcours. Conservez sa valeur par défaut, sauf si votre méthode d’essai locale exige un autre réglage. diff --git a/docs/meshcore/flash-companion.md b/docs/meshcore/flash-companion.md index 636f5993..09319473 100644 --- a/docs/meshcore/flash-companion.md +++ b/docs/meshcore/flash-companion.md @@ -80,9 +80,11 @@ The flasher reports completion, the board restarts as a companion, and the suppo 1. Pair the node with the supported MeshCore app on your phone or computer. 2. Give it a descriptive name that does not reveal a private location. 3. Check your local community page for different settings. -4. If none are listed, use the Canada defaults: **USA/Canada (Recommended)** (`910.525 MHz / 62.5 kHz / SF7 / CR5`). +4. If none are listed, choose **Canada** (`910.525 MHz / 62.5 kHz / SF7 / CR5`) and confirm **3-byte** paths. 5. Save the settings and reconnect after the device restarts. +If Canada is not listed in your app or flasher, follow the [older-preset instructions](../provinces/index.md#canada-baseline). + The optional **Message Settings → Auto Reset Path** preference affects how the app manages changing paths. Leave it at its default unless your local testing process calls for a different setting. ## Verify before regular use diff --git a/docs/meshcore/flash-repeater.fr.md b/docs/meshcore/flash-repeater.fr.md index acb3b1cd..e06b6545 100644 --- a/docs/meshcore/flash-repeater.fr.md +++ b/docs/meshcore/flash-repeater.fr.md @@ -126,7 +126,7 @@ n’est pas atteint, suivez le plan de récupération avant de configurer l’ap 3. Entrez l’emplacement prévu ou utilisez la carte. Ne publiez pas un emplacement privé exact à moins que ce soit approprié pour le site. 4. Donnez-lui un nom descriptif, comme `Callsign_R1` ou `Downtown_R1`. 5. Créez un mot de passe administrateur unique et conservez-le de façon sécuritaire. -6. Confirmez que la communauté locale n’a pas publié de réglages différents. Sinon, appliquez **USA/Canada (Recommended)** (`910.525 MHz / 62.5 kHz / SF7 / CR5`). +6. Confirmez que la communauté locale n’a pas publié de réglages différents. Sinon, appliquez **Canada** (`910.525 MHz / 62.5 kHz / SF7 / CR5`). 7. Utilisez les valeurs d’annonce actuellement recommandées par MeshCore Canada : - **Advert Interval:** `60` minutes - **Flood Advert Interval:** `24` heures @@ -135,6 +135,8 @@ n’est pas atteint, suivez le plan de récupération avant de configurer l’ap 9. Ajoutez les renseignements sur le propriétaire seulement s’ils conviennent à des annonces publiques. 10. Enregistrez les réglages et redémarrez l’appareil. +Si Canada n’apparaît pas dans votre application ou outil de programmation, suivez les [consignes pour l’ancien préréglage](../provinces/index.md#canada-baseline). + ### Détection des boucles { #loop-detection } Le micrologiciel de répéteur **1.14 ou une version plus récente** peut rejeter diff --git a/docs/meshcore/flash-repeater.md b/docs/meshcore/flash-repeater.md index 245c270a..ca1520dd 100644 --- a/docs/meshcore/flash-repeater.md +++ b/docs/meshcore/flash-repeater.md @@ -103,7 +103,7 @@ The flasher reports completion, the board restarts as a repeater, and the setup 3. Enter the intended location or use the map. Do not publish an exact private location unless that is appropriate for the site. 4. Set a descriptive name, such as `Callsign_R1` or `Downtown_R1`. 5. Set a unique admin password and store it securely. -6. Confirm the local community has not documented an override. Otherwise apply **USA/Canada (Recommended)** (`910.525 MHz / 62.5 kHz / SF7 / CR5`). +6. Confirm the local community has not documented an override. Otherwise apply **Canada** (`910.525 MHz / 62.5 kHz / SF7 / CR5`). 7. Set the current MeshCore Canada default advert values: - **Advert Interval:** `60` minutes - **Flood Advert Interval:** `24` hours @@ -112,6 +112,8 @@ The flasher reports completion, the board restarts as a repeater, and the setup 9. Add owner information only if it is suitable for public adverts. 10. Save the settings and reboot. +If Canada is not listed in your app or flasher, follow the [older-preset instructions](../provinces/index.md#canada-baseline). + ### Loop detection Repeater firmware **1.14 or newer** can reject packets that repeatedly pass diff --git a/docs/meshcore/flash-room-server.fr.md b/docs/meshcore/flash-room-server.fr.md index 5cd88565..7c6465f1 100644 --- a/docs/meshcore/flash-room-server.fr.md +++ b/docs/meshcore/flash-room-server.fr.md @@ -91,9 +91,11 @@ suivez le plan de récupération avant de configurer les accès. 4. Créez des mots de passe invité et administrateur distincts et uniques, puis conservez-les de façon sécuritaire. - Le mot de passe invité est remis aux personnes qui doivent accéder au salon. - Le mot de passe administrateur contrôle la gestion et ne doit pas être utilisé comme mot de passe invité. -5. Vérifiez si la page de la communauté locale indique d’autres réglages. Si elle n’en indique aucun, utilisez les réglages par défaut du Canada : **USA/Canada (Recommended)** (`910.525 MHz / 62.5 kHz / SF7 / CR5`). +5. Vérifiez si la page de la communauté locale indique d’autres réglages. Si elle n’en indique aucun, choisissez **Canada** (`910.525 MHz / 62.5 kHz / SF7 / CR5`) et des parcours de **3 octets** (`set path.hash.mode 2`). 6. Enregistrez les réglages et redémarrez l’appareil. +Si Canada n’apparaît pas dans votre application ou outil de programmation, suivez les [consignes pour l’ancien préréglage](../provinces/index.md#canada-baseline). + ## Tester le serveur 1. Reconnectez-vous à la console après le redémarrage et confirmez le nom, le rôle et les réglages radio. diff --git a/docs/meshcore/flash-room-server.md b/docs/meshcore/flash-room-server.md index d4babb94..453c6f54 100644 --- a/docs/meshcore/flash-room-server.md +++ b/docs/meshcore/flash-room-server.md @@ -73,9 +73,11 @@ The flasher reports completion, the device restarts as a Room Server, and **Conf 4. Set separate, unique guest and admin passwords and store them securely. - The guest password is shared with people who should enter the room. - The admin password controls management access and should not be shared as the guest password. -5. Check the local community page for different settings. If none are listed, use the Canada defaults: **USA/Canada (Recommended)** (`910.525 MHz / 62.5 kHz / SF7 / CR5`). +5. Check the local community page for different settings. If none are listed, choose **Canada** (`910.525 MHz / 62.5 kHz / SF7 / CR5`) and **3-byte** paths (`set path.hash.mode 2`). 6. Save settings and reboot. +If Canada is not listed in your app or flasher, follow the [older-preset instructions](../provinces/index.md#canada-baseline). + ## Test the server 1. Reconnect to the console after reboot and confirm the name, role, and radio settings. diff --git a/docs/meshcore/general-faq.fr.md b/docs/meshcore/general-faq.fr.md index 22878599..b46aa89e 100644 --- a/docs/meshcore/general-faq.fr.md +++ b/docs/meshcore/general-faq.fr.md @@ -34,12 +34,16 @@ source actuelle. ### Quels réglages radio dois-je utiliser au Canada? -Utilisez le profil radio de votre communauté. Le [configurateur de répéteur](../config/index.md) -trouve les chemins régionaux, mais conserve les réglages radio tant que vous ne choisissez pas de profil. +Utilisez le profil radio du [répertoire des communautés](../provinces/index.md). Si aucun n’est publié, choisissez +**Canada** dans l’application pour les paramètres canadiens et des parcours de +**3 octets**. Consultez les [détails et les consignes pour les anciennes applications](../provinces/index.md#canada-baseline). -Quel que soit le rôle de l’appareil, consultez d’abord le -[répertoire des communautés](../provinces/index.md). Lorsqu’une communauté -publie des réglages locaux différents, suivez-les. +Le préréglage distinct **USA** utilise les mêmes valeurs radio, mais ne modifie pas +la taille du hachage. [Annonce du changement](https://github.com/meshcore-dev/MeshCore/issues/3302#issuecomment-5598886579). + +Le [configurateur de répéteur](../config/index.md) trouve les chemins régionaux. +Ses réglages radio et de taille d’identifiant d’annonce sont séparés; les valeurs +actuelles sont conservées tant que vous ne choisissez pas de changement. ### Qu’est-ce que le mode de hachage des parcours? diff --git a/docs/meshcore/general-faq.md b/docs/meshcore/general-faq.md index 9f1e1e0c..382ba4c0 100644 --- a/docs/meshcore/general-faq.md +++ b/docs/meshcore/general-faq.md @@ -34,11 +34,15 @@ of repeating values that may change. ### Which radio settings should I use in Canada? -Use your community’s radio profile. The [repeater configurator](../config/index.md) -finds region paths, but keeps your radio settings unless you choose a profile. +Use the radio profile in the [community directory](../provinces/index.md). If none is published, choose **Canada** in the app +for the Canadian radio settings and **3-byte** paths. See the +[preset details and older-app guidance](../provinces/index.md#canada-baseline). -For any role, first check the [community directory](../provinces/index.md). -Follow a published local override when one exists. +The separate **USA** preset uses the same radio values but leaves the path-hash +setting unchanged. [Upstream preset update](https://github.com/meshcore-dev/MeshCore/issues/3302#issuecomment-5598886579). + +The [repeater configurator](../config/index.md) finds region paths. Its radio and +advert ID controls remain separate and keep current settings until you choose a change. ### What is path hash mode? diff --git a/docs/provinces/index.fr.md b/docs/provinces/index.fr.md index 1fea6ff3..7b36a63e 100644 --- a/docs/provinces/index.fr.md +++ b/docs/provinces/index.fr.md @@ -458,11 +458,21 @@ Utilisez ces réglages sauf si votre communauté locale en indique d’autres. | Réglage | Valeur par défaut au Canada | |---|---| -| Préréglage radio | `USA/Canada (Recommended)` | +| Préréglage radio | `Canada` | | Valeurs radio brutes | `910.525 MHz / 62.5 kHz / SF7 / CR5` | | Mode de hachage des parcours | `3-byte` | | Réglage du parcours en ligne de commande | `set path.hash.mode 2` | +L’application MeshCore propose maintenant deux préréglages distincts : **Canada** et **USA**. +Ils utilisent les mêmes valeurs radio ci-dessus, mais **Canada** choisit aussi des parcours de +**3 octets**. **USA** ne modifie pas la taille du hachage. Vous pouvez toujours la régler +manuellement. Voir l’[annonce du 9 septembre](https://github.com/meshcore-dev/MeshCore/issues/3302#issuecomment-5598886579). + +Si votre application ou outil de programmation affiche encore **USA/Canada (Recommended)**, +utilisez-le pour les mêmes valeurs radio et réglez les parcours sur **3 octets** séparément. +Mettez à jour les répéteurs dont le micrologiciel est antérieur à **1.14** : ces anciennes versions +ne peuvent pas relayer les parcours multioctets. + !!! warning "Vérifiez d’abord les réglages locaux" Les appareils à proximité doivent utiliser les mêmes réglages. Une fiche marquée **Réglages locaux différents** l’emporte sur les réglages par défaut du Canada diff --git a/docs/provinces/index.md b/docs/provinces/index.md index 3fdb30b9..b6fee053 100644 --- a/docs/provinces/index.md +++ b/docs/provinces/index.md @@ -482,11 +482,20 @@ Use these settings unless your local community lists different ones. | Setting | Canada default | |---|---| -| Radio preset | `USA/Canada (Recommended)` | +| Radio preset | `Canada` | | Raw radio values | `910.525 MHz / 62.5 kHz / SF7 / CR5` | | Path hash mode | `3-byte` | | Command-line path setting | `set path.hash.mode 2` | +The MeshCore app now has separate **Canada** and **USA** presets. Both use the radio values above, +but **Canada** also selects **3-byte** paths. **USA** leaves the path-hash setting unchanged. +You can still change that setting manually. See the +[September 9 preset update](https://github.com/meshcore-dev/MeshCore/issues/3302#issuecomment-5598886579). + +If your app or flasher still shows **USA/Canada (Recommended)**, use it for the same radio values +and set **3-byte** paths separately. Update repeaters older than firmware **1.14** before relying +on multi-byte paths; those older versions cannot forward them. + !!! warning "Check local settings first" Nearby devices need matching settings. A card marked **Different local settings** takes precedence over the Canada defaults after you confirm it with the diff --git a/docs/start/companion.fr.md b/docs/start/companion.fr.md index 75d0b7e7..6ca411e3 100644 --- a/docs/start/companion.fr.md +++ b/docs/start/companion.fr.md @@ -50,9 +50,11 @@ Suivez le guide [Installer et configurer un compagnon](../meshcore/flash-compani ## Choisir les bons paramètres radio -Utilisez le préréglage **USA/Canada (Recommended)** et le hachage des chemins +Utilisez le préréglage **Canada** et le hachage des chemins sur **3 octets**, sauf si votre communauté indique d’autres paramètres. +Si Canada n’apparaît pas, suivez les [consignes pour l’ancien préréglage](../provinces/index.md#canada-baseline). + !!! warning "Utilisez les mêmes paramètres que votre communauté" Consultez le [répertoire des communautés](../provinces/index.md). Si votre communauté publie d’autres paramètres, utilisez-les. diff --git a/docs/start/companion.md b/docs/start/companion.md index 87c6e5c3..d7ea3f5c 100644 --- a/docs/start/companion.md +++ b/docs/start/companion.md @@ -47,9 +47,11 @@ Follow [Flash and configure a companion](../meshcore/flash-companion.md). ## Use the right radio settings -Use **USA/Canada (Recommended)** with the **3-byte** path setting unless your +Use **Canada** with the **3-byte** path setting unless your community lists different settings. +If Canada is not listed, follow the [older-preset instructions](../provinces/index.md#canada-baseline). + !!! warning "Match your local mesh" Check the [community directory](../provinces/index.md). If your community publishes different settings, use those settings instead. diff --git a/docs/start/observer.fr.md b/docs/start/observer.fr.md index ed34d20f..cdbc4824 100644 --- a/docs/start/observer.fr.md +++ b/docs/start/observer.fr.md @@ -59,10 +59,12 @@ suivez uniquement le guide de la méthode choisie. ## Choisir les bons paramètres radio La radio connectée doit utiliser les mêmes paramètres que le réseau à -proximité. Commencez avec le préréglage **USA/Canada (Recommended)** et le +proximité. Commencez avec le préréglage **Canada** et le hachage des chemins sur **3 octets**, sauf si votre communauté indique d’autres paramètres. +Si Canada n’apparaît pas, suivez les [consignes pour l’ancien préréglage](../provinces/index.md#canada-baseline). + !!! warning "Utilisez les mêmes paramètres que votre communauté" Consultez le [répertoire des communautés](../provinces/index.md). Un observateur peut être en ligne sans capter de trafic utile si ses paramètres diff --git a/docs/start/observer.md b/docs/start/observer.md index 7be1ec65..0557b48d 100644 --- a/docs/start/observer.md +++ b/docs/start/observer.md @@ -55,9 +55,11 @@ guide for the selected method. ## Use the right radio settings The connected radio must use the same settings as the nearby mesh. Start with -**USA/Canada (Recommended)** and the **3-byte** path setting unless your +**Canada** and the **3-byte** path setting unless your community lists different settings. +If Canada is not listed, follow the [older-preset instructions](../provinces/index.md#canada-baseline). + !!! warning "Match your local mesh" Check the [community directory](../provinces/index.md). A connected observer can be online while hearing no useful traffic if its radio diff --git a/docs/start/repeater.fr.md b/docs/start/repeater.fr.md index 73f895a3..86523b75 100644 --- a/docs/start/repeater.fr.md +++ b/docs/start/repeater.fr.md @@ -53,9 +53,11 @@ Suivez le guide [Reprogrammer et configurer un répéteur](../meshcore/flash-rep ## Choisir les bons paramètres radio et régionaux -Utilisez le préréglage **USA/Canada (Recommended)** et le hachage des chemins +Utilisez le préréglage **Canada** et le hachage des chemins sur **3 octets**, sauf si votre communauté indique d’autres paramètres. +Si Canada n’apparaît pas, suivez les [consignes pour l’ancien préréglage](../provinces/index.md#canada-baseline). + !!! warning "Coordonnez les changements avant l’installation" Consultez le [répertoire des communautés](../provinces/index.md). Les répéteurs à proximité doivent utiliser les mêmes paramètres locaux. Les diff --git a/docs/start/repeater.md b/docs/start/repeater.md index 2d5b9220..83f84044 100644 --- a/docs/start/repeater.md +++ b/docs/start/repeater.md @@ -51,9 +51,11 @@ Follow [Flash and configure a repeater](../meshcore/flash-repeater.md). ## Use the right radio and region settings -Use **USA/Canada (Recommended)** with the **3-byte** path setting unless your +Use **Canada** with the **3-byte** path setting unless your community lists different settings. +If Canada is not listed, follow the [older-preset instructions](../provinces/index.md#canada-baseline). + !!! warning "Coordinate before installation" Check the [community directory](../provinces/index.md). Nearby repeaters need matching local settings, and operators should agree on changes that diff --git a/docs/start/room-server.fr.md b/docs/start/room-server.fr.md index 59c183f7..dd6fed5b 100644 --- a/docs/start/room-server.fr.md +++ b/docs/start/room-server.fr.md @@ -53,9 +53,11 @@ l’appareil en cas de problème. ## Choisir les bons paramètres radio -Utilisez le préréglage **USA/Canada (Recommended)** et le hachage des chemins +Utilisez le préréglage **Canada** et le hachage des chemins sur **3 octets**, sauf si votre communauté indique d’autres paramètres. +Si Canada n’apparaît pas, suivez les [consignes pour l’ancien préréglage](../provinces/index.md#canada-baseline). + !!! warning "Utilisez les mêmes paramètres que votre communauté" Consultez le [répertoire des communautés](../provinces/index.md). Si votre communauté publie d’autres paramètres, utilisez-les. diff --git a/docs/start/room-server.md b/docs/start/room-server.md index c6fcb923..edc84268 100644 --- a/docs/start/room-server.md +++ b/docs/start/room-server.md @@ -47,9 +47,11 @@ Use that guide for device selection, flashing, access setup, and recovery. ## Use the right radio settings -Use **USA/Canada (Recommended)** with the **3-byte** path setting unless your +Use **Canada** with the **3-byte** path setting unless your community lists different settings. +If Canada is not listed, follow the [older-preset instructions](../provinces/index.md#canada-baseline). + !!! warning "Match your local mesh" Check the [community directory](../provinces/index.md). If your community publishes different settings, use those settings instead. diff --git a/scripts/validate-communities.py b/scripts/validate-communities.py index 1d35c189..55f3d364 100644 --- a/scripts/validate-communities.py +++ b/scripts/validate-communities.py @@ -800,6 +800,15 @@ def render_index(data: dict[str, Any]) -> str: f'| Path hash mode | `{data["national_defaults"]["path_hash_mode"]}` |', f'| Command-line path setting | `{data["national_defaults"]["cli_path_setting"]}` |', "", + "The MeshCore app now has separate **Canada** and **USA** presets. Both use the radio values above,", + "but **Canada** also selects **3-byte** paths. **USA** leaves the path-hash setting unchanged.", + "You can still change that setting manually. See the", + "[September 9 preset update](https://github.com/meshcore-dev/MeshCore/issues/3302#issuecomment-5598886579).", + "", + "If your app or flasher still shows **USA/Canada (Recommended)**, use it for the same radio values", + "and set **3-byte** paths separately. Update repeaters older than firmware **1.14** before relying", + "on multi-byte paths; those older versions cannot forward them.", + "", "!!! warning \"Check local settings first\"", " Nearby devices need matching settings. A card marked **Different local settings**", " takes precedence over the Canada defaults after you confirm it with the", @@ -1390,6 +1399,16 @@ def render_index_fr(data: dict[str, Any], french: dict[str, Any]) -> str: f'`{data["national_defaults"]["cli_path_setting"]}` |' ), "", + "L’application MeshCore propose maintenant deux préréglages distincts : **Canada** et **USA**.", + "Ils utilisent les mêmes valeurs radio ci-dessus, mais **Canada** choisit aussi des parcours de", + "**3 octets**. **USA** ne modifie pas la taille du hachage. Vous pouvez toujours la régler", + "manuellement. Voir l’[annonce du 9 septembre](https://github.com/meshcore-dev/MeshCore/issues/3302#issuecomment-5598886579).", + "", + "Si votre application ou outil de programmation affiche encore **USA/Canada (Recommended)**,", + "utilisez-le pour les mêmes valeurs radio et réglez les parcours sur **3 octets** séparément.", + "Mettez à jour les répéteurs dont le micrologiciel est antérieur à **1.14** : ces anciennes versions", + "ne peuvent pas relayer les parcours multioctets.", + "", '!!! warning "Vérifiez d’abord les réglages locaux"', " Les appareils à proximité doivent utiliser les mêmes réglages. Une fiche marquée", " **Réglages locaux différents** l’emporte sur les réglages par défaut du Canada", diff --git a/tests/browser/canada-preset.spec.mjs b/tests/browser/canada-preset.spec.mjs new file mode 100644 index 00000000..a5df461b --- /dev/null +++ b/tests/browser/canada-preset.spec.mjs @@ -0,0 +1,36 @@ +import { expect, test } from "./site-fixtures.mjs"; +import { siteRoute } from "./site-route.mjs"; + +for (const locale of ["", "fr/"]) { + test(`${locale || "en/"} Canada preset guidance is current and the configurator remains opt-in`, async ({ page }) => { + await page.goto(siteRoute(`/${locale}`)); + const row = page.locator(".mc-baseline-table tr").filter({ hasText: locale ? "Préréglage radio" : "Radio preset" }); + await expect(row.locator("td").last()).toHaveText("Canada"); + await expect(page.locator(".mc-preset-note")).toContainText(locale ? "3 octets" : "3-byte"); + await expect(page.locator(".mc-preset-note")).toContainText(locale ? "ne modifie pas" : "unchanged"); + await expect(page.locator('.mc-preset-note a[href*="issuecomment-5598886579"]')).toHaveCount(1); + + await page.goto(siteRoute(`/${locale}provinces/#canada-baseline`)); + await expect(page.locator("article.md-content__inner")).toContainText("USA/Canada (Recommended)"); + await expect(page.locator("article.md-content__inner")).toContainText("1.14"); + + await page.goto(siteRoute(`/${locale}config/?tag=ott&step=3`)); + const note = page.locator('[data-role="canada-preset-note"]'); + await expect(note).toBeVisible(); + await expect(note).toContainText(locale ? "3 octets" : "3-byte"); + await expect(note).toContainText(locale ? "séparément" : "separately"); + await expect(note.locator("a")).toHaveAttribute("href", new RegExp(`/${locale}provinces/#canada-baseline$`)); + await expect(page.locator("#mcc-radio-profile")).toHaveValue("keep"); + await expect(page.locator("#mcc-hash-mode")).toHaveValue("keep"); + await page.locator("#mcc-radio-profile").selectOption("canada"); + await page.locator('[data-wizard-step="3"] [data-next-step]').click(); + const output = page.locator('[data-role="result"]'); + await expect(output).toContainText("set radio 910.525,62.5,7,5"); + await expect(output).not.toContainText("set path.hash.mode"); + await page.locator('[data-go-step="3"]').click(); + await page.locator("#mcc-hash-mode").selectOption("2"); + await page.locator('[data-wizard-step="3"] [data-next-step]').click(); + await expect(output).toContainText("set path.hash.mode 2"); + await expect(output).not.toContainText("set path.hash.mode 3"); + }); +} diff --git a/tests/content/canada-preset.test.mjs b/tests/content/canada-preset.test.mjs new file mode 100644 index 00000000..fa4139e7 --- /dev/null +++ b/tests/content/canada-preset.test.mjs @@ -0,0 +1,59 @@ +import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; +import test from "node:test"; + +const read = path => readFileSync(path, "utf8"); +const announcement = "https://github.com/meshcore-dev/MeshCore/issues/3302#issuecomment-5598886579"; +// Liam Cottle's September 9 announcement: Canada sets path_hash_size=3; +// USA retains the same RF tuple and does not set a path hash size. +const radio = { frequency_mhz: 910.525, bandwidth_khz: 62.5, spreading_factor: 7, coding_rate: 5 }; + +test("Canada's named preset matches the announced RF values and CLI byte mapping", () => { + const directory = JSON.parse(read("data/communities.json")); + const observer = JSON.parse(read("docs/analyzer/observer-config.json")); + const profiles = JSON.parse(read("docs/assets/radio-profiles.json")); + assert.equal(directory.national_defaults.radio_preset, "Canada"); + assert.deepEqual(directory.national_defaults.raw_radio, radio); + assert.equal(directory.national_defaults.path_hash_mode, "3-byte"); + assert.equal(directory.national_defaults.cli_path_setting, "set path.hash.mode 2"); + assert.equal(observer.network.preset, "Canada"); + for (const [key, value] of Object.entries(radio)) assert.equal(observer.network[key], value); + assert.equal(observer.network.path_hash_bytes, 3); + assert.equal(observer.network.path_hash_mode, 2, "3-byte paths use CLI mode 2, not mode 3"); + assert.deepEqual(profiles.find(profile => profile.id === "canada").radio, radio); + assert.equal(profiles.find(profile => profile.id === "bc-mesh").radio.frequency_mhz, 910.425); +}); + +for (const suffix of [".md", ".fr.md"]) { + test(`${suffix} onboarding and observer pages name Canada and link the older-app fallback`, () => { + const paths = [ + ...["companion", "repeater", "room-server", "observer"].map(role => `docs/start/${role}${suffix}`), + ...["companion", "repeater", "room-server"].map(role => `docs/meshcore/flash-${role}${suffix}`), + `docs/analyzer/intro${suffix}`, `docs/analyzer/builds/mqtt-firmware${suffix}`, + ]; + for (const path of paths) { + const source = read(path); + assert.ok(source.includes("**Canada**"), path); + assert.ok(source.includes("provinces/index.md#canada-baseline"), path); + assert.ok(!source.includes("**USA/Canada (Recommended)**"), `${path}: old name must not remain the primary instruction`); + } + }); + + test(`${suffix} preset reference explains the USA distinction and legacy compatibility`, () => { + const directory = read(`docs/provinces/index${suffix}`); + const home = read(`docs/index${suffix}`); + const faq = read(`docs/meshcore/general-faq${suffix}`); + for (const source of [directory, home, faq]) { + assert.ok(source.includes(announcement), "The completed change needs its exact upstream source"); + assert.match(source, /USA/); + } + assert.match(directory, /\| (?:Radio preset|Préréglage radio) \| `Canada` \|/); + assert.match(directory, /USA\/Canada \(Recommended\)/); + assert.match(directory, /1\.14/); + assert.match(directory, /3-byte|3 octets/); + assert.match(home, /\| (?:Radio preset|Préréglage radio) \| \*\*Canada\*\* \|/); + assert.doesNotMatch(home, /Planned:|Prévu :/); + assert.match(home, /leaves the path-hash setting unchanged|ne modifie pas la taille du hachage/); + assert.doesNotMatch(home, /Canada \(Recommended\)/); + }); +} diff --git a/tests/content/p0-content-safety.test.mjs b/tests/content/p0-content-safety.test.mjs index 1ac5c10c..5184a221 100644 --- a/tests/content/p0-content-safety.test.mjs +++ b/tests/content/p0-content-safety.test.mjs @@ -279,5 +279,6 @@ test("Canada baseline and local practice are explicitly separated", () => { assert.match(overview, /Canada defaults/i); assert.match(overview, /Official MeshCore resources/i); assert.match(companion, /Check the\s+\[community directory\]/i); - assert.match(companion, /USA\/Canada \(Recommended\)/); + assert.match(companion, /choose \*\*Canada\*\*/); + assert.match(companion, /\*\*3-byte\*\* paths/); });