Open jaswant-iotric opened 9 months ago
I think it also works poorly on the Duke 890.
Yeah! The question is it fails to connect bluetooth socket with Duke 250 and 390 (Gen 3). I did some RnD and found this piece of code
if (pairedDevicesbyName.size() == 0) { error(new Result(CcuServiceError.ALL_PAIRED_DEVICES_ARE_CONNECTED)); } else if (bikeModel.plugins.userSettings.available.booleanValue()) { BtControl.getInstance().isRfcommConnectable(pairedDevicesbyName, TransportMap.CCUWIFICONFIG.uuidString(), this); } else if (bikeModel.plugins.navigation.available.booleanValue() && bikeModel.plugins.navigation.nav.equals("ETBT")) { BtControl.getInstance().isRfcommConnectable(pairedDevicesbyName, TransportMap.EXTENDED_TBT.uuidString(), this); } else if (d.d(bikeModel)) { g0.f15376a.e(pairedDevicesbyName, new String[]{TransportMap.EXTENDED_TBT.uuidString(), TransportMap.NAVIGATION.uuidString()}, this, this.f7113a, this.f7114b, (CoroutineScope) null); } else if (bikeModel.plugins.navigation.available.booleanValue() && bikeModel.plugins.navigation.nav.equals("TBT")) { BtControl.getInstance().isRfcommConnectable(pairedDevicesbyName, TransportMap.NAVIGATION.uuidString(), this); }
and these codes
NAVIGATION(52300), EXTENDED_TBT(52301), LOGGING(62300), DEVICECONTROL(52320), KTELNET(52000), KSTREAM(52001), KPERF(CcuCanBridge.CAN_BRIDGE_READER_MULTICAST_PORT), CCUBASE(52010), CCULOGGING(52030), CCUWIFICONFIG(52040), CCUGATEKEEPER(52041), CCUUSERSETTINGS(52050), SMART_HELP_CALL(52911), EMINIUSERSETTINGS(52060), TELEMETRY(52070), SCA(53060), MAPNAV_SIGNALLING(52400), MAPNAV_STREAMING(52410);
The thing is NAVIGATION(52300) works on Duke 700+ and 800+ but not 250 and 390
@jaswant-iotric Any update on this?
I've successfully connected to Duke 390 Gen 3 by slightly modifying the code.
this.bluetoothSocket = bluetoothDevice.createInsecureRfcommSocketToServiceRecord(bluetoothDevice.uuids[0]!!.uuid)
But when I send test data, nothing is being displayed.
I also tried updating uiContext to navigation, direction
Any light on this?