fix:排查配网失败原因

This commit is contained in:
liyi 2025-04-03 10:35:30 +08:00
parent 16dac17a48
commit 2d4ae94607

View File

@ -16,6 +16,7 @@ import 'package:star_lock/blue/io_protocol/io_updataLockSet.dart';
import 'package:star_lock/login/login/entity/LoginEntity.dart'; import 'package:star_lock/login/login/entity/LoginEntity.dart';
import 'package:star_lock/main/lockDetail/lockDetail/device_network_info.dart'; import 'package:star_lock/main/lockDetail/lockDetail/device_network_info.dart';
import 'package:star_lock/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifiEntity.dart'; import 'package:star_lock/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifiEntity.dart';
import 'package:star_lock/mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart';
import 'package:star_lock/mine/gateway/addGateway/gatewayConfigurationWifi/getGatewayConfiguration_entity.dart'; import 'package:star_lock/mine/gateway/addGateway/gatewayConfigurationWifi/getGatewayConfiguration_entity.dart';
import 'package:star_lock/mine/gateway/addGateway/selectGateway/getGatewayInfo_model.dart'; import 'package:star_lock/mine/gateway/addGateway/selectGateway/getGatewayInfo_model.dart';
import 'package:star_lock/talk/starChart/entity/star_chart_register_node_entity.dart'; import 'package:star_lock/talk/starChart/entity/star_chart_register_node_entity.dart';
@ -45,7 +46,7 @@ class ConfiguringWifiLogic extends BaseGetXController {
} }
} }
Future<void> updateNetworkInfo({ void updateNetworkInfo({
required String peerId, required String peerId,
required String wifiName, required String wifiName,
required String secretKey, required String secretKey,
@ -82,17 +83,19 @@ class ConfiguringWifiLogic extends BaseGetXController {
void _initReplySubscription() { void _initReplySubscription() {
_replySubscription = _replySubscription =
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) async { EventBusManager().eventBus!.on<Reply>().listen((Reply reply) async {
AppLog.log('收到蓝牙回调${EasyLoading.isShow}');
// WIFI配网结果 // WIFI配网结果
if (reply is GatewayConfiguringWifiResultReply) { if (reply is GatewayConfiguringWifiResultReply) {
_replySenderConfiguringWifiResult(reply); _replySenderConfiguringWifiResult(reply);
} }
if (reply is GatewayConfiguringWifiReply) {
_replySenderConfiguringWifiResult(reply);
}
if (reply is GatewayGetStatusReply) { if (reply is GatewayGetStatusReply) {
_replyGatewayGetStatusReply(reply); _replyGatewayGetStatusReply(reply);
} }
if (reply is GatewayGetStatusReply) { // if (reply is GatewayGetStatusReply) {
_replyStatusInfo(reply); // _replyStatusInfo(reply);
} // }
// //
if (reply is UpdataLockSetReply) { if (reply is UpdataLockSetReply) {
_replyUpdataLockSetReply(reply); _replyUpdataLockSetReply(reply);
@ -132,7 +135,7 @@ class ConfiguringWifiLogic extends BaseGetXController {
// //
await Storage.saveLockNetWorkInfo(jsonMap); await Storage.saveLockNetWorkInfo(jsonMap);
// //
updateNetworkInfo( updateNetworkInfo(
peerId: peerId ?? '', peerId: peerId ?? '',
wifiName: wifiName ?? '', wifiName: wifiName ?? '',
secretKey: secretKey ?? '', secretKey: secretKey ?? '',
@ -482,6 +485,7 @@ class ConfiguringWifiLogic extends BaseGetXController {
@override @override
void dispose() { void dispose() {
dismissEasyLoading();
// TODO: implement dispose // TODO: implement dispose
super.dispose(); super.dispose();
state.isLoading.value = false; state.isLoading.value = false;
@ -489,5 +493,6 @@ class ConfiguringWifiLogic extends BaseGetXController {
state.loadingTimer!.cancel(); state.loadingTimer!.cancel();
state.loadingTimer = null; state.loadingTimer = null;
} }
} }
} }