Page 1 of 2

Error when flashing SheevaPlug

Posted: Tue Aug 04, 2009 4:27 pm
by ON1DQD
Hi,

When i try to use command: ./meteoflash.sh mac 00:50:??:??:??:?? i receive an error. (mac address is censurated)
This is what i receive:
root@ubuntu:/home/meteoplug-installer# ./meteoflash.sh mac 00:50:??:??:??:??
openocd logs can be inspected at /var/log/sheeva.log
mac used: 00:50:??:??:??:??
erase uboot environment... done
set u-boot default environment variables... done
set u-boot custom environment variables... done
set u-boot MAC... done
burn u-boot including environment...
Error: flashing u-boot environment via openocd failed

ERRORLOG:
Open On-Chip Debugger 0.2.0-in-development (2009-05-17-10:32) svn:1800M


BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS


$URL: http://svn.berlios.de/svnroot/repos/ope ... /openocd.c $
2000 kHz
dcc downloads are enabled
Error: unable to open ftdi device: device not found
Runtime error, file "command.c", line 453:
root@ubuntu:/home/meteoplug-installer#
Mabe the OS does not recognise my USB chip or SheevaPlug?

Or mabe it has somethin to do with the FTDI chip: http://www.ftdichip.com/Drivers/VCP/Lin ... sio.tar.gz

Do i have to install LinuxHost files that come with the SheevaPlug?
LinuxHost\\Linux Host Filesystem - rootfs.tar.bz2
LinuxHost\\gcc.tar.bz2

Any suggestions?

Re:Error when flashing SheevaPlug

Posted: Tue Aug 04, 2009 6:44 pm
by admin
That error looks like /dev/ttyUSBx devices are not set up by udev as expected. Do as follows...

1) Reboot your Linux PC. When having failed using ocd flashing tool usb serial device cannot be setup correctly again (at least on my PC)

2) Power cycle SheevaPlug, connect SheevaPlug via USB with Linux PC. Make sure the connector on SheevaPlug side is as firmly pressed in as possible, watch out that it does not loosen again. This is very flimsy, clearly a design flaw of SheevaPlug... but you just need it for one time flashing ;-)

3) Make sure ftdi_dio module is loaded. "modprobe ftdi_sio vendor=0x9e88 product=0x9e8f", check with "lsmod".


4) make sure two serial devices appeared on Linux PC. Give "dmesg" command. There should be something like this at the end:

Code: Select all

ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: Detected FT2232C
usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0
ftdi_sio 2-1:1.1: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: Detected FT2232C
usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB1

5) now goto meteoplug-installer directory on Linux PC and give "./meteoflash.sh mac 00:00:00:00:00:00". When it is working fine it will take about 5 minutes, reporting this:

Code: Select all

openocd logs can be inspected at /var/log/sheeva.log
mac used: 00:00:00:00:00:00
erase uboot environment... done
set u-boot default environment variables... done
set u-boot custom environment variables... done
set u-boot MAC... done
burn u-boot including environment... done
FINE

6) If you encounter errors unplug USB cable and try to start with step 2 again.


After a couple of tries it usually runs through without an error.

Re:Error when flashing SheevaPlug

Posted: Tue Aug 04, 2009 8:41 pm
by ON1DQD
Hi,

Still no go:(

ftdi_sio module is loaded.

Code: Select all

[24965.512020] usb 5-1: new full speed USB device using uhci_hcd and address 7
[24965.708187] usb 5-1: configuration #1 chosen from 1 choice
[24965.751627] ftdi_sio 5-1:1.0: FTDI USB Serial Device converter detected
[24965.751683] usb 5-1: Detected FT2232C
[24965.751814] usb 5-1: FTDI USB Serial Device converter now attached to ttyUSB1
[24965.754570] ftdi_sio 5-1:1.1: FTDI USB Serial Device converter detected
[24965.754628] usb 5-1: Detected FT2232C
[24965.754703] usb 5-1: FTDI USB Serial Device converter now attached to ttyUSB2
root@ubuntu:/home/meteoplug-installer# 
Dont understand what is wrong:S

Re:Error when flashing SheevaPlug

Posted: Tue Aug 04, 2009 11:01 pm
by admin
Still the same error messages as before?
They did go away at my rig after a reboot.

Do you have other USB devices connected? USB stick and/or a USb hub, for example?

Re:Error when flashing SheevaPlug

Posted: Tue Aug 04, 2009 11:44 pm
by ON1DQD
Hi,

Still the same error message as before.
No other USB stick or Hub is connected.

But do i have to install a driver for the SheevaPlug?
I a Live Linux distro there is NO driver for the SheevaPlug so i'm geussing you have to install one.

If you do? how do i install this driver can you explain step by step as i'm not a Linux user;)

I do my best to understand but it's not a simple task.

Thanks for any help

Re:Error when flashing SheevaPlug

Posted: Wed Aug 05, 2009 1:19 am
by admin
It is unclear to me, why it does not work with your Sheeva.

You can try the alternative way with tftp described here: http://www.meteohub.de/joomla/index.php ... &Itemid=29

You have to do this in two steps:
1) install a new uboot via tftp
2) set uboot parameters by logging in via console, halting boot process and changing some environment variables.

