Please select Into the mobile phone version | Continue to access the computer ver.
Multiple Devices connected to UART
1546 3 2018-4-17
Uploading and Loding Picture ...(0/1)
o(^-^)o
JulVdev
New

Belgium
Offline

Hi,
I have a Matrice 100 drone and I need to connect 2 devices to it, fortunately there is 2 UART_CAN2 ports available on the drone. The first device is a SabreLite and the other is a Raspberry Pi 3 B+. When I connect one of the 2 it works perfectly but when I connect the 2 at the same time, one doesn't work. I got this error on the raspberry pi side :

```
Read App ID
User Configuration read successfully.


STATUS/1 @ init, L55: Attempting to open device /dev/ttyUSB0 with baudrate 115200...

STATUS/1 @ init, L65: ...Serial started successfully.

ERRORLOG/1 @ getDroneVersion, L1339: Drone version not obtained! Please do not proceed.
Possible reasons:
    Serial port connection:
        * SDK is not enabled, please check DJI Assistant2 -> SDK -> [v] Enable API Control.
        * Baudrate is not correct, please double-check from DJI Assistant2 -> SDK -> baudrate.
        * TX and RX pins are inverted.
        * Serial port is occupied by another program.
        * Permission required. Please do 'sudo usermod -a -G dialout $USER' (you do not need to replace $USER with your username). Then logout and login again

ERRORLOG/1 @ activate, L1228: Unable to initialize some vehicle components!
STATUS/1 @ getErrorCodeMessage, L644: initVehicle
STATUS/1 @ getCommonErrorCodeMessage, L710: ACK_NO_RESPONSE_ERROR
Vehicle not initialized
```
Everything listed in the possible reason cannot be the reason sinnce the code is working as soon as I remove the SabreLite. And for the Serial ports used, I've used each UART_CAN2 ports so I assume they are different ports. The 2 devices don't use the same version of the OSDK, maybe that's the reason, is the UART protocol used by the drone dependent of the OSDK version?

2018-4-17
Use props
DJI Susan
Administrator
Offline

Sorry for the troubles. I've forwarded to our engineers to see whether there are any better suggestions, will come back as long as there is an update.
2018-4-19
Use props
JulVdev
New

Belgium
Offline

I had a response on the github of the OSDK, I'll post the link here if people encounters the same problem. The 2 UART ports are connected and thus it's not possible to connect 2 devices apart if one is only listening (what I'm trying to do in fact). I still have to resolve the issue caused by the acknowledgement process.
https://github.com/dji-sdk/Onboard-SDK/issues/299
2018-4-19
Use props
JulVdev
New

Belgium
Offline

I forked the repository and modified the SDK to remove the acknowledgement process and be able to listen successfully to the broadcast of the drone while another device controlling the drone is connected.
Here is the link if it can help anyone https://github.com/JulV94/Onboard-SDK
2018-4-20
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules