v1.6.4: Page modem — progression reset hardware + boutons LED status PCB
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,21 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"version": "1.6.4",
|
||||||
|
"date": "2026-04-02",
|
||||||
|
"changes": {
|
||||||
|
"features": [
|
||||||
|
"Page modem: boutons Activer/Desactiver LED status connexion PCB (AT+UGPIOC=16,2 / AT+UGPIOC=16,255)"
|
||||||
|
],
|
||||||
|
"improvements": [
|
||||||
|
"Page modem: messages de progression en 3 etapes pendant le reset hardware (coupure, redemarrage, test connexion)",
|
||||||
|
"Page modem: bouton reset hardware desactive pendant l'operation pour eviter les doubles clics"
|
||||||
|
],
|
||||||
|
"fixes": [],
|
||||||
|
"compatibility": []
|
||||||
|
},
|
||||||
|
"notes": "Le reset hardware affiche maintenant les etapes en temps reel (~20s). Deux nouveaux boutons permettent de controler la LED bleue du PCB qui indique l'etat de la connexion reseau du modem."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "1.6.3",
|
"version": "1.6.3",
|
||||||
"date": "2026-04-01",
|
"date": "2026-04-01",
|
||||||
|
|||||||
@@ -173,13 +173,29 @@
|
|||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<p class="text-muted small mb-2">Reset hardware (GPIO 16) : coupe et rétablit l'alimentation du modem.</p>
|
<p class="text-muted small mb-2">Reset hardware (GPIO 16) : coupe et rétablit l'alimentation du modem, puis teste la connexion avec le modem (~20 secondes).</p>
|
||||||
<button class="btn btn-danger mb-2" onclick="hardwareRebootSara()">Reset Hardware</button>
|
<button class="btn btn-danger mb-2" id="btn_hw_reboot" onclick="hardwareRebootSara()">Reset Hardware</button>
|
||||||
<div id="loading_hw_reboot" class="spinner-border spinner-border-sm" style="display: none;" role="status"></div>
|
<div id="loading_hw_reboot" class="spinner-border spinner-border-sm" style="display: none;" role="status"></div>
|
||||||
<div id="response_hw_reboot"></div>
|
<div id="response_hw_reboot"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<p class="card-text"><strong>LED status connexion (PCB)</strong></p>
|
||||||
|
<p class="text-muted small mb-2">Active la LED bleue du PCB qui indique l'état de la connexion réseau (GPIO 16 du modem).</p>
|
||||||
|
<button class="btn btn-primary mb-2" onclick="getData_saraR4('ttyAMA2', 'AT+UGPIOC=16,2', 5)">Activer LED</button>
|
||||||
|
<div id="loading_ttyAMA2_AT_UGPIOC_16_2" class="spinner-border spinner-border-sm" style="display: none;" role="status"></div>
|
||||||
|
<div id="response_ttyAMA2_AT_UGPIOC_16_2"></div>
|
||||||
|
<hr>
|
||||||
|
<button class="btn btn-secondary mb-2" onclick="getData_saraR4('ttyAMA2', 'AT+UGPIOC=16,255', 5)">Désactiver LED</button>
|
||||||
|
<div id="loading_ttyAMA2_AT_UGPIOC_16_255" class="spinner-border spinner-border-sm" style="display: none;" role="status"></div>
|
||||||
|
<div id="response_ttyAMA2_AT_UGPIOC_16_255"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1046,38 +1062,57 @@ function getSignalInfo(port, timeout) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function hardwareRebootSara() {
|
function hardwareRebootSara() {
|
||||||
if (!confirm("Couper l'alimentation du modem SARA via GPIO 16 ?\nLe modem sera éteint pendant ~3 secondes puis redémarré.")) return;
|
if (!confirm("Couper l'alimentation du modem SARA via GPIO 16 ?\nLe modem sera éteint pendant ~3 secondes puis redémarré.\nLa connexion avec le modem sera ensuite testée (~20 secondes au total).")) return;
|
||||||
|
|
||||||
console.log("Hardware reboot SARA via GPIO 16");
|
console.log("Hardware reboot SARA via GPIO 16");
|
||||||
|
$("#btn_hw_reboot").prop("disabled", true);
|
||||||
$("#loading_hw_reboot").show();
|
$("#loading_hw_reboot").show();
|
||||||
$("#response_hw_reboot").empty();
|
$("#response_hw_reboot").html(`
|
||||||
|
<div class="alert alert-info py-2 mt-2" id="hw_reboot_progress">
|
||||||
|
<small><strong>Étape 1/3</strong> — Coupure alimentation du modem...</small>
|
||||||
|
</div>`);
|
||||||
|
|
||||||
|
// Progress messages
|
||||||
|
var step2Timeout = setTimeout(function() {
|
||||||
|
$("#hw_reboot_progress small").html('<strong>Étape 2/3</strong> — Attente du redémarrage du modem...');
|
||||||
|
}, 4000);
|
||||||
|
|
||||||
|
var step3Timeout = setTimeout(function() {
|
||||||
|
$("#hw_reboot_progress small").html('<strong>Étape 3/3</strong> — Test de la connexion avec le modem (ATI)...');
|
||||||
|
}, 9000);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'launcher.php?type=sara_hardware_reboot',
|
url: 'launcher.php?type=sara_hardware_reboot',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
timeout: 30000,
|
timeout: 45000,
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
|
clearTimeout(step2Timeout);
|
||||||
|
clearTimeout(step3Timeout);
|
||||||
$("#loading_hw_reboot").hide();
|
$("#loading_hw_reboot").hide();
|
||||||
|
$("#btn_hw_reboot").prop("disabled", false);
|
||||||
|
|
||||||
if (response.reboot) {
|
if (response.reboot) {
|
||||||
$("#response_hw_reboot").html(`
|
$("#response_hw_reboot").html(`
|
||||||
<div class="alert alert-success py-2 mt-2">
|
<div class="alert alert-success py-2 mt-2">
|
||||||
<strong>Modem redémarré</strong><br>
|
<strong>Modem redémarré et connexion vérifiée</strong><br>
|
||||||
<small><code>${response.modem_response}</code></small>
|
<small><code>${response.modem_response}</code></small>
|
||||||
</div>`);
|
</div>`);
|
||||||
} else {
|
} else {
|
||||||
$("#response_hw_reboot").html(`
|
$("#response_hw_reboot").html(`
|
||||||
<div class="alert alert-danger py-2 mt-2">
|
<div class="alert alert-danger py-2 mt-2">
|
||||||
<strong>Echec</strong><br>
|
<strong>Echec</strong><br>
|
||||||
<small>${response.error || 'Modem ne répond pas'}</small>
|
<small>${response.error || 'Modem ne répond pas après le redémarrage'}</small>
|
||||||
</div>`);
|
</div>`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
console.error('Hardware reboot failed:', status, error);
|
console.error('Hardware reboot failed:', status, error);
|
||||||
|
clearTimeout(step2Timeout);
|
||||||
|
clearTimeout(step3Timeout);
|
||||||
$("#loading_hw_reboot").hide();
|
$("#loading_hw_reboot").hide();
|
||||||
|
$("#btn_hw_reboot").prop("disabled", false);
|
||||||
$("#response_hw_reboot").html(`
|
$("#response_hw_reboot").html(`
|
||||||
<div class="alert alert-danger py-2 mt-2">
|
<div class="alert alert-danger py-2 mt-2">
|
||||||
<strong>Erreur de communication</strong><br>
|
<strong>Erreur de communication</strong><br>
|
||||||
|
|||||||
Reference in New Issue
Block a user