Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    [SOLVED] apu2 internal TTL com port

    Scheduled Pinned Locked Moved Hardware
    38 Posts 8 Posters 5.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • X
      xbipin
      last edited by

      the apu2 and older alix boards have a com2 port header which works on 3.3V TTL logic, i have a usb to ttl adapter and i tried plugging in tx and rx pins to the apu2 but i just see garbage on all baud rates, has any1 tried this or does it need to be enabled somewhere in the pfsense kernel to be able to use this.

      the below works flawless though
      usb to ttl adapter –-> ttl to serial ---> apu2 serial port

      1 Reply Last reply Reply Quote 0
      • jahonixJ
        jahonix
        last edited by

        What data do you expect to see on the other serial port - console?

        It's years since I last ran something on an ALIX second serial port and it takes some time for the memories to come back. Original plan back then was to control displays from that port but that project was dismissed. Thank god!
        I'll post a reply if memory serves me something.

        1 Reply Last reply Reply Quote 0
        • X
          xbipin
          last edited by

          well we want to use the second serial port for serial console and use the main serial port for other things

          1 Reply Last reply Reply Quote 0
          • X
            xbipin
            last edited by

            any idea coz when i connect a usb to ttl adapter to that im seeing garbage, do we need to tell pfsense to redirect to that or something?

            i have tried 2 different chipset usb to TTL adapters and its same on both, pcengine guys told me its supposed to work

            1 Reply Last reply Reply Quote 0
            • X
              xbipin
              last edited by

              it seems the apu2 bios works on com1 only but i was told i could redirect pfsense console to internal com2, any idea what to change where inorder to get the pfsense console output to this internal com2 port?

              1 Reply Last reply Reply Quote 0
              • jahonixJ
                jahonix
                last edited by

                @xbipin:

                do we need to tell pfsense to redirect to that or something?

                Jepp, it uses the first ser port if not told to change that.

                On an AUP2 look at /var/log/dmesg.boot and you'll find
                uart0: <16550 or compatible> at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
                uart0: console (115200,n,8,1)

                But I don't see a uart1 for the other port there … and cannot find where to change the port in pfSense's GUI at all. Sorry, I don't remember how we wanted to use that port back in 2012 or so. Getting old...
                But I still have a dozent or so Max232 level converters laying around for that purpose. Never used.

                1 Reply Last reply Reply Quote 0
                • D
                  doktornotor Banned
                  last edited by

                  This is not possible without recompiling the boot blocks and other weirdo messing, just waste of time IMNSHO.

                  https://www.freebsd.org/doc/handbook/serialconsole-setup.html

                  1 Reply Last reply Reply Quote 0
                  • X
                    xbipin
                    last edited by

                    well i see uart1 on my board

                    uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
                    uart0: console (115200,n,8,1)
                    orm0: <isa option="" rom=""> at iomem 0xef000-0xeffff on isa0
                    apuled0: <apu2> at iomem 0xfed81610-0xfed8161b,0xfed81664-0xfed81667 on isa0
                    ppc0: cannot reserve I/O port range
                    uart1: <16550 or compatible> at port 0x2f8 irq 3 on isa0</apu2></isa>
                    
                    1 Reply Last reply Reply Quote 0
                    • D
                      doktornotor Banned
                      last edited by

                      That's not the problem. The problem is that COM1 is hardcoded in the boot blocks. Changing it on the fly is not possible. See the linked howto.

                      1 Reply Last reply Reply Quote 0
                      • jimpJ
                        jimp Rebel Alliance Developer Netgate
                        last edited by

                        You can install using the ADI image to get a serial console on COM2 but I'm not sure what other side effects you might have with that image on non-ADI hardware.

                        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                        Need help fast? Netgate Global Support!

                        Do not Chat/PM for help!

                        1 Reply Last reply Reply Quote 0
                        • X
                          xbipin
                          last edited by

                          Thanks for the info, btw I found one method to get serial console on com2 so I'll get time to test it on Saturday and report back if it works, the other reason I want this to work is for a remote site where they only have a USB to ttl adapter which can connect to com2 and traffic shaping is crashing their system so need to get a crash dump because the system isn't saving it and keeps rebooting

                          1 Reply Last reply Reply Quote 0
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            I have found that nothing more is required than adding to /boot/loader.conf.local

                            comconsole_port="0x2F8"
                            

                            You may not get the full boot output from that but you should get the console/menu.

                            Steve

                            1 Reply Last reply Reply Quote 0
                            • X
                              xbipin
                              last edited by

                              Exactly the same stuff I read in a Reddit post and wanted to try, don't want the boot output, just want the console menu and afterwards

                              1 Reply Last reply Reply Quote 0
                              • X
                                xbipin
                                last edited by

                                @stephenw10:

                                I have found that nothing more is required than adding to /boot/loader.conf.local

                                comconsole_port="0x2F8"
                                

                                You may not get the full boot output from that but you should get the console/menu.

                                Steve

                                i tried this and it works but i have another issue which i was coordinating with pcengine guys and came to the conclusion that when we redirect serial console to com2 header on apu2 using the above in loader.conf.local then console stops and the com1 and it get silent so thats fine but then the com2 starts giving the console along with a constant stream of garbage which never stops, at first i was told my usb to uart adapter might be faulty so tried a different chipset one and its same and also tried on 2 apu2 boards and it same so any idea why is pfsense or freebsd doing this?

                                1 Reply Last reply Reply Quote 0
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  What is it actually sending to the port?

                                  Steve

                                  1 Reply Last reply Reply Quote 0
                                  • jimpJ
                                    jimp Rebel Alliance Developer Netgate
                                    last edited by

                                    "garbage" makes me think it's sending at a different serial speed, whatever it is. Doesn't sound like anything that pfSense or FreeBSD would be doing though.

                                    Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                                    Need help fast? Netgate Global Support!

                                    Do not Chat/PM for help!

                                    1 Reply Last reply Reply Quote 0
                                    • X
                                      xbipin
                                      last edited by

                                      from time to time i see valid serial output but then it comes along with lot of garbage characters non stop, i tried the default baud rate of 115200 as well as all possible baud rates and its same except on other baud rates its total garbage, atleast on 115200 i see some of the pfsense output but the garbage is so much that it comes in bits and pieces.

                                      1 Reply Last reply Reply Quote 0
                                      • stephenw10S
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        A bad connection or interference on the cable can appear like that. Is the cable particularly long?

                                        Steve

                                        1 Reply Last reply Reply Quote 0
                                        • X
                                          xbipin
                                          last edited by

                                          no its hardly 15cm and plus its happening on my adapter and apu2 as well as a different one in a client location.

                                          1 Reply Last reply Reply Quote 0
                                          • stephenw10S
                                            stephenw10 Netgate Administrator
                                            last edited by

                                            Do you see that even when the console has not been switched to it?

                                            Steve

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.