3 Replies Latest reply on Dec 15, 2015 1:59 PM by Intel_Alvarado

    galileo gen2 and ttys1

    cristian_lainfo

      Hello all, i need to use 2 serial ports to receive serial data from gps, i have 2 x DB9 connectors, and i need this 2, no option, USB is busy with a USB CAN device and i need to use this.

       

      I'm booting with yocto linux, ttyS0 (PIN 0,1) is working fine and receiving, but ttyS1 (PIN 2,3) is attached to console and don't receive

      ------------

      root@galileo:/# dmesg | grep console

      [    0.000000] Early serial console at MMIO32 0x8010f000 (options '115200n8')

      [    0.000000] bootconsole [uart0] enabled'

      [    0.000000] Kernel command line: root=/dev/mmcblk0p2 rootwait console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x8010f000,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5 efi_main=0x000000016c202a74 jmp_code32=0x00000001ff87a1ea

      [    0.899149] console [ttyS1] enabled, bootconsole disabled

       

      ----------

       

      I'm using console with ethernet, i don't need serial console, i need to receive ttyS1 data in pins 2,3

      Can anybody help me on how to disable or switch this? i have all my system running and i don't like to recompile kernel.

       

      i can't see grub init file in /boot and i need to change the kernel command line; i think.

       

      Can anybody help me?

       

      Thank you,

      Regards

      Cristian

        • 1. Re: galileo gen2 and ttys1
          Intel_Alvarado

          Hi,

           

          In Galileo, the serial ports are:

          /dev/ttyS0 is the first Quark UART (UART0) and it's the Digital 0 and 1 pins

          /dev/ttyS1 is the second Quark UART (UART1) and it's the audio jack one.

           

          Your objective is to have ttyS1 in pins 2 and 3 instead of the audio jack right? I’d suggest you to take a look at /etc/systemd/system/getty.target.wants#. Here you’ll find the services that manage the serial ports:

          getty@tty1.service

          serial-getty@ttyS1.service

           

          Also, take a look at this thread Re: How to set multiple login consoles in Galileo? it has a very similar question and a suggestion that worked for the user. Hopefully you can find this helpful.

           

          Sergio

          • 2. Re: galileo gen2 and ttys1
            cristian_lainfo

            Hello, Sergio, and thank you for your answer.

            If i disable the console service, ttyS1 will work in Pins 3,4 by default, like ttyS0 in Pins 1,2 ?

             

            Regards

            Cristian

            • 3. Re: galileo gen2 and ttys1
              Intel_Alvarado

              Have you made any progress trying to receive ttyS1 data in pins 2 and 3? I’ve never tried to do something like this but to do it you’d probably have to make another service that specifies that the data that is sent/received from the audio jack will now transferred to pins 2 and 3. This service will look much like the services in /etc/systemd/system/getty.target.wants#.

              Try with this approach and let me know your results.

               

              Sergio