Robomaster EP Core Plaintext SDk Problems
2731 7 2022-4-6
Uploading and Loding Picture ...(0/1)
o(^-^)o
elfoxxy
lvl.1

Germany
Offline

Hi together,

For my masters thesis I try to run a dji robomaster through an arduino to have a mobile CH4 detection device.

While working on it everything worked fine and throug the UART connection the RM was controlled through plaintext SDK commands. after having a break for two weeks everything stopped working.

so where are we at:
I tried to run my Arduino script, it initializes the serial connecction and tries to send the 'command;', and then waits for the 'ok' reply.--> theres no Reply
at one weird moment the RM replied 'already in SDK mode' so i though: Maybe i have to quit SDK mode to get everything back to zero --> I added a 'quit;' to my script as a first command to the RM --> no reply from the RM
Then i tried to connect the RM to my ipad and just run it, but all of a sudden it had weird connectivity issues --> after that i though: ill update the firmware, also that might reset and settings the RM is stuck in--> still had some issues but after reconnecting all cables and recalibrating armors and wheels now it runs fine, through the ipad and app!
Then i tried Wifi-router connection and python scripts in Robomaster sdk--> everything worked
Retried using the Arduino: Used two different arduinos, different Serial and/or SoftSerial ports, different cables and so on--> no Reply from the RM at all.

So i thought there might be some Issues with the UART connection on the RM side, just because i tried everything in different Versions.
After being frustrated for 2 Days i came up with another idea:
Direct Wifi connection and then run the sample code from the RM developer Guide.
So I connected the RM, started the script and typed 'command;' and actually got a reply: 'ok'. but after that everything stopped working again. i have two screenshots of what kind of replies I get. In general the RM itself does nothing though. No movements, no change of the LEDs and so on.
Bildschirmfoto 2022-04-06 um 20.43.43.png Bildschirmfoto 2022-04-06 um 20.44.00.png
Sadly theres no way to just do a software reset of the RM?!

If anyone has any ideas it would be awesome, i literally spent 3 days without any progress

Thank you in advance!
2022-4-6
Use props
BGA
Second Officer
United States
Offline

As I understand it, the plaintext SDK is deprecated and it is also plain broken (that one for sure). You might have more success using the binary protocol.
2022-4-6
Use props
elfoxxy
lvl.1

Germany
Offline

Thanks for the reply.

I also contacted DJIDev support, they replied to me that this is in fact a problem with the new firmware and supposed to be fixed with the new version being released this month....

In fact I am quite new to rpogramming so could you explain the "binary protocol" a little further? Is it in the developer guide under a different name? I couldnt really find anything :/

What I wonder now, is that if DJI wants to fix this, it should work the way it did before right? I actually only need the RM to Drive, and use the arm. thats actually all necessary things. Control of the LEDs or maybe even sound is just bonus. If it will work the same way it did before everything would be fine ....


Thanks, David
2022-4-7
Use props
BGA
Second Officer
United States
Offline

elfoxxy Posted at 4-7 07:22
Thanks for the reply.

I also contacted DJIDev support, they replied to me that this is in fact a problem with the new firmware and supposed to be fixed with the new version being released this month....

https://robomaster-dev.readthedocs.io/en/latest/

This si the documentation on the oficial Python SDK. It uses the binary protocol under the hood. Instead of sending text commands as you were doing, you would simply call python methods/functions in it.
2022-4-7
Use props
BGA
Second Officer
United States
Offline

KeyMeerkat Posted at 5-15 18:43
Is there an SDK for NodeJS (plaintext doesn't work for me either)?

Not that I am aware of.
2022-5-16
Use props
tsvi lev
lvl.1

Israel
Offline

BGA Posted at 2022-4-6 13:31
As I understand it, the plaintext SDK is deprecated and it is also plain broken (that one for sure). You might have more success using the binary protocol.

Thanks for the update on plaintext SDK deprecated... Wish I had not upgraded robomaster S/W since I was doing fine last year with the plaintext.
I installed the latest Python and Robomaster packages.
I am connected in DIrect WiFi, robomaster on 192.168.2.1 port 40923 accepts tcp/ip plaintext commands but just empty response (I assume due to deprecation).
In python, robot_ip_list=conn.scan_robot_ip_list(timeout=5)  returns empty list depsite all that.
Hence of course no programming or control possible.
Any ideas/suggestions?
thanks in advance!
2023-12-17
Use props
tsvi lev
lvl.1

Israel
Offline

OK I found my error - I set the local IP address to that of the robot instead that of the PC. Ignore my comments please!

Now I do get 'ok;' message to the 'command;' message in plaintext, no change in Python failure to connect and no other robot plaintext command work :-(
2023-12-18
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules