Is this Mega faulty.

Hi
I am working with 2 Mega 2560s and one has stopped loading sketches.

Symptoms Mega no. 2 has no additions it is just the main board :-
Plug in the USB cable and the previously loaded pin 13 Blink LED starts and runs blinking the on board green led.
Verify different Blink LED sketch with much longer times, OK.
Can’t find Com 4.
In IDE there is no Com 4 available ……..?
Set Com to 1.
Load sketch; very long time, then error message.
avrdude: stk500v2_getsync(): can't communicate with device: resp=0x01
Try Com 3.
Load sketch; very long time, then error message.
avrdude: stk500v2_getsync(): can't communicate with device: resp=0x01

Change over to other Mega 2560; Mega no. 1, using same USB cable and laptop
Com 1, 3, 4 available set com 4.
Verify same sketch as before, load and it runs.
Questions:-
Does this refence to “stk500v2” mean I have some how lost the Bootloader.
OR has this Mega no. 2 developed a fault ?
I am guessing that as the previously loaded sketch boots up and runs that it is not a BootLoader problem ?

Regards
Rob

Rob_Hale:
Hi
I am working with 2 Mega 2560s and one has stopped loading sketches.

Symptoms Mega no. 2 has no additions it is just the main board :-
Plug in the USB cable and the previously loaded pin 13 Blink LED starts and runs blinking the on board green led.
Verify different Blink LED sketch with much longer times, OK.
Can’t find Com 4.

Keep the Mega connected to a USB port and reboot your PC. Look in "Devices and Printers". Your Mega will be shown at the bottom (you may have to scroll down to see it) with the Com port allocated to it. Select that Com port in the IDE.
Some PCs lose track of the Com port when the USB cable is unplugged (from either end) and don't reallocate it properly when it's plugged in again.

Hi Henery_Best
Thanks for your response. I have tried that; also full windows check on the com ports in Device Manager where Mega no. 1 shows as attached. When Mega no. 2 is attached to the USB cable Device Manager comes up a Ardinuo2560 with yellow ! which in Windows usually means problems and the com ports available in Ardinuo IDE are shown Com 1, 3 no com 4.

I can switch between boards 1 and 2 endless and no. 1 always recovers com 4 and no. 2 always loses com 4 and neither can use com 1, or com 3. Board no.1 will only load a sketch on com 4.
Regards
Rob

I think you are not choosing the correct COM port correctly.

When you plug an Arduino into a USB port, a new COM port should appear on the PC. This is the COM port you must select in order to connect to that Arduino.

If the new COM port appears but shows with an error in Windows Device Manager then delete the device, unplug the Arduino and then plug it back in again. It will recreate the COM device.

If you have gone through that sequence and still have problems, come back and describe exactly what you did and what happened as a result.

Hi PetrerH,
Thank you for your interest.
Right:-
Reboot laptop go to Device Manger in Ports (COM & LPT)
It shows:-
Communications Port (Com1)
ECD Printer Port (LPT1)
Plug in Mega 1
And the stack changes to :-
Arduino Mega 2650 ( COM4)
Communications Port (Com1)
ECD Printer Port (LPT1)
Unplug Mega 1
And stack reshuffles back to :-
Communications Port (Com1)
ECD Printer Port (LPT1)
Plug in Mega 2
And the stack shows :-
! Arduino Mega 2650 [the ! is in a yellow blob]
Communications Port (Com1)
ECD Printer Port (LPT1)
Plug in Mega 1
And the stack reshuffles back to :-
Arduino Mega 2650 ( COM4)
Communications Port (Com1)
ECD Printer Port (LPT1)

Round and round Mega 1 always finds com 4.
If I disable the Mega 2 with the yellow ! it comes back with a red X instead of the yellow ! .
Now plug in Mega 1
And the stack reshuffles back to :-
Arduino Mega 2650 ( COM4)
Communications Port (Com1)
ECD Printer Port (LPT1)
The stack reshuffles automatically without using the F 5 refresh.
Reboot with Mega 2 attached and the stack shows a red X .
Pug in Mega 1 now and it finds Com 4. Etc, etc, etc.
Do we have a faulty Mega or have we lost the BootLoad OR ???
Regards
Rob

Plug in Mega2, select the 'faulty' device in Device Manager and delete it. Unplug Mega2 and then plug it back in again.

Hi PeterH,
“Plug in Mega2, select the 'faulty' device in Device Manager and delete it. Unplug Mega2 and then plug it back in again.”

Unplug and the stack goes to :-
Communications Port (Com1)
ECP Printer Port (LPT1)
Plugin Mega 2 and the stack comes back with a red X against the Ardinuo 2560.
Regards
Rob

Can you try the suspect Mega on another PC - and try the suspect one first.

...R

Rob_Hale:
Hi PeterH,
“Plug in Mega2, select the 'faulty' device in Device Manager and delete it. Unplug Mega2 and then plug it back in again.”

Unplug and the stack goes to :-
Communications Port (Com1)
ECP Printer Port (LPT1)
Plugin Mega 2 and the stack comes back with a red X against the Ardinuo 2560.
Regards
Rob

That is not the sequence of actions I suggested.

Hi Robin2,

Thanks for looking in on this.
More on a different PC later. Have to find one that’s idle.

Regards
Rob

Hi PeterH,

I appear to have been unclear in my description of the sequence.

