Go Down

Topic: my Mega 2560 is a brick ? (Read 2566 times) previous topic - next topic

rasdehya

hI

i bought a clone  Mega2560 REV3 ATmega2560-16AU, pluged with USBto my PC
I run Ubuntu 14.04,  latest arduine 1.6.3
Serial port  on  "ttyUSB1" default)...select Mega2560 card... Prog AVRISP mkII(default)

Here we are... 1st time I plug, 2 red LED lights on ????   Is that NORMAL ?
The troubleshooting says that a green Led should ; if not meens the bootloader is KO.......; am I right ?


Anyway when i try to upload the blink sketch..all i got is this  ( i try allserial ports & things ... reset...)
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

If this is a Hardware probleme, is there a way to configure the MEGA2560 "from scratch"... maybe a link to a step by step tutorial ?
As i could be sure my MEGA is OK and not a F.....g BRICK


SurferTim

On Ubuntu 14.04, the Mega should show up as /dev/ttyACM0.

rasdehya

#2
May 03, 2015, 02:11 am Last Edit: May 03, 2015, 03:54 am by rasdehya
thanks.
I get confused... and i must say that i dont know anything in serial ports
I cant fing the ttyACM but found the ttyUSB0 ( and usb1, usb2 ) 
but on forums i read the last  1.6.3 linked the ttyACM on ttyUSB  ... so i didn't mind more

Is that a problem not having ttyACM0 ? How can i fix
Plus i get an aditional driver that the seller give me  "the CH341SER_LINUX"

anyway i get the serial port in th IDE... is it an evidence that the MEGA is recognize.



ANyone knows what the 2 red led means ? ( one is "ON" status, the other  has the "L" character)

and sorry for my poor english.... french response welcome... ;)

rasdehya

#3
May 03, 2015, 02:13 am Last Edit: May 03, 2015, 04:02 am by rasdehya
it seems a led should blink indicate there is a boot loader....
can i burn the bootloader with usb??
Still not find any /dev/ttyACM*

here is my device 
http://www.ebay.fr/itm/Carte-Mega-2560-R3-compatible-arduino-cable-usb-/181690800983?pt=LH_DefaultDomain_71&hash=item2a4d9d9b57.

do i have some hope ?

SantinoPrice

#4
May 03, 2015, 07:08 pm Last Edit: May 03, 2015, 07:15 pm by SantinoPrice
Do the following and let me know the outcome.

With the board connected to your computer, open a terminal window and type the following command.
Code: [Select]

lsusb

Do the same without the board connected.
Copy the output and paste it here.
Need help troubleshooting problems with your Arduino (Uno, Mega or Pro-mini) have a look at my book on the kindle store.
 Arduino Troubleshooting

rasdehya

#5
May 03, 2015, 08:44 pm Last Edit: May 03, 2015, 09:56 pm by rasdehya
hi
here with the Mega pluged

 ~  $ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 003: ID 0b97:7772 O2 Micro, Inc. OZ776 CCID Smartcard Reader
Bus 007 Device 002: ID 0b97:7761 O2 Micro, Inc. Oz776 1.1 Hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 003: ID 045e:0084 Microsoft Corp. Basic Optical Mouse
Bus 006 Device 002: ID 0e8f:0020 GreenAsia Inc. USB to PS/2 Adapter
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 413c:8137 Dell Computer Corp. Wireless 5520 Voda L Mobile Broadband (3G HSDPA) Minicard Status Port
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 413c:8140 Dell Computer Corp. Wireless 360 Bluetooth
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub



and without

   20:42  remi      0
 ~  $ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 003: ID 0b97:7772 O2 Micro, Inc. OZ776 CCID Smartcard Reader
Bus 007 Device 002: ID 0b97:7761 O2 Micro, Inc. Oz776 1.1 Hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 003: ID 045e:0084 Microsoft Corp. Basic Optical Mouse
Bus 006 Device 002: ID 0e8f:0020 GreenAsia Inc. USB to PS/2 Adapter
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 413c:8137 Dell Computer Corp. Wireless 5520 Voda L Mobile Broadband (3G HSDPA) Minicard Status Port
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 413c:8140 Dell Computer Corp. Wireless 360 Bluetooth
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub



edit : 

I also tried with an additional driver the seller gave me
i have done this methode with the  CH341SER_LINUX driver
i copy the driver  folder in /opt/arduino1.6.3
then
sudo make
sudo make load

after 24h of searching , my diag is the mega have not the bootloader burned or maybe it's outdated....
or maybe you know another driver.

thanks for help

SantinoPrice

#6
May 03, 2015, 09:59 pm Last Edit: May 03, 2015, 10:02 pm by SantinoPrice
Bus 005 Device 002: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
The above shows that the device is being recognized and the correct drivers are installed.

Can you again run the following in a terminal, shortly after connecting the device.

 
Code: [Select]
dmesg

The above should allow us to see what port is being assigned to the device. Please post the last 20, or thereabout, lines. When pasting the output please place it in code containers.

As a side note, if you want to verify the existence of the bootloader you can observe the 'L' led when the board is reset or just being powered up. If the bootloader is correctly installed the led will blink rapidly a few times before the chip proceeds to executing the sketch that is loaded onto the chip (if there is one).
Need help troubleshooting problems with your Arduino (Uno, Mega or Pro-mini) have a look at my book on the kindle store.
 Arduino Troubleshooting

