Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac OS, Linux driver for CH340K #3

Open
ppeters opened this issue Jun 12, 2020 · 52 comments
Open

Mac OS, Linux driver for CH340K #3

ppeters opened this issue Jun 12, 2020 · 52 comments

Comments

@ppeters
Copy link

ppeters commented Jun 12, 2020

The CH340K has an unrecognized device ID on macOS Catalina, actually the ID is 1 lower than on a Wemos D1mini. Could you provide a driver for macOS like you did for microsoft windows?

@johndoe71rus
Copy link

try this http://www.wch-ic.com/products/CH340.html

i can't compile CH341SER_LINUX.ZIP for linux. device detect as
idVendor=1a86, idProduct=7522

inside ch340x.c
#define CH34x_VENDOR_ID 0x1A86
#define CH340_PRODUCT_ID 0x7523
#define CH341_PRODUCT_ID 0x5523

@ppeters
Copy link
Author

ppeters commented Jun 22, 2020

I don't get the comment. The link mentioned above points to a page that shows many CH340 versions and has links to all kinds of CH341 drivers (windows, linux, mac) that do NOT support CH340K as far as I can see... The drivers I have downloaded (also the CH341SER_MAC.ZIP) supports vendor ID 0x1A86 and product ID 0x7523 but NOT product ID 0x7522

@johndoe71rus
Copy link

this is the best i could find. so you are lucky like me. I did not look inside windows and mac drivers. I could not build the linux driver. The next step would be to try to add product ID 0x7522. sometimes it’s enough.

@ppeters
Copy link
Author

ppeters commented Jun 23, 2020

I appreciate the effort very much. I seem to be unable to find the driver's sources (that you have been able to find) to try and compile a new version... (preferably the mac version sources of course)

@johndoe71rus
Copy link

according to describe CH341SER_* does not support CH340K http://www.wch-ic.com/downloads/CH341SER_LINUX_ZIP.html
"CH340G,CH340T,CH340C,CH340E,CH340B,CH341A,CH341T,CH341B,CH341C,CH341U"
For linux they suggest source code. So we are unlucky.

@ppeters
Copy link
Author

ppeters commented Jun 23, 2020

Ok johndoe71rus, thanks for your efforts. I guess we're at the mercy of Lilygo then. Let's hope they respond...

@johndoe71rus
Copy link

Can you change issue name to "Mac OS, Linux driver for CH340K".

I use tx,rx,gnd to connect PL2303 Serial Port to change firmware to NodeMCU. But onboard usb controller is convenient

@ppeters ppeters changed the title Mac driver Mac OS, Linux driver for CH340K Jun 24, 2020
@johndoe71rus
Copy link

for me work advice

manually load module ch341 and then enter:
sudo sh -c "echo 1a86 7522 > /sys/bus/usb-serial/drivers/ch341-uart/new_id"

try find the same for MacOS

@ppeters
Copy link
Author

ppeters commented Jul 1, 2020 via email

@elektro-wolle
Copy link

I opened a support request at mac-usb-serial.com to include the new Product-Id (0x7522) into their drivers, but got no response. Neither per Mail nor twitter.

@rmjjanssen1
Copy link

Hi,

Have the same issue here on Mac OS Mojave. Is a fix available?

@elektro-wolle
Copy link

@rmjjanssen1 I'm currently using a debian VirtualBox-Image to initially flash a esp-home/tasmota-image and using OTA-Updates for later installs.

@geo777535
Copy link

I want to use this model (LILYGO-T-OI) as a wi-fi deauther , after installing the driver for uart (CH340K ) ,can i use ESP8266 Flasher install the firmware wi-fi deauther ?

@johndoe71rus
Copy link

I think yes. I am using nodemcu-pyflasher to flash my NodeMCU firmware. The basis of success is a working CH340K for exchange with a computer.

@geo777535
Copy link

3 LEDs on the board What does everyone do? when it turns on when it turns off ? it is true, that if the board is turned on the red LED is constantly on How to turn it off ?

@jbrepogmailcom
Copy link

On my ubuntu, USB gets identified automatically as ID 1a86:7522 QinHeng Electronics USB Serial. Use watch lsusb

@geo777535
Copy link

how many dbi of ceramic antenna module LILYGO-T-OI ?

@algomusic
Copy link

Disappointingly, there still seems to be no Mac USB driver support. I had to use a Windows box instead to program this board.

@ppeters
Copy link
Author

ppeters commented Mar 22, 2021 via email

