# PX4 Communication

Does anyone here know PX4 software? I'm using Eclipse to program it and I want to Open a new UART door and write on this, I'm doing the following commands...

static int uart2=open("/dev/ttyS1", O_RDWR | O_NONBLOCK | O_NOCTTY);
write(uart2,"Hi",3);


But this is not working! Anyone have any idea why?

• Can you add some more details about what is not working? For example: have you verified that the problem is in fact in your code, and not related to /dev/ttyS1 itself? Can you describe what the error message is, or what the actual behavior (vs desired behavior) is?
– Ian
Jul 2, 2013 at 1:49
• What PX4 software are you referring to? A quick search suggests that you could be referring to the PX4FMU Flight Management Unit so possibly talking about the PX4 Autopilot Project on github. Jul 2, 2013 at 10:43
• When you say it's "not working," are you having trouble during building, flashing, or during execution? Have you been able to compile and flash NuttX on the board ( pixhawk.ethz.ch/px4/dev/nuttx/building_and_flashing )? I have a PX4 and will try your code on it sometime soon, but please provide this extra info. Thanks! Jul 5, 2013 at 21:10
• You might find this recent post about PX4 usb problems useful: groups.google.com/forum/#!topic/drones-discuss/xDVbQBw-f3Y Jul 11, 2013 at 18:01
• This question does not appear to be answerable. There's not enough information as pointed out by most of the commenters above to reproduce the problem or even diagnose the problem with an error message or the like. Sep 30, 2021 at 7:48