Hi all, I’ve recently switched over to Linux Mint from Windows 10 and I’m having trouble installing a CH340 driver from Sparkfun. I’ve managed to unzip the contents and have it in this location: /home/user/Downloads/CH341SER_LINUX. I’ve tried running the files using the ./ command for both the ch34x.c and Makefile but ran into a bash issue which I’m stuck trying to figure out. Could someone please tell me how to make it work? I’ve already looked up a couple of different videos on Youtube but they kind of skip the explanation of how to install this driver on Linux in favor of Windows and MacOS.

Please see the attached image for the response I get in the terminal.

UPDATE: It turns out I had a bad micro USB cable. Most of the ones I was using to connect to an ESP32 board were charge only. Mint apparently had the driver for this all along. Thanks for the help everyone.

  • cmnybo@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 months ago

    Why are you trying to install a driver for a CH340? The driver is already built into the kernel. Just plug it in and it will work.

    • 30p87@feddit.de
      link
      fedilink
      arrow-up
      1
      ·
      2 months ago

      Like nearly all drivers lol

      Drivers I needed to pay special attention to:

      • NVidia (we all know the official stance on that topic)
      • e1000e needs patching because my Laptops NIC somehow reports the wrong NVM checksum
      • Some obscure chinese “USB to DVI-D” adapter
      • The fingerprint sensor in my Laptop, as it’s still experimental
    • sntx@lemm.ee
      link
      fedilink
      arrow-up
      0
      ·
      2 months ago

      This.

      However sometimes the user can’t access the device. Depending on your system, I recommend adding your user to the dialout/serial group.

      I.e. quick online search

  • Someonelol@lemmy.dbzer0.comOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 months ago

    I did what abominable_panda suggested and it returned a “wait_queue_t” and a couple of pointer type errors. I’m not sure if that’s something that could be fixed with installing something else, but I’m not at all familiar with troubleshooting on this OS yet. The troubleshooting part you mentioned is if it successfully installed but there are issues. It doesn’t quite explain the initial installation part.

    As for cmnybo’s question, I’m trying to program a ESP32 module with the Arduino IDE. I’ve tried just plugging it in and hoping the driver would already be installed but lsusb doesn’t show it on the results.

    • cmnybo@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 months ago

      If it’s not showing up in lsusb and there is no activity in syslog when connecting or disconnecting it, then the problem is not a driver. It’s likely a bad cable or you got a dead module.

      • Someonelol@lemmy.dbzer0.comOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 months ago

        You’re right about the bad cable. I have a collection of about 10 USB A to USB micro cables and only one of them showed up on lsusb! Thanks for the advice!

    • KrapKake@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      2 months ago

      Some time ago I wasted about 2 hours of time because of that damn brltty, wondering why the tf the arduino was not being detected until I followed dmesg. I was very upset at the time when I found out what brltty was. Like I get some people need that but if the user did not connect a braille display during install then the daemon should never be enabled or just uninstalls during os installation.

  • helpimnotdrowning@lemmy.sdf.org
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    2 months ago

    *.c files are C source files, you can’t run these directly. Run the makefile with sudo make or sudo make install (assuming you have make installed) to build (or build and install) the driver.

    edit: Oops didn’t read far enough into your post, you’ve already tried make. What error does it give you?

    • Someonelol@lemmy.dbzer0.comOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 months ago

      I get this as a result:

      user@user-System-Product-Name:~/Downloads/CH341SER_LINUX$ sudo make Makefile

      make: Nothing to be done for ‘Makefile’.

      • umami_wasabi@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        2 months ago

        You don’t pass in Makefile to make as it will read that file automatically. Nor you need sudo with make as compiling doesn’t need any special privileges.

        Step:

        1. make: compile the code to binary
        2. sudo make install: install the binary to your system
  • Jallu@sopuli.xyz
    link
    fedilink
    arrow-up
    0
    arrow-down
    2
    ·
    edit-2
    2 months ago

    Doesn’t look like the executable you are trying to run is with executable rights.

    chmod +x ch34x.c
    

    And retry.

    (I don’t have any knowledge of this driver or installing it. Just wanted to give some directions.)