@bjiusc
Copy link

bjiusc commented May 18, 2021

Having this issue as well, haven't found a solution yet...

@rmjjanssen1
Copy link

Having this issue as well, haven't found a solution yet...

Which version of OSX you running? Have not tried it yet but I was thinking on using FTTI board using RxTx to program the board

@garudaonekh
Copy link

garudaonekh commented Jun 14, 2021

Not work with MacOS Big Sur. Either wait for Apple's mercy or LilyGo

@Stesm
Copy link

Stesm commented Jul 27, 2021

On MacOS Big Sur 11.5.1
To support product ID 0x7522 download and install official from kext http://www.wch-ic.com/search?q=CH340&t=downloads

  1. Open kext plist file /Library/Extensions/usbserial.kext/Contents/Info.plist
  2. Add new IOKitPersonalities dict for product ID 0x7522
<key>usb12</key>
<dict>
    <key>CFBundleIdentifier</key>
    <string>com.wch.usbserial</string>
    <key>IOClass</key>
    <string>wch_usb</string>
    <key>IOProviderClass</key>
    <string>IOUSBDevice</string>
    <key>idProduct</key>
    <integer>29986</integer>
    <key>idVendor</key>
    <integer>6790</integer>
</dict>
  1. Reboot in safe mode command + R and open terminal
  2. Disable System Integrity Protection by csrutil disable and reboot
  3. Reload kext sudo kextload /Library/Extensions/usbserial.kext
  4. Reboot in safe mode command + R and open terminal
  5. Enable System Integrity Protection by csrutil enable and reboot
  6. Connect to /dev/tty.wchusbserial14220

Hope it's helpful for you :)

@thorsten-l
Copy link

On MacOS Big Sur 11.5.1
To support product ID 0x7522 download and install official from kext http://www.wch-ic.com/search?q=CH340&t=downloads

  1. Open kext plist file /Library/Extensions/usbserial.kext/Contents/Info.plist
  2. Add new IOKitPersonalities dict for product ID 0x7522
<key>usb12</key>
<dict>
    <key>CFBundleIdentifier</key>
    <string>com.wch.usbserial</string>
    <key>IOClass</key>
    <string>wch_usb</string>
    <key>IOProviderClass</key>
    <string>IOUSBDevice</string>
    <key>idProduct</key>
    <integer>29986</integer>
    <key>idVendor</key>
    <integer>6790</integer>
</dict>
  1. Reboot in safe mode command + R and open terminal
  2. Disable System Integrity Protection by csrutil disable and reboot
  3. Reload kext sudo kextload /Library/Extensions/usbserial.kext
  4. Reboot in safe mode command + R and open terminal
  5. Enable System Integrity Protection by csrutil enable and reboot
  6. Connect to /dev/tty.wchusbserial14220

Hope it's helpful for you :)

Works fine for me on mac OS 11.5.1 (macbook pro 2017) until i reenable System Integrity Protection. After that the driver is not available anymore.

@eschwim
Copy link

eschwim commented Aug 28, 2021

In case anyone else stumbles across this: I was running into the same problems with the new LilyGO T-OI Plus (the risc-based ESP-32C version), which also has the CH340K in it.

I only have a Mac to work with, so I thought I was stuck. However, it turns out that WinChipHead is super responsive to email. I asked them if they could rebuild their MacOS driver to support the CH340K and they did it the same day! I have installed it and confirmed that it correctly creates a serial device (at /dev/cu.wchusbserial1432220), where previous versions of the driver have not.

It looks like they don't have a download link available for the new version on their website yet, so I am linking to a gdrive folder containing the driver package that they emailed me: https://drive.google.com/file/d/1XY9kOZ1EUEC6M5IrDPSYzNRRJ1k6VkwL/view?usp=sharing (it is digitally signed, so you don't need to worry about disabling SIP).

Hope this helps someone else!

@ppeters
Copy link
Author

ppeters commented Aug 30, 2021 via email

@19eighties
Copy link

19eighties commented Sep 13, 2021

It looks like they don't have a download link available for the new version on their website yet, so I am linking to a gdrive folder containing the driver package that they emailed me: https://drive.google.com/file/d/1XY9kOZ1EUEC6M5IrDPSYzNRRJ1k6VkwL/view?usp=sharing (it is digitally signed, so you don't need to worry about disabling SIP).

Hope this helps someone else!

