feat(bms): versão visível no diagnóstico + MTU bump + connection HIGH v1.10.3
Some checks are pending
Build Android (APK + AAB) / build-android (push) Waiting to run
Some checks are pending
Build Android (APK + AAB) / build-android (push) Waiting to run
Karlão reportou log v1.10.1 quando deveria ser v1.10.2 — usuário não
sabia se atualização chegou. Adicionado:
- "Shivao v1.10.X" mostrado no card BMS (status line)
- Primeira linha do log: "📦 Shivao v1.10.3 · Probe iniciado"
- requestConnectionPriority=HIGH antes do probe (alguns BMS exigem)
- requestMtu(247) — Xiaoxiang BMS oficiais às vezes ignoram comandos
enviados em MTU baixo (23 default), exigem 247 pra responder
Próximo passo: usuário atualiza pra v1.10.3, primeira linha do log
confirma versão. Se ainda zero RX, partiremos pra CCCD descriptor manual.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ca3dd4d7b2
commit
bba53e4548
5 changed files with 34 additions and 10 deletions
|
|
@ -5998,6 +5998,16 @@ async function bmsProbeAndAttach(deviceId,deviceName){
|
||||||
if(backend!=='capacitor'){setBleDiag('Probe requer Capacitor (APK)','warn');return false}
|
if(backend!=='capacitor'){setBleDiag('Probe requer Capacitor (APK)','warn');return false}
|
||||||
const ble=window.Capacitor.Plugins.BluetoothLe;
|
const ble=window.Capacitor.Plugins.BluetoothLe;
|
||||||
try{
|
try{
|
||||||
|
setBleDiag(`📦 Shivao v${APP_VERSION} · Probe iniciado`,'info');
|
||||||
|
// Tenta aumentar MTU pra 247 (alguns BMS exigem)
|
||||||
|
try{
|
||||||
|
const r=await ble.requestConnectionPriority({deviceId,connectionPriority:'high'});
|
||||||
|
setBleDiag('Connection priority HIGH ok','info');
|
||||||
|
}catch(e){setBleDiag('connection priority skip','info')}
|
||||||
|
try{
|
||||||
|
await ble.requestMtu({deviceId,mtu:247});
|
||||||
|
setBleDiag('MTU bumped pra 247','info');
|
||||||
|
}catch(e){setBleDiag('MTU bump skip','info')}
|
||||||
setBleDiag('🔍 Enumerando characteristics...','info');
|
setBleDiag('🔍 Enumerando characteristics...','info');
|
||||||
// Tenta serviços vendor: ff00, fff0 (Daly), ffe0 (JK), 0203
|
// Tenta serviços vendor: ff00, fff0 (Daly), ffe0 (JK), 0203
|
||||||
const VENDOR_SVCS=[
|
const VENDOR_SVCS=[
|
||||||
|
|
@ -6244,14 +6254,16 @@ async function removeBluetoothDevice(id){
|
||||||
renderBluetoothCard();
|
renderBluetoothCard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const APP_VERSION='1.10.3';
|
||||||
function renderBluetoothCard(){
|
function renderBluetoothCard(){
|
||||||
const el=document.getElementById('bt-list');
|
const el=document.getElementById('bt-list');
|
||||||
const supportEl=document.getElementById('bt-support');
|
const supportEl=document.getElementById('bt-support');
|
||||||
if(!el)return;
|
if(!el)return;
|
||||||
if(supportEl){
|
if(supportEl){
|
||||||
supportEl.textContent=bleSupported()
|
const backendStr=bleBackend()==='capacitor'?'plugin nativo':'navegador web';
|
||||||
? 'Bluetooth disponível neste navegador.'
|
supportEl.innerHTML=bleSupported()
|
||||||
: 'Web Bluetooth indisponível (use Chrome no PC ou Android — iOS Safari não suporta).';
|
? `<strong>Shivao v${APP_VERSION}</strong> · Bluetooth via ${backendStr}.`
|
||||||
|
: `<strong>Shivao v${APP_VERSION}</strong> · Bluetooth indisponível.`;
|
||||||
supportEl.style.color=bleSupported()?'var(--m-ok,#10b981)':'var(--m-warn,#f59e0b)';
|
supportEl.style.color=bleSupported()?'var(--m-ok,#10b981)':'var(--m-warn,#f59e0b)';
|
||||||
}
|
}
|
||||||
const devices=state.btDevices||[];
|
const devices=state.btDevices||[];
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ android {
|
||||||
applicationId "br.com.pontualtech.shivao"
|
applicationId "br.com.pontualtech.shivao"
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 18
|
versionCode 19
|
||||||
versionName "1.10.2"
|
versionName "1.10.3"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
aaptOptions {
|
aaptOptions {
|
||||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "shivao-mobile",
|
"name": "shivao-mobile",
|
||||||
"version": "1.10.2",
|
"version": "1.10.3",
|
||||||
"description": "Shivao app nativo (Capacitor wrapper Android/iOS)",
|
"description": "Shivao app nativo (Capacitor wrapper Android/iOS)",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|
|
||||||
|
|
@ -5998,6 +5998,16 @@ async function bmsProbeAndAttach(deviceId,deviceName){
|
||||||
if(backend!=='capacitor'){setBleDiag('Probe requer Capacitor (APK)','warn');return false}
|
if(backend!=='capacitor'){setBleDiag('Probe requer Capacitor (APK)','warn');return false}
|
||||||
const ble=window.Capacitor.Plugins.BluetoothLe;
|
const ble=window.Capacitor.Plugins.BluetoothLe;
|
||||||
try{
|
try{
|
||||||
|
setBleDiag(`📦 Shivao v${APP_VERSION} · Probe iniciado`,'info');
|
||||||
|
// Tenta aumentar MTU pra 247 (alguns BMS exigem)
|
||||||
|
try{
|
||||||
|
const r=await ble.requestConnectionPriority({deviceId,connectionPriority:'high'});
|
||||||
|
setBleDiag('Connection priority HIGH ok','info');
|
||||||
|
}catch(e){setBleDiag('connection priority skip','info')}
|
||||||
|
try{
|
||||||
|
await ble.requestMtu({deviceId,mtu:247});
|
||||||
|
setBleDiag('MTU bumped pra 247','info');
|
||||||
|
}catch(e){setBleDiag('MTU bump skip','info')}
|
||||||
setBleDiag('🔍 Enumerando characteristics...','info');
|
setBleDiag('🔍 Enumerando characteristics...','info');
|
||||||
// Tenta serviços vendor: ff00, fff0 (Daly), ffe0 (JK), 0203
|
// Tenta serviços vendor: ff00, fff0 (Daly), ffe0 (JK), 0203
|
||||||
const VENDOR_SVCS=[
|
const VENDOR_SVCS=[
|
||||||
|
|
@ -6244,14 +6254,16 @@ async function removeBluetoothDevice(id){
|
||||||
renderBluetoothCard();
|
renderBluetoothCard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const APP_VERSION='1.10.3';
|
||||||
function renderBluetoothCard(){
|
function renderBluetoothCard(){
|
||||||
const el=document.getElementById('bt-list');
|
const el=document.getElementById('bt-list');
|
||||||
const supportEl=document.getElementById('bt-support');
|
const supportEl=document.getElementById('bt-support');
|
||||||
if(!el)return;
|
if(!el)return;
|
||||||
if(supportEl){
|
if(supportEl){
|
||||||
supportEl.textContent=bleSupported()
|
const backendStr=bleBackend()==='capacitor'?'plugin nativo':'navegador web';
|
||||||
? 'Bluetooth disponível neste navegador.'
|
supportEl.innerHTML=bleSupported()
|
||||||
: 'Web Bluetooth indisponível (use Chrome no PC ou Android — iOS Safari não suporta).';
|
? `<strong>Shivao v${APP_VERSION}</strong> · Bluetooth via ${backendStr}.`
|
||||||
|
: `<strong>Shivao v${APP_VERSION}</strong> · Bluetooth indisponível.`;
|
||||||
supportEl.style.color=bleSupported()?'var(--m-ok,#10b981)':'var(--m-warn,#f59e0b)';
|
supportEl.style.color=bleSupported()?'var(--m-ok,#10b981)':'var(--m-warn,#f59e0b)';
|
||||||
}
|
}
|
||||||
const devices=state.btDevices||[];
|
const devices=state.btDevices||[];
|
||||||
|
|
|
||||||
|
|
@ -347,7 +347,7 @@ app.get('/.well-known/assetlinks.json', (req, res) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Atalho: /apk redireciona pra última APK release no Forgejo
|
// Atalho: /apk redireciona pra última APK release no Forgejo
|
||||||
const LATEST_APK_URL = 'https://git.pontualtech.work/karlao/shivao-projeto/releases/download/v1.10.2/Shivao-v1.10.2.apk';
|
const LATEST_APK_URL = 'https://git.pontualtech.work/karlao/shivao-projeto/releases/download/v1.10.3/Shivao-v1.10.3.apk';
|
||||||
app.get('/apk', (req, res) => res.redirect(302, LATEST_APK_URL));
|
app.get('/apk', (req, res) => res.redirect(302, LATEST_APK_URL));
|
||||||
|
|
||||||
// Página A4 imprimível com QR Code + instruções (cola no barco/marina)
|
// Página A4 imprimível com QR Code + instruções (cola no barco/marina)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue