1
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ 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? $\endgroup$ – Ian Jul 2 '13 at 1:49
  • $\begingroup$ 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. $\endgroup$ – Mark Booth Jul 2 '13 at 10:43
  • $\begingroup$ 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! $\endgroup$ – foobarbecue Jul 5 '13 at 21:10
  • $\begingroup$ You might find this recent post about PX4 usb problems useful: groups.google.com/forum/#!topic/drones-discuss/xDVbQBw-f3Y $\endgroup$ – foobarbecue Jul 11 '13 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.