@eschwim Are you running Big Sur? Near the end of the installation, another app pops up asking to install additional drivers and it is not successful. I think it requires disabling SIP, but I am not sure if it is safe to do so or if it would continue to run after enabling SIP. Would you be able to check with the provider of this driver? Thanks!

@eschwim
Copy link

eschwim commented Sep 14, 2021

Yeap, running Big Sur, v11.5.1 (20G80).

My memory's not what it used to be, but from what ISTR the only popup I got during the install was in mandarin (which I can't read), and it had a single button that I just blind-clicked on and the installation finished.

Did you check out the "System Preferences -> Security & Privacy" config screen? There might be something under there that you need to allow before the driver install will succeed.

@miloshev
Copy link

Thank you very much for the driver. It works like a charm on BigSur 11.4 :)

@19eighties
Copy link

@eschwim, thanks for the additional info. I had to update my OS to the latest and now it works. I think I was on v11.1.

@algomusic
Copy link

@eschwim Thanks for following that up. BTW, I'm still running MacOS Mojave 10.14 and it worked for men(but that prob has less OS security barriers than v11).

@WCHSoftGroup
Copy link

Hello, everyone. The ch34xser New driver has been supported here: https://github.com/WCHSoftGroup/ch34xser_macos
Which supports all platforms(include Big Sur).
Chip Model Support
CH340/CH341/CH343/CH9101/CH9102
CH342/CH344/CH9103
Also, the linux driver: https://github.com/WCHSoftGroup/ch341ser_linux

@Lanjelin
Copy link

I guess there is no support for the new Apple M1 Macs yet?
Screenshot 2021-10-30 at 17 58 49

@3rwolff
Copy link

3rwolff commented Jan 27, 2022

Hello, I am on a MacBook Pro running macOS Mojace Version 10.14.6. I had the ESP32-CAM working yesterday but then installed the driver mentioned in this thread (CH34xVCPDriver_signed.pkg https://drive.google.com/file/d/1XY9kOZ1EUEC6M5IrDPSYzNRRJ1k6VkwL/view?usp=sharing trying to also get the TTGO-Camera chip to connect) and ever since then I am unable to get the ESP32-CAM to work anymore. My first instinct was to un-install this driver to see if that was causing the issue but I don't see any way to uninstall it.

The error message I get when I click "Upload" in my Arduino IDE is: "A fatal error occurred: Timed out waiting for packet header". I have the same board selected as when it worked yesterday (i.e. AI Thinker ESP32-CAM) and am using the same port ("dev/cu.wshusbserial14110" which is a usb port on a dongle that I have connected to the USBC port on my mac).

I am pretty stumped on what is causing this issue if anyone has any input it would be greatly appreciated. Thanks

@3rwolff
Copy link

3rwolff commented Jan 27, 2022

I also tried following the uninstall instructions and then re-instal instructions here with no success https://github.com/WCHSoftGroup/ch34xser_macos

@murari97
Copy link

I guess there is no support for the new Apple M1 Macs yet? Screenshot 2021-10-30 at 17 58 49

Its working for me

@mozhata
Copy link

mozhata commented May 19, 2022

I met the same questions
install driver without err, but cannot found the usbserial
with Monterey OS, M1 chip
image

image

@seanjensengrey
Copy link

@mozhata I am on Monterey 12.3.1 and found it under

USB3.1 (left front port)

USB Serial:

  Product ID:	0x7522
  Vendor ID:	0x1a86
  Version:	2.64
  Speed:	Up to 12 Mb/s
  Location ID:	0x01100000 / 1
  Current Available (mA):	500
  Extra Operating Current (mA):	0

I did not install any driver, though I do have VMWare Fusion Preview for M1

@dennisdebel
Copy link

In case anyone else stumbles across this: I was running into the same problems with the new LilyGO T-OI Plus (the risc-based ESP-32C version), which also has the CH340K in it.

I only have a Mac to work with, so I thought I was stuck. However, it turns out that WinChipHead is super responsive to email. I asked them if they could rebuild their MacOS driver to support the CH340K and they did it the same day! I have installed it and confirmed that it correctly creates a serial device (at /dev/cu.wchusbserial1432220), where previous versions of the driver have not.

It looks like they don't have a download link available for the new version on their website yet, so I am linking to a gdrive folder containing the driver package that they emailed me: https://drive.google.com/file/d/1XY9kOZ1EUEC6M5IrDPSYzNRRJ1k6VkwL/view?usp=sharing (it is digitally signed, so you don't need to worry about disabling SIP).

