Rockbox

Tasklist

FS#4753 - H300 USB Bootloader Mode not working properly

Attached to Project: Rockbox
Opened by Rui Marinho (nobelium) - Tuesday, 28 February 2006, 20:17 GMT
Last edited by Nils Wallménius (nls) - Wednesday, 12 November 2008, 14:47 GMT
Task Type Bugs
Category Bootloader
Status Unconfirmed
Assigned To No-one
Operating System Iriver H300 series
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Version 3.1
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

I haven't been able to successfully connect my iriver h340 via USB, using the bootloader USB mode, even after numerous connect/disconnects. Windows XP won't recognize anything. USB Mode works good after booting rockbox.
This task depends upon

Comment by Steve Bavin (pondlife) - Friday, 07 April 2006, 15:58 GMT
I'm seeing the same thing.

I've performed some checks by using a USB monitor program - http://www.hhdsoftware.com/usbmon.html which allows trial runs for free.
Unfortunately this shows nothing happening at all from the PC end when using the bootloader USB mode.

As a comparison, if I boot Rockbox first, the logged data starts with the following:
000001: Get Status Request (DOWN), 07.04.2006 12:59:41.2451792 +142.9856032
Get status from Device. Data length 0x2 bytes (00 00)
000002: Control Transfer (UP), 07.04.2006 12:59:41.2451792 +0.0
Pipe Handle: 0x85a0a9f4
03 00 ..
Setup Packet
80 00 00 00 00 00 02 00€.......
Recipient: Device
Request Type: Standard
Direction: Device->Host
Request: 0x0 (GET_STATUS)
Value: 0x0
Index: 0x0
Length: 0x2
...
(This then succeeds every time.)

I've now tried this on 3 different PCs - two running Windows XP SP2 and one running Windows 2000 SP4 - and all 3 machines give exactly the same results.
In the unlikely case it's relevant, my Iriver firmware is 1.28E.
Comment by James Teh (jteh) - Sunday, 09 April 2006, 14:29 GMT
I have the same problem, although the bootloader USB mode *sometimes* works for me. Unfortunately, I haven't been able to determine any difference in circumstances between the occasions when it works and those when it doesn't.
Comment by Matthias Mohr (aka Massa) (mmohr) - Thursday, 27 April 2006, 16:35 GMT
Strange - USB bootloader (with v5) works perfect for me (H340).

Can anybody give some more details???
Comment by Steve Bavin (pondlife) - Friday, 28 April 2006, 12:10 GMT
Not much to it - method is as follows:
1) H340 is powered off and no charger is connecte.
2) Connect USB cable to USB 2.0 DEVICE port.
3) H340 powers up, displays "Rochbox Bootloader/Version 5/Batt: ?.??V" - then "Bootloader USB mode".
4) PC does not recognise anything happening.
If I boot into the IRiver firmware (1.28E), USB works fine every time.
Comment by Matthias Mohr (aka Massa) (mmohr) - Sunday, 30 April 2006, 09:30 GMT
Sorry, it works perfect here (with Win2000-SP4 and with WinXP-SP1).
Is somebody else able to reproduce this behaviour?
Comment by James Teh (jteh) - Sunday, 30 April 2006, 12:19 GMT
For me, the bootloader USB mode sometimes works and sometimes doesn't. When it doesn't, symptoms and steps to reproduce are exactly the same as above; unfortunately, i haven't been able to determine any difference in circumstances between the failures and the successes. Bootloader v5, firmware 1.29K.
Comment by Peter D'Hoye (petur) - Monday, 01 May 2006, 14:07 GMT
Please add following detail: how are you connecting?
- USB direct on motherboard
- powered hub
- unpowered hub
- usb 1.1 or 2.0

I've seen it do strange things on disconnect when using the hub of a DELL monitor.

