update
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
Status
|
||||
<span id="modem-status" class="badge">Loading...</span>
|
||||
</h3>
|
||||
|
||||
<div class="row mb-3">
|
||||
|
||||
<div class="col-sm-3">
|
||||
@@ -111,6 +112,7 @@
|
||||
</div>
|
||||
|
||||
<h3>Connexion 4G Network</h3>
|
||||
|
||||
<div class="row mb-3">
|
||||
|
||||
<div class="col-sm-6">
|
||||
@@ -118,6 +120,8 @@
|
||||
|
||||
<div class="card-body">
|
||||
<p class="card-text">Network scan. Attention: 2 min scan.</p>
|
||||
<p class="card-text">Orange FR (20801), SFR (20810), Bouygues (20820)</p>
|
||||
|
||||
<button class="btn btn-primary" onclick="getData_saraR4('ttyAMA2', 'AT+COPS=?', 120)">Scan</button>
|
||||
<div id="loading_ttyAMA2_AT_COPS__" class="spinner-border spinner-border-sm" style="display: none;" role="status"></div>
|
||||
<div id="response_ttyAMA2_AT_COPS__"></div>
|
||||
@@ -152,7 +156,8 @@
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">Address</span>
|
||||
<input type="text" id="messageInput_APN" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm">
|
||||
</div>
|
||||
<button class="btn btn-primary" onclick="connectAPN_saraR4('ttyAMA2', document.getElementById('messageInput_APN').value, 5)">Connect</button>
|
||||
<button class="btn btn-primary" onclick="connectAPN_saraR4('ttyAMA2', document.getElementById('messageInput_APN').value, 5)">Set APN</button>
|
||||
|
||||
<button class="btn btn-secondary" onclick="getData_saraR4('ttyAMA2','AT+CGDCONT?', 5)">Get APN</button>
|
||||
|
||||
<div id="loading_ttyAMA2_APN" class="spinner-border spinner-border-sm" style="display: none;" role="status"></div>
|
||||
@@ -536,11 +541,12 @@ function getData_saraR4(port, command, timeout){
|
||||
}
|
||||
|
||||
function sendMessage_saraR4(port, endpoint){
|
||||
|
||||
console.log("Send message from SaraR4 (port "+port+" and endpoint "+endpoint+"):");
|
||||
|
||||
$("#loading_"+port+"_message_send").show();
|
||||
|
||||
$.ajax({
|
||||
$.ajax({
|
||||
url: 'launcher.php?type=sara_sendMessage&port='+port+'&endpoint='+encodeURIComponent(endpoint),
|
||||
//dataType: 'json', // Specify that you expect a JSON response
|
||||
method: 'GET', // Use GET or POST depending on your needs
|
||||
@@ -558,9 +564,12 @@ function getData_saraR4(port, command, timeout){
|
||||
}
|
||||
|
||||
function connectAPN_saraR4(port, APN_address, timeout){
|
||||
|
||||
console.log(" Set APN (port "+port+" and adress "+APN_address+"):");
|
||||
|
||||
$("#loading_"+port+"_APN").show();
|
||||
$.ajax({
|
||||
|
||||
$.ajax({
|
||||
url: 'launcher.php?type=sara_APN&port='+port+'&APN_address='+encodeURIComponent(APN_address)+'&timeout='+timeout,
|
||||
//dataType: 'json', // Specify that you expect a JSON response
|
||||
method: 'GET', // Use GET or POST depending on your needs
|
||||
|
||||
Reference in New Issue
Block a user