We are currently using an orange cube, and a herelink controller unit to control and move a robot. We are trying to make a custom app that will visualise important data such as voltage, current, battery, etc. However, im a bit confused on where to get started, i’ve done some research and found that the easiest most effecient way to extract the data is by using mavlink router - but how does this actually work? if i was doing this on linux i would do the following:
download putty (or another similar software) and open up a new uart port
set up mavlink router to route to the new uart port
extract and store the data using C
can i follow the same concept on the herelink controller? is there a Putty like application that i can use on the herelink to open a Uart port? Or am i thinking to deep and there is a simpler solution?
Thank you for linking me that forum i took a look at it and now i have a more clear picture of how i am meant to accomplish this. so from my understanding i need to set up a UDP socket to listen to port 14552 (before i start listening i need to send a packet to establish a connection).
I still cant seem to get the data stream working though. I have created a new thread and set up a udp port - im firstly trying to send a packet to the udp port to establish the connection but it doesnt even allow this. it immediately rejects the packet and gives me a permission denies. is there a configuration or setting im meant to change in the cube pilot? any help would be appreciated.
Okay so i realised my code has an issue in it (i was accidentally connecting twice) and fixed up my code quality a bit. now the socket is connecting and I’m getting no errors but im not getting any packets at all. I’m also looking at my mission planner and it looks like packets are being sent correctly,
I ended up finding a solution to this issue, it turned out the issue i was having was with my settings and i ended up fixing it. But now i’ve ran into another problem, I’m receiving the packets now but i cant seem to figure out how to get them into a readable format. I’m trying to use .getdata() and ive tried all the other methods but it stills comes out as either gibberish english or the address such as [B@5a88ab1] I’ve really seemed to hit a rock wall here cant figure it out.
The message [B@5a88ab1] is just the binary being printed.