Is it possible to activate Serial 5 on Pixhawk for personal use?

245 views
Skip to first unread message

Nikita P

unread,
Oct 7, 2016, 9:17:25 AM10/7/16
to drones-discuss
Hello, I wrote my code to get some sensors info to Pixhawk and send it to Mission Planner, evything went fine, but it was made on Serial 4; now I have a necessity to use Serial 4 for second GPS. So I want to port my software to Serial 5; but how I can undestand Serial 5 is locked to NSH-console and cant be used for anything else by default.

I saw one old thread on Diydrones where someone changed some code in order to use Serial 5.

Thanks in advance, Nikita.

Craig Elder

unread,
Oct 7, 2016, 10:25:05 AM10/7/16
to drones-discuss
Can you move your devices or your GPS over to Telem 1 or Telem 2?

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nikita P

unread,
Oct 7, 2016, 10:38:09 AM10/7/16
to drones-discuss
I cant everything is in use. I want to use Serial5 either for my sensors output or for second GPS.

пятница, 7 октября 2016 г., 17:25:05 UTC+3 пользователь craigelder написал:
Can you move your devices or your GPS over to Telem 1 or Telem 2?
On 7 October 2016 at 06:07, Nikita P <vasi...@gmail.com> wrote:
Hello, I wrote my code to get some sensors info to Pixhawk and send it to Mission Planner, evything went fine, but it was made on Serial 4; now I have a necessity to use Serial 4 for second GPS. So I want to port my software to Serial 5; but how I can undestand Serial 5 is locked to NSH-console and cant be used for anything else by default.

I saw one old thread on Diydrones where someone changed some code in order to use Serial 5.

Thanks in advance, Nikita.

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.

Craig Elder

unread,
Oct 7, 2016, 10:39:16 AM10/7/16
to drones-discuss

To unsubscribe from this group and stop receiving emails from it, send an email to drones-discuss+unsubscribe@googlegroups.com.

OlliW

unread,
Oct 7, 2016, 10:56:22 AM10/7/16
to drones-discuss
I would be interested in knowing this too

in my understanding one has to distinguish pixhawk, auav-x2, etc. and pixracer
in the former it seems that the 5th uart is reserved to the NSH console, as Nikita P said, and thus used to be not available as a "serialX"
with pixracer a further (6th) serial seems to have been added, allowing for a serial5 as listed in the wiki

so, I think, the question is, is it now possible to use the 5th uart on pixhawk, auav-x2, etc. as serial5 (i.e. is the 5th uart repurposed to a serial5 instead of the NSH shell when serial5 is enabled), or is that option only effective for pixracer, but not pixhawk, auav-x2, etc. ?

(from the parts of the code I have seen it seems to me that it is not easy to use the 5th uart like the other uarts on pixhawk, auav-x2, etc., and that the answer would be thus no, but I would be pleased if I would be wrong :))

Nikita P

unread,
Oct 7, 2016, 11:55:12 AM10/7/16
to drones-discuss
Yes, that is what I want to know;
As far as I can understand UARTs are listed in "\ardupilot-master\libraries\AP_HAL_PX4\HAL_PX4_Class.cpp"

#if defined(CONFIG_ARCH_BOARD_PX4FMU_V2)
#define UARTA_DEFAULT_DEVICE "/dev/ttyACM0"
#define UARTB_DEFAULT_DEVICE "/dev/ttyS3"
#define UARTC_DEFAULT_DEVICE "/dev/ttyS1"
#define UARTD_DEFAULT_DEVICE "/dev/ttyS2"
#define UARTE_DEFAULT_DEVICE "/dev/ttyS6"
#define UARTF_DEFAULT_DEVICE "/dev/null"

I thought I can define UARTF as /dev/ttyS5, and make other changes in this file according to other UARTs but this didnt work.


пятница, 7 октября 2016 г., 17:56:22 UTC+3 пользователь OlliW написал:
Reply all
Reply to author
Forward
0 new messages