VisiaPDA
lvl.1
Spain
Offline
|
Hello,
I have a Mavic 3T device and I'm trying to develop a basic program for serial communication using the E-PORT.
I connected in the E-PORT port both UART pins and GND to a UART USB PC adapter folling this guide
developer.dji.com/doc/payload-sdk-tutorial/en/quick-start/drone-port.html#e-port
I set the USB Adapter to 921600 baudrate and I created a basic android application that connects to the drone and opens the Payload SDK to send and receive data.
When I send from the Android app (in the Drone controller) it gives a REQUEST_HANDLER_NOT_FOUND error.
This is the MSDK code:
IPayloadManager payload = PayloadCenter.getInstance().getPayloadManager().get(PayloadIndexType.LEFT_OR_MAIN);
payload.addPayloadDataListener(new PayloadDataListener() {
@Override
public void onDataFromPayloadUpdate(byte[] data) {
}
});
payload.sendDataToPayload(new byte[]{63}, new CommonCallbacks.CompletionCallback() {
@Override
public void onSuccess() {
}
@Override
public void onFailure(@NonNull IDJIError error) {
}
});
I tested separately the UART USB adapter and it works perfect at that baudrate.
What could be the problem?
|
|