Re:Error when flashing SheevaPlug

Posted: Wed Aug 05, 2009 2:21 am
by ON1DQD
The option you give is too complicated for me:(

Do i have to install a driver for the SheevaPlug regardless witch Linux distro I use?

Re:Error when flashing SheevaPlug

Posted: Wed Aug 05, 2009 10:34 am
by admin
No, there is no need to install a driver. When your Linux PC does setup /dev/ttyUSBx as reported by your dmesg log, everything is in place as it should be.

I will try to find a Linux live CD that works with meteoplug-installer. My Linux Server (Suse 11.1) does and the ALIX Meteohubs (Debian etch'n'half) do also work as installers.

Did you try rebooting your PC, pulling USB connectors in and out? Having done that a few times always solved problems like you reported on my rig.

Re:Error when flashing SheevaPlug

Posted: Wed Aug 05, 2009 2:15 pm
by admin
When meteoflash starts JTAG connection via USB, the USB-serial connection established at /dev/ttyUSB0 gets disconnected. You can see that in "dmesg"

ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: Detected FT2232C
usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0
ftdi_sio 2-1:1.1: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: Detected FT2232C
usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB1
ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
ftdi_sio 2-1:1.0: device disconnected
usb 2-1: usbfs: interface 1 claimed by ftdi_sio while 'openocd' sets config #1


Do you also have this in dmesg log on your system?

Re:Error when flashing SheevaPlug

Posted: Fri Aug 07, 2009 8:57 pm
by ON1DQD
Hi,

I try Knoppix Live CD and i get the same error!!!
I even can get my keyboard to AZERTY in Knoppixm, Pfff

Quote
root@Microknoppix:/home/meteoplug-installer#
root@Microknoppix:/home/meteoplug-installer# ./meteoflash.sh mac 00:50:43:01:D1:97
openocd logs can be inspected at /var/log/sheeva.log
mac used: 00:50:43:01:D1:97
erase uboot environment... done
set u-boot default environment variables... done
set u-boot custom environment variables... done
set u-boot MAC... done
burn u-boot including environment...
Error: flashing u-boot environment via openocd failed

ERRORLOG:
Open On-Chip Debugger 0.2.0-in-development (2009-05-17-10:32) svn:1800M


BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS


$URL: http://svn.berlios.de/svnroot/repos/ope ... /openocd.c $
2000 kHz
dcc downloads are enabled
Error: unable to open ftdi device: device not found
Runtime error, file "command.c", line 453:
root@Microknoppix:/home/meteoplug-installer#


Quote
[ 22.362103] usbcore: registered new interface driver usbserial
[ 22.362136] USB Serial support registered for generic
[ 22.362202] usbcore: registered new interface driver usbserial_generic
[ 22.362208] usbserial: USB Serial Driver core
[ 22.402835] USB Serial support registered for FTDI USB Serial Device
[ 22.402961] ftdi_sio 5-1:1.0: FTDI USB Serial Device converter detected
[ 22.403025] usb 5-1: Detected FT2232C
[ 22.404111] usb 5-1: FTDI USB Serial Device converter now attached to ttyUSB0
[ 22.404146] ftdi_sio 5-1:1.1: FTDI USB Serial Device converter detected
[ 22.404193] usb 5-1: Detected FT2232C
[ 22.404502] usb 5-1: FTDI USB Serial Device converter now attached to ttyUSB1
[ 22.404531] usbcore: registered new interface driver ftdi_sio
[ 22.404537] ftdi_sio: v1.4.3:USB FTDI Serial Converters Driver
[ 36.001960] lp0: using parport0 (interrupt-driven).
[ 36.001968] lp0: console ready
[ 36.002109] lp1: using parport1 (polling).
[ 36.106616] ppdev: user-space parallel port driver
[ 40.070168] skge eth0: enabling interface
[ 40.824114] NET: Registered protocol family 10
[ 40.824952] lo: Disabled Privacy Extensions
[ 40.825831] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 42.418792] skge eth0: Link is up at 1000 Mbps, full duplex, flow control both
[ 42.419236] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 53.310023] eth0: no IPv6 routers present
root@Microknoppix:/home/meteoplug-installer#

