[Solved] Clone arduino Mega 2560 - no serial port DCcduino Mega 2560

Hi,
I have beating my head against the wall all weekend over this.

The board is a DccEle - DCcduino Mega 2560

My environment is MAC OSX 10.9.4

When I connect the board, blink (I assume preloaded) does the flashy thing at 1 second intervals - so the basic board functionality works.

In the IDE there is no serial port.

Looking at System information, I can see the following;

USB2.0-Serial:

Product ID: 0x7523
Vendor ID: 0x1a86
Version: 2.54
Speed: Up to 12 Mb/sec
Location ID: 0xfd130000 / 5
Current Available (mA): 500
Current Required (mA): Unknown (Device has not been configured)

My research says it is a HL-340 which is based on the prolific pl2303 chipset.

I have put in pl2303 drivers (in /system/Library/Extensions - after configuring the .plist to add the vender/device (6790,29987) but still and enormous amount of nothing.

The system log shows

pcscd[644] : Non-smartcard device launched pcscd [Vendor: 0X1A86, Product: 0X7523]
whenever the board gets plugged in.

Questions.

  1. Does a 'real' mega 2560 use the same chipset for the serial port.

  2. Is it possible that the pcscd daemon sees the card but can't configure it (as a smart card) and it does not allow the pl2303 extension to have a go?

I can return the card but after a couple of days on and off trying to get this to work I am starting to get belligerent :slight_smile:

Note: Something good did happen with all my screwing around. My Due still works ok and the uno now actually says 'Arduino Uno' in the IDE for the port - which is good when I am developing for both at once.

I will break out a windows 7 laptop and see if I have better success - if nothing else I can have a look at the MEGA windows.inf and see if any clues are in there.

Stan

Next time, please add a link to your product.

That clone was cheap ! wasn't it ? If you paid more than 14 dollars, you paid to much.
Search on Ebay for : ch340g mega

It uses the CH340 or CH340G or CH341 chip for the usb-serial.
In linux you don't have to do anything, it works right away.
For Windows 7, you need a driver from http://www.wch-ic.com
The zip file or the exe file.
http://www.wch-ic.com/download/list.asp?id=127

For the mac, you have bad luck.
Perhaps this driver is compatible with the CH340: http://casbi.nl/

The official Arduino Mega 2560 needs drivers that are included in the download of the Arduino software.
The CH340G chip is no where near the official Arduino usb-serial chips. I have seen them only in the last few weeks and bought a board with it myself.

Thanks for the hint - after careful examination it is a ch340G

(I would have put a link in but the only one I had was ebay)

At least more is now known!

Stan

More bad luck, I just noticed that the website is asking money for the driver. Without knowing if it will work with the CH340G. I have been searching for other drivers, but didn't find it.

Yes - I am like you - reluctant to toss money at someone without even knowing if it is going to work.

Have downloaded the prolific drivers and added an entry to the plist - however it seems the security daemon launches pcsd daemon when it is detected - and I am having 'issues' with my mac when I try to update the securityd plist (to tell it to "Stop doing that!"

Stan

Okdeki - progress (of sorts).

Installed ide on windows-7 laptop.

Plugged in card and the drivers configured without me having to do anything - downloaded modified blink and all worked perfectly.

Went back to ebay and notice that some of the clone boards are UNO's - with the ch340 chip. They give a link to two sites one of which has OSX drivers - (It is is Russia and I had a little twitchiness.......)

Installed that driver (from: Модуль CH340G. Переходник USB COM TTL (RS232).) and had a port configured.

Still have one issue in that I get the following when I send a sketch to the board - but serious progress is being made.

BTW - as A test I ran the serial monitor - when I type random crud and send it to the Mega clone, I get the serial lights to flash - so basic comms is occurring!

Actually looking at the messages, I think the issue is that because the device name has an imbedded space, AVRdude goes nuts!

The actual device is: /dev/tty.wch ch341 USB=>RS232 fa1240

Stan

Arduino: 1.5.7 (Mac OS X), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Sketch uses 1,518 bytes (0%) of program storage space. Maximum is 258,048 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8,183 bytes for local variables. Maximum is 8,192 bytes.
avrdude: ser_open(): can't open device "/dev/tty.wch": No such file or directory
ioctl("TIOCMGET"): Inappropriate ioctl for device
ioctl("TIOCMGET"): Inappropriate ioctl for device
avrdude: ser_send(): write error: Bad file descriptor

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

OK Confirmed it is the command line executed for AVRdude

Captured a verbose output and modified the AVRdude line and put rabbit ears around the port e.g

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega2560 -cwiring -P"/dev/tty.wch ch341 USB=>RS232 fa1240" -b115200 -D -Uflash:w:/var/folders/g7/cb6lb6l107j81ql0bzjzhjf40000gn/T/build2502707317549238769.tmp/Blink.cpp.hex:i

Downloaded Blink, reset the mega and all is good.

So.........................

Now to see if I can request a change in the IDE to rabbit ears the AVRdude port line if the port contains imbedded spaces.

Stan

Okay, drivers for mac do exist.
I always see www.wch-ic.com for the driver, but now I searched for "ch341ser_mac.zip" and found www.wch.cn
The mac driver is here : http://www.wch.cn/downloads.php?name=pro&proid=178
The version is from wch.cn is a newer, you should try that one.

Hi Peter,

Thanks for your guidance over the weekend which enabled me to get the board up and running.

I have had a look at the source on github and it would be fairly easy to make the change for OSX to encapsulate the device name in double quotes (Rabbit ears) for either all cases or when there is an imbedded space in the device name.

I have raised an issue for this however am contemplating pulling master and making the change on my own system and see if it works - if it does I can investigate feeding the changed module back to github - never done anything with github so a lot of 'learning' required. Also, I am hoping that the OSX project will build in x-code - like I say I havn't done this before!

For the moment however I have a number of workarounds being;

  1. Back out the Russian drivers I loaded yesterday - that will be fun!
  2. Load the drivers you pointed me to - What device did it create on your system BTW?

Another alternative is to make a script up that will rename the device once I have connected and before I load the IDE - don't know if this will work?

Yet another alternative is to make a small shell script up that is specific to the MEGA and points to the existing device and does the AVRDude download.

Finally, on the basis that the card mis-represented itself on ebay is to start a fight and return the card and get a refund of the card and the priority paid postage....... And then get a real mega!

Anyway, once again many thanks for your advice over the weekend.

Stan

In Windows 7 the driver for the CH340G creates : USB-SERIAL CH340 (COM3)
Manufacturer : www.winchiphead.com
and sometimes: Manufacturer : wch.cn
File : 3.30 built by: WinDDK
Name of fysical device: \Device\USBPD0-14

I don't know if you can return the board. Does the description say something with CH340G ?
You bought a very cheap fake/clone board, and that is what you got.

Final Update.

The drivers at http://www.wch.cn/downloads.php?name=pro&proid=178 work well.

In addition some nano's I had ordered arrived and they use the same chipset - the above drivers work with these as well.

FWIW, it appears a lot of the Chinese clone boards are using this chipset for the USB comms - suspect it is a cheap chip.

Also,

I ordered a genuine mega which arrived - and the original seller of the 'dodgy' mega had sent a new board plus a couple of packets of jumper leads to make me happier.

Got to stop this obsession - I now have.....

1 Uno (Genuine)
3 Nano's (as above)
3 Mega's - one real and two clones
1 Due

(and I confess I also have three itsy witsy tiny ones (plug direct into USB and only have a few pins) coming)

Stan

This problem has resurfaced today. I updated the MAC to yosmite os,.... Now the driver above does not work anymore. Anyone with advice??

The website www.wch-ic.com was down, now it is up, but the drivers are still old drivers.
As far as I remember, there were newer Windows drivers, but not newer Mac drivers.

I think you should use linux or Windows. In linux you don't need drivers at all (until they decide to remove it from the kernel because it is almost not used).

I think the CH340G is a good hardware development, but the manufacturer lacks support with good drivers. So I can only conclude one thing: it is a bad product.

It would be better to double the prize and go get en genuine arduino.

Had a problem on OS X Yosemite with CH340G chip. Installed the official driver first - http://www.wch.cn/downloads.php?name=pro&proid=178. This didn't work, so I tried to manually load the installed kext and noticed this error in the console:

20/10/2014 00:43:28.492 com.apple.kextd[19]: ERROR: invalid signature for wch.usb.usb, will not load

After a big of googling found this article - http://www.cindori.org/enabling-trim-on-os-x-yosemite/

Just to summarise. On Yosemite:

  1. install the driver
  2. Run this:
sudo nvram boot-args="kext-dev-mode=1"
  1. Restart

@dmatyukhin

Thanks for your effort. That did the trick.

mafkaan

Thanks dmatyukhin!!!!!! :slight_smile:

That worked for me YAY

stan_w_gifford:
Installed that driver (from: Модуль CH340G. Переходник USB COM TTL (RS232).) and had a port configured.

Thanks Stan
it works for me as well on Win7 64bits

yours
Mat

dmatyukhin:
http://www.wch.cn/downloads.php?name=pro&proid=178.

http://www.cindori.org/enabling-trim-on-os-x-yosemite/

Just to summarise. On Yosemite:

  1. install the driver
  2. Run this:
sudo nvram boot-args="kext-dev-mode=1"
  1. Restart

Well - that works only half way through for me. It's highly instable. Though the current driver significantly improves handling as the name is now without spaces. Need to wait for a more stable driver version, though. Thanks for this summary! :slight_smile:

Drivers are available from the 340 chip manufacturer here:
http://www.wch.cn/downloads.php?name=pro&proid=65

They are also built into Linux.