LilyGO / LILYGO-T-OI

34 stars 7 forks source link

Mac OS, Linux driver for CH340K #3

Open ppeters opened 4 years ago

ppeters commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

johndoe71rus commented 4 years ago

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

johndoe71rus commented 4 years ago

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 commented 4 years ago

Ok, I’ll see if there is something similar on the Mac. Thanks a lot for hanging in there with me :-) !!

Kind regards,

Peter

elektro-wolle commented 3 years ago

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 commented 3 years ago

Hi,

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

elektro-wolle commented 3 years ago

@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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

geo777535 commented 3 years ago

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

algomusic commented 3 years ago

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

ppeters commented 3 years ago

Maybe we’re barking up the wrong tree. I guess it should be peanuts for Apple to extend their driver with a single new driver ID...

Peter — Sent from IPhone


From: Andrew Brown @.> Sent: Monday, March 22, 2021 4:33:52 AM To: LilyGO/LILYGO-T-OI @.> Cc: Peters, Peter @.>; Author @.> Subject: Re: [LilyGO/LILYGO-T-OI] Mac OS, Linux driver for CH340K (#3)

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FLilyGO%2FLILYGO-T-OI%2Fissues%2F3%23issuecomment-803737274&data=04%7C01%7C%7Cee7e9b91e4c64204b09a08d8ece35142%7Ccc7df24760ce4a0f9d75704cf60efc64%7C1%7C0%7C637519808363897402%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nCFE1%2FnaBJ6E6V3TJkZg6oLUDDW%2B664kSrVkCOey%2FUE%3D&reserved=0, or unsubscribehttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABIHLDUCVGSSQSYUAL3RV4DTE23CBANCNFSM4N4APDNQ&data=04%7C01%7C%7Cee7e9b91e4c64204b09a08d8ece35142%7Ccc7df24760ce4a0f9d75704cf60efc64%7C1%7C0%7C637519808363907357%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qDeI6nTSZCZL%2F3pj4UZABJ6WQ7EUOSdosnSt3sffd3A%3D&reserved=0.

bjiusc commented 3 years ago

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

rmjjanssen1 commented 3 years ago

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 commented 3 years ago

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

Stesm commented 3 years ago

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>
  3. Reboot in safe mode command + R and open terminal
  4. Disable System Integrity Protection by csrutil disable and reboot
  5. Reload kext sudo kextload /Library/Extensions/usbserial.kext
  6. Reboot in safe mode command + R and open terminal
  7. Enable System Integrity Protection by csrutil enable and reboot
  8. Connect to /dev/tty.wchusbserial14220

Hope it's helpful for you :)

thorsten-l commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

Thanks @Eric Schwimmer!!, this finally solved my issue…

Kind regards,

Peter

19eighties commented 3 years ago

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 commented 2 years ago

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 commented 2 years ago

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

19eighties commented 2 years ago

@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 commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

I guess there is no support for the new Apple M1 Macs yet?

Screenshot 2021-10-30 at 17 58 49
3rwolff commented 2 years ago

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 commented 2 years ago

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

murari97 commented 2 years ago

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 commented 2 years ago

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

image

image

seanjensengrey commented 2 years ago

@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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

SuibianP commented 1 year ago

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

sstawecki commented 1 year ago

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 commented 1 year ago

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

dzungpv commented 11 months ago

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 commented 11 months ago

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

sstawecki commented 11 months ago

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 commented 9 months ago

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 commented 8 months ago

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

quintendewilde commented 7 months ago

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