dji-sdk / RoboMaster-SDK

DJI RoboMaster Python SDK and Sample Code for RoboMaster EP.
Apache License 2.0
328 stars 150 forks source link

Can't connect to robomaster #31

Open cyrilknops opened 4 years ago

cyrilknops commented 4 years ago

tried different examples but all give the error: ERROR client.py:70 Client: init, create Connection, exception: module 'robomaster.config' has no attribute 'DEFAULT_CONN_PROTO'

It found the correct ip of the robomaster and i used robot.config.LOCAL_IP_STR to set the ip of my computer because it gave 0.0.0.0 at first

xitinglin-dji commented 4 years ago

tried different examples but all give the error: ERROR client.py:70 Client: init, create Connection, exception: module 'robomaster.config' has no attribute 'DEFAULT_CONN_PROTO'

It found the correct ip of the robomaster and i used robot.config.LOCAL_IP_STR to set the ip of my computer because it gave 0.0.0.0 at first

make sure your robot is RoboMaster EP instead of RoboMaster S1,and EP version is greater than or equal to 01.01.0500

norbour commented 3 years ago

So RoboMaster-SDK can't run with RoboMaster S1?

brunoga commented 3 years ago

So RoboMaster-SDK can't run with RoboMaster S1?

Not without a hack, no. But the S1 is perfectly capable of having SDK support if DJI wanted to do so.

cyrilknops commented 3 years ago

I got a hacked S1 but still can't get it to work.

brunoga commented 3 years ago

I got a hacked S1 but still can't get it to work.

Define "hacked". Because I have 2 hacked S1s and the SDK work on both. Note that by "hack" I mean a specific hack to get the SDK working on it. It is not enough to simply have root access to the S1 (although it is required).

cyrilknops commented 3 years ago

I got a hacked S1 but still can't get it to work.

Define "hacked". Because I have 2 hacked S1s and the SDK work on both. Note that by "hack" I mean a specific hack to get the SDK working on it. It is not enough to simply have root access to the S1 (although it is required).

I believe I got it from you. I messaged you on the dji from a month ago

brunoga commented 3 years ago

I got a hacked S1 but still can't get it to work.

Define "hacked". Because I have 2 hacked S1s and the SDK work on both. Note that by "hack" I mean a specific hack to get the SDK working on it. It is not enough to simply have root access to the S1 (although it is required).

I believe I got it from you. I messaged you on the dji from a month ago

Well, what exactly did you get, how did you apply it and what did you did it?

if you correctly applied the hack I applied, you should hear the robomaster chime twice (instead of once) when turning it on. If it si not chiming twice, then whatever you did did not work.

cyrilknops commented 3 years ago

It chimes twice at the start and the text based SDK works. Can't connect to the camera and other SDK's like this one don't work. I can't make a connection like I posted when I opened this issue.

brunoga commented 3 years ago

Ok, lets slice that a bit:

1 - If it chimes twice, then you got the hack working. That can also be concluded based on the fact that you said the text mode SDK works. 2 - What are you using to "connect to camera"? Can you try my SDK and the example code here: https://github.com/brunoga/robomaster/tree/master/sdk/examples/robotcontrol 3 - The hack currently only supports the text mode sdk so only the code here should work: https://github.com/dji-sdk/RoboMaster-SDK/tree/master/examples/plaintext_sample_code 4 - That being said, I have the new binary protocol working on my S1, but I did not devote too much time to it in the recent past so I am not sure how well it supports it, but it does.