Error MSDK5 Custom RTK Network
CompletedHello,
I'm attempting to connect our app to RTK corrections for Mavic 3 Enterprise with RTK. When attempting to start the NetworkRTKService, I get onFailure with the errorCode: RTK_CUSTOM_NETWORK_SERVER_START_FAIL - Can you please help me understand the reason for this failure?
Note: I get this same error in my code and also the DJI Sample app. However, using the same custom RTK network settings in the DJI Pilot 2 app works for getting RTK connected.
My steps are:
1. Enable RTK via.
RTKCenter.getInstance().setAircraftRTKModuleEnabled(enableRTK, object : CompletionCallback{
override fun onSuccess() {
LogsHelper.log("RTK ENABLED: $enableRTK")
}
override fun onFailure(error: IDJIError) {
LogsHelper.log("ERROR $enablingDisabling RTK: ${error.errorCode()}: ${error.description()}")
}
})
2. Set RTKReferenceStationSource to CUSTOM_NETWORK_SERVICE
RTKCenter.getInstance().setRTKReferenceStationSource(RTKReferenceStationSource.CUSTOM_NETWORK_SERVICE, object: CompletionCallback {
override fun onSuccess() {
LogsHelper.log("setRTKSource: Success", false, Log.ERROR)
}
override fun onFailure(error: IDJIError) {
LogsHelper.log("error in setRTKSource: ${error.description()}, ${error.errorCode()}, ${error.errorType()}", false, Log.ERROR)
}
})
3. Set custom network settings
RtkBaseStationKey.KeyRTKCustomNetworkSetting.create().set(rtkCustomNetworkSetting, {
LogsHelper.log("RTK Custom Network Settings were set successfully")
startRTK()
}) {
LogsHelper.log("Error setting RTKCustomNetwork: ${it.description()}")
}
4. Start
RTKCenter.getInstance().customRTKManager.startNetworkRTKService(CoordinateSystem.UNKNOWN, object: CompletionCallback {
override fun onSuccess() {
LogsHelper.log("RTK startRTK success")
}
override fun onFailure(error: IDJIError) {
LogsHelper.log("RTK startRTK() failed: ${error.description()}: code: ${error.errorCode()}, type: ${error.errorType()}")
}
})
Please sign in to leave a comment.
Comments
4 comments