rasdehya

#7
May 03, 2015, 10:15 pm Last Edit: May 03, 2015, 10:25 pm by rasdehya
In IDE   /tools/serialport it seems it's connected to the USB0 ....
plus when i plug the MEGA the ttyUSB0 appears and disappears when unpluged in the /dev
if it helps
####
~  $ ls -al /dev/ttyUSB
ttyUSB0  ttyUSB1  ttyUSB2 
~  $ ls -al /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 mai    3 21:23 /dev/ttyUSB0
####


AS ASKED....huuuu    it s huge file  see the attached file


About the led....
the "ON" and "L" led have always been lighted on without nlinking in any ways
the reset button doesnt do nothing (or seems to do)
tryng uploading sketch always lead to the timeout error

so the fact he doesnt know ttyACM* is it a probleme since i get ttyUSB0 ??

So I was right or no ...bootloader or no bootloader ??


Thanks

SantinoPrice

Not sure why it showing ttyUSB0 in the IDE, but from reading the dmesg output I can tell that the device is being attached to ttyUSB2.

I take it that ttyUSB2 is not an option in the IDE?
Need help troubleshooting problems with your Arduino (Uno, Mega or Pro-mini) have a look at my book on the kindle store.
 Arduino Troubleshooting

rasdehya

Is there a way to see if the bootloader is in the chip??
I think tomorow i,m gona spend my $ and bye an italian one....
this one will be for the case....
tired , i  spend the week end to do .....nothing ....Bad

and what about this ttyACM* and ttyUSB* ..... it seems not clear at all

maybe one last idea people....

else the message from  IDE when uploading

Le croquis utilise 642 octets (0%) de l'espace de stockage de programmes. Le maximum est de 253 952 octets.
Les variables globales utilisent 9 octets (0%) de mémoire dynamique, ce qui laisse 8 183 octets pour les variables locales. Le maximum est de 8 192 octets.
/opt/arduino-1.6.3/hardware/tools/avr/bin/avrdude -C/opt/arduino-1.6.3/hardware/tools/avr/etc/avrdude.conf -v -patmega2560 -cwiring -P/dev/ttyUSB2 -b115200 -D -Uflash:w:/tmp/build3842778376411457692.tmp/sketch_may03a.cpp.hex:i

avrdude: Version 6.0.1, compiled on Mar 30 2015 at 11:53:46
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/opt/arduino-1.6.3/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/home/remi/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB2
         Using Programmer              : wiring
         Overriding Baud Rate          : 115200
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done.  Thank you..




thanks a lot anyway

SantinoPrice

Sadly I am just as confused as you are, i have never spent any extended time using an Arduino with linux.

The fact that the leds did not blink suggest that you do not have the bootloader installed. I missed that question in the previous reply.

What has me stumped is that the IDE is actually using the correct com port (as per the output from the upload). At the moment i think that if you can successfully upload the bootloader the board will work. To confirm this could you try a loopback test. That will confirm whether or not the IDE is in fact able to communicate with the board properly.

To reload the bootloader you will need access to either another Arduino to use as an ISP device or a dedicated USBISP programmer of some sort.

I am terribly sorry if I confused you... as stated above I have extremely limited experience with Linux OSs.
Need help troubleshooting problems with your Arduino (Uno, Mega or Pro-mini) have a look at my book on the kindle store.
 Arduino Troubleshooting

rasdehya

#11
May 04, 2015, 05:07 am Last Edit: May 04, 2015, 05:16 am by rasdehya
hi, and thank you

for the loopback test ...pin TXO connected to RXO...and reset to ground
in the IDE  /tools/monitor serial.... when i write  "echo test" in the top field.. the consol response "echo test"...
THat means it's the bootloader no ?

Ok +1 for the bootloader...
i'had antissipate this  8)  so i  bought an usb avr/isp adapatator + the "10 pin to 6 pin " on e bay for only 3$ ;)  yesterday.

I think a raspberry pi will do the job, No ?? my friend got one..is it an easy way ??
and sorry , is there a way to do it by the USB port and the IDE only... even if your message was quite explicit

maybe i will try  the thing on a win XP machine
I will keep the people informed...

i put the result of the sketch upload with the bridge on RXO &TXO and Reset&GND in attached file

thanks helping
blessings

SantinoPrice

Sadly you cannot use the USB port and IDE only. There is a way to use the Raspberry Pi as an ISP device, however, it requires additional hardware and a modified avrdude program.

When I was just starting out with Arduinos I did, however, use an old PC I had on hand that had a LPC port. With the help of a voltage divider circuit I was able to reprogram the Bootloader on my Uno.

I would recommend waiting for the ISP device you purchased, if you cannot get your hands on another Arduino though.
Need help troubleshooting problems with your Arduino (Uno, Mega or Pro-mini) have a look at my book on the kindle store.
 Arduino Troubleshooting

rasdehya

ok ...  i'm done........thanks to the people helping out there
i'm still waiting for the vendor's answer to a commercial gesture...
+1 for the ISP/AVR usb hardware... but it will take 2 to 3 weeks  of shipping....

I'm so angry... i think i'm gonna bye one at the local shop....but a Arduino Uno...

The loopback test is something that i should have done earlier...  (thanks to you)
It can help lot of people... instead of spending hours testing in the IDE without knowing if your Hardware is recognize or not....

Go Up