UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How to compile the kernel to use USB serial adapters?

    Scheduled Pinned Locked Moved Google Pixel 3a/3a XL
    8 Posts 6 Posters 980 Views 3 Watching
    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.
      • M Offline
        masao616
        last edited by

        I would like to use a USB serial adapter with Ubuntu Touch installed on a Pixel3A.
        The USB serial adapter used is the following CH340.

        https://barbados.desertcart.com/products/66108333-aihasd-usb-to-ttl-uart-module-ch-340-g-ch-340-3-3-v-5-v-serial-converter-switch-instead-of-cp-2102-pl-2303-with-6-p-female-cable

        I tried to connect the USB serial adapter to the Pixel3A via a OTG adapter and executed the lsusb command, and it is recognized as follows.

        $ susb
        Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
        Bus 001 Device 002: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
        Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
        

        However, /dev/serial* and /dev/ttyUSB* do not appear.

        $ ls /dev/serial* /dev/ttyUSB*
        ls: cannot access '/dev/serial*': No such file or directory
        ls: cannot access '/dev/ttyUSB*': No such file or directory
        

        I have tried using the following two OS versions with the same results.

        • ubuntu touch 16.04 (OTA-24)
        • ubuntu touch 20.04 (2022-W51)

        According to information at the following webpage, the kernel in ubuntu touch does not support the use USB serial adapters and the kernel must be recompiled to use it.

        https://askubuntu.com/questions/640003/ubuntu-touch-usb-serial-drivers-modules

        I would like to know how to recompile the kernel to use the USB serial adapter with Ubuntu Touch on Pixel 3a.
        If anyone knows how to do this, could you please help me?

        D 1 Reply Last reply Reply Quote 1
        • D Offline
          doniks @masao616
          last edited by

          @masao616 I don't think there is a brief and concise description of how to specifically rebuild the kernel, but I think you should be able to piece it together:

          • there is extensive documentation for how to port to new devices. you don't need to create a port, since it already exists, but part of that whole story is of course compiling and flashing a kernel https://docs.ubports.com/en/latest/porting/introduction/index.html
          • as far as I can quickly see the Pixel 3a is in the CI https://gitlab.com/ubports/porting/reference-device-ports/android9/google-pixel-3a https://gitlab.com/ubports/porting/community-ports/jenkins-ci/sargo/-/blob/main/Jenkinsfile even though one of them talks about sargo, the other about bonita
          • I suggest to cross read these resources and if you can't figure it out quickly then check in with the good folks in the porting telegram group: https://docs.ubports.com/en/latest/porting/introduction/Intro.html#getting-community-help
          M 1 Reply Last reply Reply Quote 0
          • M Offline
            masao616 @doniks
            last edited by

            @doniks
            Thanks for your kind advice.
            I am trying to go through the link information you referred me to.
            I am making some progress and seem to be getting by.
            I will succeed in the near future and report the details here.

            D 1 Reply Last reply Reply Quote 2
            • D Offline
              doniks @masao616
              last edited by

              @masao616 curious to hear how it goes!

              1 Reply Last reply Reply Quote 0
              • L Offline
                L-00983
                last edited by Lakotaubp

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • L Offline
                  L-01113
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • L Offline
                    L-01144
                    last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • arubislanderA Offline
                      arubislander
                      last edited by

                      This post in particular seems to attract spam bots, so it will be locked now.

                      πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                      Happily running Ubuntu Touch
                      Google Pixel 3a (20.04 DEV)
                      JingPad (24.04 preview)
                      Meizu Pro 5 (16.04 DEV)

                      1 Reply Last reply Reply Quote 0
                      • arubislanderA arubislander locked this topic on
                      • First post
                        Last post