First step :-
“Plug in Mega2, select the 'faulty' device in Device Manager and delete it. Unplug Mega2”.

Done at this point in the sequence Device Manager shows:-

Communications Port (Com1)
ECP Printer Port (LPT1)

Which I have included for full information.

“and then plug it back in again.”

Having plugged back in Mega 2 :-

The Com port stack in Decive Manager has a red X against the Ardinuo 2560.

Regards
Rob

Hi Guys,

The answers is stunning simple.

Disregard what the Tools - Serial ports drop down has in it and stop trying to allocate Com numbers because Tools - Serial ports can only allocate Com numbers to Megas that have their own drivers installed.

EACH MEGA has to have it's own driver. So why Tools - Serial ports show unconnectable Com numbers and allows them to be "Ticked" is a mystery .......

Once you have both Com drivers installed you can have an IDE for each Mega and a USB for each so you control
each Mega separately.

Regards
Rob

Rob_Hale:
Hi Guys,

The answers is stunning simple.

....snip....

Use Linux? :slight_smile:

...R

Rob_Hale:
EACH MEGA has to have it's own driver. So why Tools - Serial ports show unconnectable Com numbers and allows them to be "Ticked" is a mystery .......

I don't follow your explanation. The USB driver for the Arduino is intended to create a virtual serial port when the Arduino is plugged in and running. The IDE just gives you the choice of existing serial ports (it doesn't know or care which ones are Arduino virtual serial ports).

You're right that each IDE can only connect to a single serial port at a time - if you want to communicate with two Arduinos simultaneously you can do that by running two instances of the IDE connected to different serial ports, but I don't see how that relates to your problem of the serial port being disabled in the OS.

Hi PeterH,
What I have found while doing a fresh IDE installation on another Laptop is that having installed Mega 1’s Com diver, using Device Manager it shows as COM 4 in Device Manager.

In Tools – Serial ports the drop down has Com 1, Com3, and Com 4, all three are “Tickable” but only when Com 4 is ticked can I load a sketch……….?

I left Mega 1 plugged in and live and plugged in Mega 2, now in Device Manger there is a second “Ardinuo Mega 2560 showing with the yellow ! ” as well as Mega 1 showing Com 4. So I clicked on the Mega 2 error “Ardinuo Mega 2560 showing with the yellow !” and installed the Com port driver. Now Device Manager shows Ardinuo Mega 2560 Com 4 and Ardinuo Mega 2560 Com 5.

Excellent. Now in Tools – Serial ports there are Com 1, Com 3, Com 4, Com 5. All 4 are tickable but only Com 4 or Com 5 will load sketches and they will only load to Mega 1 with Com 4 ticked, likewise Mega 2 with Com 5 ticked , with 1 or 2 IDE’s running I must use the correct Com port for the Mega I am working on.

With no Megas plugged in Device Manger shows no Ardinuo Mega 2560.

With one Mega plugged in Device Manager shows Ardinuo Mega 2560 with it’s personal Com number with 2 Megas plugged in Device Manager shows both numbers but the numbers don’t swap.

With one Mega plugged in Tools – Serial port shows Com 1, Com 3, and the Com number of the plugged in Mega. With 2 Megas plugged in Tools – Serial ports Com 1, Com 3, Com 4, Com 5, so if you run IDE 1; plug in an Mega pause then go to Tools – Serial port it will show you that Mega’s Com number. The next IDE you load will have both will have both numbers so you tick the new Com number.

The IDE I am using is 1.0.5-r2.

Regards Rob.

I also think that you should try to suspect Mega on another PC.

Hi keithfarrier,

Using the methods above, I now have both Megas working together on 2 different PCs happily.

Regards
Rob

Rob_Hale:
What I have found ...

I wouldn't have expected to need to install the USB device driver explicitly for each Arduino you plug in - once you have installed one device (of that type) it should automatically install any other instances that are connected. However, if you are able to install the device via Device Manager and it works after that, that is all that matters.

Otherwise, the rest of the behaviour you describe regarding COM ports etc is exactly what I would have expected.

Hi PeterH,

Saturday morning here so I have full access to both PCs and I am running them side by side.

In Device Manger – Ports (COM & LPT )
Arduino Mega 2560 (COM 4)
Properties – Details
There is a device Id which for Mega 1 is:-
USB\VID_2341&PID_0010\85332313935351600260
This Id is the same on both PCs. On PC 2 I installed the Mega com drivers in reverse order so it is on ( COM 5) and the Id is the same.

For Mega 2 the Id in Properties – Details :-
USB\VID_2341&PID_0010\85332313935351A072D1

From which I guess these have their own digital signatures to which the Com port driver is tied.

Regards
Rob

Are your two Megas identical? Perhaps one is a Mega ADK or one is an older version?

Even if they are supposed to be identical I wonder if they have some manufacturing difference - different USB stuff. It wouldn't surprise me if the developers/manufacturers didn't care as long as the functionality was the same.

If you had only had one of them this strange situation would never have been noticed (and I don't plan to buy another Mega just to check mine out :))

...R

The USB driver is uniquely identified by the combination of vendor ID and product ID. You'd expect two similar Arduinos to have the same VID and PID, and your data shows that yours do. In that case they should be using the same driver and I don't understand why you needed to install the driver twice. Perhaps Windows event logs would explain what happened when you connected the second Arduino that prevented it from using the driver already installed for the first one.