the FTDI is available if i look with dmesg.

Re:Error when flashing SheevaPlug

Posted: Sat Aug 08, 2009 12:04 am
by ON1DQD
I don't understand why it's not working.:angry:

Today i try Knoppix Live CD and i received the same error.:(

The FTDI is detected just fine.
[ 22.362202] usbcore: registered new interface driver usbserial_generic
[ 22.362208] usbserial: USB Serial Driver core
[ 22.402835] USB Serial support registered for FTDI USB Serial Device
[ 22.402961] ftdi_sio 5-1:1.0: FTDI USB Serial Device converter detected
[ 22.403025] usb 5-1: Detected FT2232C
[ 22.404111] usb 5-1: FTDI USB Serial Device converter now attached to ttyUSB0
[ 22.404146] ftdi_sio 5-1:1.1: FTDI USB Serial Device converter detected
[ 22.404193] usb 5-1: Detected FT2232C
[ 22.404502] usb 5-1: FTDI USB Serial Device converter now attached to ttyUSB1
[ 22.404531] usbcore: registered new interface driver ftdi_sio
[ 22.404537] ftdi_sio: v1.4.3:USB FTDI Serial Converters Driver
Is there any possibility that we can flash the SheevaPlug under a Windows Environment?

It's not so easy to use a Live Linux distrubution with ROOT preveledges for a Linux beginer, commands like SUDO you can get ROOT preveleges.

It's not simple for a beginner.

I hope we wil find an easyer way to flash that thing;)

Re:Error when flashing SheevaPlug

Posted: Sat Aug 08, 2009 1:33 pm
by ON1DQD
i dont now where to look for the dmesg log on the system.
where can i find it?

Re:Error when flashing SheevaPlug

Posted: Sat Aug 08, 2009 7:50 pm
by ON1DQD
Hi,

I cant see my postings if i reply to this topic, do you have some forum problems?

It only appears to be on Page 2.

Page 1 & 3 are working fine for reading but if you try to write you only get a small box where you can write in.
After writing and push submit all looks normal.

Please let me now.

Re:Error when flashing SheevaPlug

Posted: Sat Aug 08, 2009 7:57 pm
by ON1DQD
Hi me again,

I just tried to flash the SHeevaPlug on another system with Intel CPU and chipset instead of AMD cpu with VIA chipset.
I always receive the same error:
root@ubuntu:/home/meteoplug-installer# ./meteoflash.sh read
openocd logs can be inspected at /var/log/sheeva.log
read u-boot environment (will take up to 30 minutes)...
Error: reading u-boot environment via openocd failed

ERRORLOG:
Open On-Chip Debugger 0.2.0-in-development (2009-05-17-10:32) svn:1800M


BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS


$URL: http://svn.berlios.de/svnroot/repos/ope ... /openocd.c $
2000 kHz
dcc downloads are enabled
Error: unable to open ftdi device: device not found
Runtime error, file "command.c", line 453:
root@ubuntu:/home/meteoplug-installer#


With lsmod i see:

root@ubuntu:/home/meteoplug-installer# lsmod
Module Size Used by
ftdi_sio 56968 0
binfmt_misc 16776 1
The FTDI is detected:

Code: Select all

[ 1381.776370] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[ 1381.776396] ftdi_sio 5-2:1.0: device disconnected
[ 1381.776663] ftdi_sio ttyUSB1: FTDI USB Serial Device converter now disconnected from ttyUSB1
[ 1381.776690] ftdi_sio 5-2:1.1: device disconnected
[ 1384.364027] usb 5-2: new full speed USB device using uhci_hcd and address 3
[ 1384.555279] usb 5-2: configuration #1 chosen from 1 choice
[ 1384.564983] ftdi_sio 5-2:1.0: FTDI USB Serial Device converter detected
[ 1384.565030] usb 5-2: Detected FT2232C
[ 1384.565117] usb 5-2: FTDI USB Serial Device converter now attached to ttyUSB0
[ 1384.571744] ftdi_sio 5-2:1.1: FTDI USB Serial Device converter detected
[ 1384.571786] usb 5-2: Detected FT2232C
[ 1384.571844] usb 5-2: FTDI USB Serial Device converter now attached to ttyUSB1
root@ubuntu:/home/meteoplug-installer# 
[/b]

Is this bizzar or what? :(

Re:Error when flashing SheevaPlug

Posted: Sat Aug 08, 2009 10:20 pm
by ON1DQD
Hi,

Haw can i force MeteoPlug flash using ttyUSB1 instead of ttyUSB0 ?

Mabe i found something? B)