djiBridge MQTT not working
CompletedHello,
I am trying to connect to my MQTT server, from the jsBridge on a very simple HTML page:
window.connect_cb = async (a) =>
{
// some code...
};
// License verification first
// ...
// Now connect to MQTT
window.djiBridge.platformLoadComponent("thing", JSON.stringify({
host: "tcp://192.168.1.14:1883",
connectCallback: "connect_cb",
username: "",
password: ""
}));
It is not working, the component is loaded but I see no connection on my server (mosquitto) and using Wireshark I see that the remote controller is not initiating a connection at all. Do you know why ? How can I fix this, so that the connection works ?
Thank you.
-
Dear Developer, Hello and thank you for reaching out to DJI Innovations. Have you successfully logged into the pilot cloud platform in order? If you are not using the demo for development, you can refer to the following documentation to call the functions in sequence:https://developer.dji.com/doc/cloud-api-tutorial/en/feature-set/pilot-feature-set/pilot-access-to-cloud.html We hope that our solution meets your needs satisfactorily. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team -
Hi, thanks for the response.
The sample from DJI is working but I'm not using it, I want to have something as minimal as possible.
I found the problem: username (and password too, probably) cannot be empty, or else the request is not made.
Can you update the documentation ?
Thanks.
-
Dear Developer, Hello and thank you for reaching out to DJI Innovations. Thank you for your valuable feedback. We will escalate this to our team. You may also consider using the functionality demonstrated in the video to pilot your project on the cloud:https://developer.dji.com/doc/cloud-api-tutorial/en/quick-start/function-display-video.html We hope that our solution meets your needs satisfactorily. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team -
Hello,
I encountered the same issue as you did, but my param "
username"
and "password"
is not empty, and MQTT also failed to connect. The backend did not receive the message sent by the pilot2 and directly returnedfalse
. Are you sure the problem is caused by empty param? Did you change other code?I have no idea about this problem. I would appreciate it if you could reply.
Thanks.
Please sign in to leave a comment.
Comments
4 comments