It is maybe also related to a setting in retailos about connecting on desktop or hub.
You can also try enabling/disabling usb charging in retailos
Comment by Steve Bavin (pondlife) - Tuesday, 02 May 2006, 07:07 GMT
USB direct to motherboard on 3 different PC with different chipsets. No hubs involved at all. RetailOS works reliably on all 3 machines.
USB Charging in RetailOS was disabled, but enabling it makes no difference to Rockbox. USB Conn Mode in RetailOS was set to Desktop, tried Hub, but no change.
Comment by Rui Marinho (nobelium) - Wednesday, 03 May 2006, 21:35 GMT
I used USB direct to motherboard, on Windows XP SP2, USB 2.0. Sometimes works, sometimes doesn't...any idea on how to debug it locally?
Comment by James Teh (jteh) - Thursday, 04 May 2006, 03:16 GMT
As noted above, the bootloader USB mode occasionally works for me but often fails. I have tried it with USB 2.0 direct to motherboard on several machines running Windows XP SP2 and also tried it with USB 1.1 direct to motherboard on a Linux kernel 2.6.14.3 system. Under Linux, nothing in lsusb -v changed and nothing was reported in the kernel logs.
Comment by Alexander Spyridakis (xaviergr) - Monday, 08 May 2006, 21:16 GMT
I can confirm that I have seen more than 2 H300s not to be able to get recognised by Windows XP (and Ubunutu)(haven't tested other OSes).
It seems that this bootloader bug affects some H300 users. With or without a HUB I get the same results.
There is a whole thread for it in MisticRiver forums.

It would be good to know what Linus has to say about this, since he wrote the Bootloader.
Comment by Peter D'Hoye (petur) - Wednesday, 17 May 2006, 12:35 GMT
There is also another issue, maybe related to this one:

When disconnecting from my dell monitor at work, the h340 stays in usb mode.

This depends on the usb settings of the original firmware (don't remember which one),
so I can solve it that way.
Comment by Fredrik Öhrn (ohrn) - Wednesday, 31 May 2006, 15:07 GMT
For what its worth, on my new computer with a nForce 4 chipset and USB 2.0 ports bootloader USB mode works perfectly every time.
On my old box with a nondescript VIA chipset and USB 1.1 ports it normally doesn't work, but given enough patience and restarts of the player it will work.
When Rockbox is up and running USB mode always works fine with both PCs. Both PCs run Windows XP and I have never touched any USB related settings in Windows.
Comment by Jerome Vizcaino (PlugZ51) - Monday, 05 June 2006, 10:04 GMT
Hi,

I've been experiencing problems with the USB bootloader too.
I'm running a recent Debian Linux, kernel 2.6.16.18. USB is built in and uses USB 2.0.
I own an iRiver H320 with a V5 bootloader and 1.30 EU firmware version.
When Rockbox is loaded, USB works very well.
Here is what's printed in the syslog.

Jun 5 12:00:13 localhost kernel: usb 1-2: new high speed USB device using ehci_hcd and address 24
Jun 5 12:00:14 localhost kernel: usb 1-2: configuration #2 chosen from 1 choice
Jun 5 12:00:14 localhost kernel: scsi24 : SCSI emulation for USB Mass Storage devices
Jun 5 12:00:14 localhost kernel: usb-storage: device found at 24
Jun 5 12:00:14 localhost kernel: usb-storage: waiting for device to settle before scanning
Jun 5 12:00:19 localhost kernel: Vendor: TOSHIBA Model: MK2004GAL Rev: JC10
Jun 5 12:00:19 localhost kernel: Type: Direct-Access ANSI SCSI revision: 00
Jun 5 12:00:19 localhost kernel: SCSI device sdb: 39063024 512-byte hdwr sectors (20000 MB)
Jun 5 12:00:19 localhost kernel: sdb: Write Protect is off
Jun 5 12:00:19 localhost kernel: sdb: Mode Sense: 00 4a 00 00
Jun 5 12:00:19 localhost kernel: sdb: assuming drive cache: write through
Jun 5 12:00:19 localhost kernel: SCSI device sdb: 39063024 512-byte hdwr sectors (20000 MB)
Jun 5 12:00:19 localhost kernel: sdb: Write Protect is off
Jun 5 12:00:19 localhost kernel: sdb: Mode Sense: 00 4a 00 00
Jun 5 12:00:19 localhost kernel: sdb: assuming drive cache: write through
Jun 5 12:00:19 localhost kernel: sdb: sdb1
Jun 5 12:00:19 localhost kernel: sd 24:0:0:0: Attached scsi disk sdb
Jun 5 12:00:19 localhost kernel: usb-storage: device scan complete
Jun 5 12:00:21 localhost kernel: UDF-fs: No VRS found
Jun 5 12:00:21 localhost kernel: UDF-fs: No VRS found
Jun 5 12:00:21 localhost kernel: Unable to identify CD-ROM format.
Jun 5 12:00:21 localhost kernel: Unable to identify CD-ROM format.
Jun 5 12:00:21 localhost kernel: FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!

Then my H300 icon pops up on my KDE desktop and device is mounted perfectly.

Now, when using the USB bootloader (iRiver is off, no prower cable, then USB is plugged in) nothing gets printed.
USB chipset is an ICH5 and works perfectly under Linux.

Hope that helps.

Comment by Adam (voltagex) - Friday, 13 October 2006, 07:36 GMT
I'm getting the same problems as mentioned above,
USB2 (motherboard), XP SP2.
Comment by Adam (voltagex) - Friday, 13 October 2006, 08:15 GMT
Bootloader USB works for me if I select the "Hub" option in the original firmware, and not if "Desktop" is selected.
Comment by Alexander Spyridakis (xaviergr) - Friday, 13 October 2006, 16:09 GMT
I wish that would be the case, but for me it will refuse to work even when in original firmware I select the Hub option.
Also I am not sure how this can have any relation to USB bootloader on rockbox, in any case more people should test these options just to be sure.
Comment by Jerome Vizcaino (PlugZ51) - Saturday, 14 October 2006, 13:41 GMT
I've tried setting up the hub mode instead of desktop mode for USB. USB bootloader still doesn't work.
BTW I'm a bit sceptical about that 'hub mode' trick.... how could the iRiver original mode affect the Rockbox bootloader when there's a power off between the two things ?
Comment by Tobias Langhoff (Spug) - Thursday, 16 November 2006, 21:55 GMT
Same problem here. The USB connection works perfectly in both the iriver firmware and Rockbox, but not in the bootloader. I use GNU/Linux, and nothing is printed in dmesg here either, just like in the above comment by Jerome. Motherboard USB 1.1.
Comment by Víctor Zabalza (vzabalza) - Tuesday, 12 December 2006, 22:43 GMT
It doesn't work at all for me either.

Using a h340 with v5 bootloader on usb2.0 connection (via chipset) to a gentoo box with kernels from 2.6.12ish to 2.6.19.

I've repeatedly checked the kernel logs from time to time and it never shows anything.
Comment by Steve Bavin (pondlife) - Friday, 02 March 2007, 14:10 GMT
The updated H300 bootloader now in SVN resolves this issue for me.
Comment by Alexander Spyridakis (xaviergr) - Friday, 02 March 2007, 15:17 GMT
Yes, the new bootloader fixes this problem for me too.

I will leave this task open until the final bootloader is released and more people would be able to verify it.
Comment by Peter D'Hoye (petur) - Sunday, 27 May 2007, 18:26 GMT
The latest h3x0 bootloader in svn doesn't boot my unit 50% of the time! The last thing it prints it the battery voltage. I get the feeling that disk spins up a bit earlier or later, so it may be related to the fact that I've got an 80GB disk installed (MK8007GAH)
Comment by Steve Bavin (pondlife) - Friday, 17 October 2008, 12:35 GMT
Current SVN bootloader works for my H300+MK8007GAH.

However it fails to boot for petur's H300+MK8007GAH - crash appears to be in thread.c.

I'd guess that the change which broke it is r12514 or r12519 - maybe look at http://svn.rockbox.org/viewvc.cgi/trunk/bootloader/main.c?r1=12513;r2=12519;pathrev=12519

Comment by Matthias Mohr (aka Massa) (mmohr) - Thursday, 24 September 2009, 11:10 GMT
with the SVN bootloader I have another effect which vanishes when using the official v5 one:
It sucks my batteries empty, so it seems the USB loading does not work the same as before...

I noticed this because my batteries are not the best anymore and therefore needs to be loaded more often than before.
I plug in my H340 in my car which actually loads it via USB.
But with the now no longer perfectly working battery it's not able to load it completely - after a while in the car I have to put it out and fully load it with the power supply unit.

When using it with v5 bootloader I need to do it after about one or two weeks "normal" driving (every workday to work an back).
When using it with the SVN bootloader I need to do it after about two days!

BTW, will there ever be a newer released H3x0 bootloader?
Is some developer still working on it?
Comment by Matthias Mohr (aka Massa) (mmohr) - Thursday, 24 September 2009, 11:12 GMT
soirry for my bad English - replace "load" in my above comment with "charge"...
Sorry!
Comment by Steve Bavin (pondlife) - Thursday, 24 September 2009, 11:14 GMT
If I understand correctly, neither the v5 or SVN bootloaders support charging in USB bootloader mode. It may be that the SVN bootloader draws more current (e.g. has the backlight on, or keeps the disk spinning). It would be useful if you could look for visible differences like that and report back.
Comment by Matthias Mohr (aka Massa) (mmohr) - Thursday, 19 November 2009, 11:20 GMT
pondlife: Sorry that I answer so late - I forgot to look at this again (and did not get any mail from flyspray about your answer...)

I'm pretty sure that both v5 and SVN bootloaders do charge my device in USB bootloader mode;
Otherwise my old accu would have been drained empty much earlier...

I'll compile a new SVN bootloader and test the behaviour - especially for disk spinning and backlight
and then I'll report back...
(but it may last at least a week or so)
Comment by Steve Bavin (pondlife) - Thursday, 19 November 2009, 11:25 GMT
IIUC, both bootloaders charge, but at 100mA, not 500mA. With SVN , the backlight is always on and I think the disk stays powered, so there's definitely room for improvement. (Not sure about v5 though!)
Comment by Matthias Mohr (aka Massa) (mmohr) - Thursday, 19 November 2009, 12:19 GMT
Could we make the bootloader charge at 500mA?
And also respect the ""Charge during USB connection" setting (which it IMHO can not do atm.)?
The bootloader can only access NVRAM, correct? So we'd have to add a corresponding NVRAM flag for this?

About backlight and disk: I'll have a look at it (differences between v5 and trunk)!

BTW, does a SVN revision tag for the v5 exist?
Comment by Carlo Castillo (EricDraven) - Tuesday, 06 September 2011, 07:40 GMT
Unsure if anyone has noticed this. Came across this bug while reading the release notes. I own an H340 but have never experienced this. However, I noticed so far from the messages that those who have the European fw 1.29E have this problem, while those with Korean fw 1.29K do not. Looking at my device, I have 1.29K as well. Just mentioning this on the off-chance that it may help.

Loading...