@Kolbasz9 wrote:
Hi,
I'd like to ask your help because I'm so stucked in with APM I cannot figure out what the mission planner needs to receive from it to being properly connected.
What I do is have a raspberry connected to APM2 via telemetry where a py script reads out the serial and sends it to the mission planner to UDP/14550. Also the packages sent back by mission planner to the port I send the packets from I wrote back to the serial:
def tty2UDP():
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
while(1):
line = ser.readline()
if (line != ''):
sock.sendto(line, ( GSC_address, 14550 ))
print ' message sent to GSC '
else:
print ' no output to GSC 'data, addr = sock.recvfrom(1024) if (data !=''): print 'received message: ', data ser.write(data) else: print 'no input' ser.close() exit -1 #------------------------------------------------------------------------------------------------------------ ser = serial.Serial('/dev/ttyUSB0', 57600, timeout=2, xonxoff=False, rtscts=False, dsrdtr=False) ser.flushInput() ser.flushOutput() tty2UDP()
Mission planner sometimes says it is connected but a seconds later it says link is down. I saw the messages from APM to delivered to Mission planner with wireshark - parameters like position, informations about servos, etc can be read out.
I'd appreciate any constructive advise, please! Image may be NSFW.
Clik here to view.Frankly I would not like to start using python mavlink bindings to do everything from scratch.
Thank you in advance
Cheers
Peter
Posts: 2
Participants: 1