Hope this helps someone else!

For mac Catalina this was the only driver that works (I tried all..), thank you so much!

@QiangZiBro
Copy link

In case anyone else stumbles across this: I was running into the same problems with the new LilyGO T-OI Plus (the risc-based ESP-32C version), which also has the CH340K in it.

I only have a Mac to work with, so I thought I was stuck. However, it turns out that WinChipHead is super responsive to email. I asked them if they could rebuild their MacOS driver to support the CH340K and they did it the same day! I have installed it and confirmed that it correctly creates a serial device (at /dev/cu.wchusbserial1432220), where previous versions of the driver have not.

It looks like they don't have a download link available for the new version on their website yet, so I am linking to a gdrive folder containing the driver package that they emailed me: https://drive.google.com/file/d/1XY9kOZ1EUEC6M5IrDPSYzNRRJ1k6VkwL/view?usp=sharing (it is digitally signed, so you don't need to worry about disabling SIP).

Hope this helps someone else!

I wish anybody could share the CH340 driver for MacOS m2 or its source code of Apple version, I installed the driver here but got

❯ sudo kextload /Library/Extensions/CH34xVCPDriver.kext
Executing: /usr/bin/kmutil load -p /Library/Extensions/CH34xVCPDriver.kext
Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Unsupported Error: one or more extensions are unsupported to load 	Kext cn.wch.driver.CH34xVCPDriver v1 in executable kext bundle cn.wch.driver.CH34xVCPDriver at /Library/Extensions/CH34xVCPDriver.kext
Unsupported Error: one or more extensions are unsupported to load 	Kext cn.wch.driver.CH34xVCPDriver v1 in executable kext bundle cn.wch.driver.CH34xVCPDriver at /Library/Extensions/CH34xVCPDriver.kext" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Unsupported Error: one or more extensions are unsupported to load 	Kext cn.wch.driver.CH34xVCPDriver v1 in executable kext bundle cn.wch.driver.CH34xVCPDriver at /Library/Extensions/CH34xVCPDriver.kext
Unsupported Error: one or more extensions are unsupported to load 	Kext cn.wch.driver.CH34xVCPDriver v1 in executable kext bundle cn.wch.driver.CH34xVCPDriver at /Library/Extensions/CH34xVCPDriver.kext}

@sstawecki
Copy link

Just want to confirm that for M1/M2/Apple Silicon, the .pkg file works correctly. After installing, the system asks for permissions.

@SuibianP
Copy link

@sstawecki May I know if you have actually tested on an M2 machine?

@sstawecki
Copy link

Hi @SuibianP !
No, I tested it on my M1 Pro 16", do you have issues in your M2? if so, try to navigate system settings to see if there is any warning or something asking for permissions, it might be that.

@Jackbit5
Copy link

Hi @sstawecki, I have tested the above .pkg file on an m2 mac and it has worked.

@dzungpv
Copy link

dzungpv commented Sep 20, 2023

Hi @sstawecki, I have tested the above .pkg file on an m2 mac and it has worked.

I install on MB Pro M2 Max but it not working

@jakorten
Copy link

jakorten commented Oct 3, 2023

Does not work (anymore) on Sanoma (using an MB Pro M1)

@sstawecki
Copy link

I haven't updated the OS yet but, are you sure this is not a problem related to permissions that need to be reset?

@guayerd
Copy link

guayerd commented Dec 6, 2023

Hi @sstawecki, I have tested the above .pkg file on an m2 mac and it has worked.

I install on MB Pro M2 Max but it not working

Same here! I'm trying on a Macbook Pro M2 Pro and a Apple Sonoma ver. 14.2.1 and can't make it work... any idea?

I already tried with several cables...

@shreeve
Copy link

shreeve commented Dec 21, 2023

Ugh, I just purchased two boards with this and neither works on an M1 macOS running Sonoma... hrm.

@quintendewilde
Copy link

Can anybody verify if the .pkg works for Monterey on mac M1?

@ikivela
Copy link

ikivela commented Mar 5, 2024

This works for me (Mac m3 Sonoma)
https://github.com/WCHSoftGroup/ch34xser_macos

@ferusinfo
Copy link

ferusinfo commented Mar 6, 2024

https://github.com/WCHSoftGroup/ch34xser_macos

I can confirm that this driver is working (M1 Max, Ventura). Make sure you download newest version from GitHub and run dmg file.
When prompted that extension is blocked in the system, go to Privacy settings on a macOS and allow the extension to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests