Rockbox Technical Forums

Rockbox Development => New Ports => Topic started by: skaos on November 23, 2007, 07:46:26 PM

Title: Sandisk Sansa e200 v2
Post by: skaos on November 23, 2007, 07:46:26 PM
Photos of a disassembled e200 v2 is posted on an abi thread:
http://www.anythingbutipod.com/forum/showpost.php?p=186333&postcount=33
Title: Re: Sandisk Sansa e200 v2
Post by: Bagder on November 24, 2007, 05:29:27 AM
The e200 v2 series are new hardware, quite different from the original e200 series. Here's a pic of the v2 PCB:

http://img260.imageshack.us/img260/3448/img7133lc8.jpg

(linked from this abi post: http://www.anythingbutipod.com/forum/showpost.php?p=186333&postcount=18)

There are indications that the SoC is a Telechips one now, but nothing of that kind is really sure at this point.
Title: Re: Sandisk Sansa e200 v2
Post by: linuxstb on November 24, 2007, 07:04:50 AM
It should be possible to identify if it's a Telechips CPU by trying to put the device into "usb boot mode" (similar to "manufacturing mode" on the Portalplayer-based Sansas) and seeing what USB device IDs are presented.

If it's TCC77x based, then it should appear as 0x140e/0xb021, and if it's TCC7801, then it should be 0x140e/0xb011.

I've no idea how to put an E200v2 into usb boot mode - try turning the device off, then attaching to USB whilst pressing different button combinations.  The LCD won't display anything (so you may not notice it is on), but it should appear in your computer as a new USB device.

Obviously, a firmware upgrade file would also be very useful in identifying the hardware.
Title: Re: Sandisk Sansa e200 v2
Post by: skaos on November 24, 2007, 12:07:47 PM
I may have been wrong when I in another thread suggested that the c200v2 was Telechips based. This assumption was based on the same label (20-99-00112-2) on the SoC in the sansa m200 and c200v2, and from the RB wiki it was mentioned that the m200 was using Telechips.  It looks like there are several hardware versions of the m200 so Sandisk may have switched SoC's on the m200 as well.

Some photos of m200 versions:
v4.1: http://www.rockbox.org/twiki/pub/Main/SansaM200Port/m240back.jpg
v3.0: http://medlem.spray.se/trancentral/sansa1.jpg, http://medlem.spray.se/trancentral/sansa2.jpg

On the other hand, if the m200v4.1 and e200v2 uses the same SoC then there are some m200 firmware that someone may want to look at: http://files.zefie.com/PMP/sansa/m200/firmware/
Title: Re: Sandisk Sansa e200 v2
Post by: Bagder on November 24, 2007, 04:48:31 PM
Thanks a lot!

I got the SansaM200_plusA4_1_08 firmware version and had a look. It turned out slightly disturbing...

The firmware file is scrambled/encrypted (of course), but in the header there's plain text mentioning of "AS3525" and I find the coincidence a bit far too unlikely that it would be mentioned like that without being a reference to the AMS chip using that name:

http://www.austriamicrosystems.com/03products/products_detail/AS3525/description_AS3525.htm

So now my theory is that m200 v2, c200 v2 and e200 v2 all have AMS chips inside!
Title: Re: Sandisk Sansa e200 v2
Post by: zychda on November 24, 2007, 10:33:48 PM
I took some more pictures from different angles and sides of the e280 v2
Look at them here:

http://www.esnips.com/web/zychda-Stuff
Title: Re: Sandisk Sansa e200 v2
Post by: Bagder on November 26, 2007, 04:23:54 AM
ARM9TMDMI core 250 MHz and there are companies out there who claim Linux ports to this beast. It seems the Ainol U60 is AS3525-equipped and runs Linux... (no, we haven't found any published sources)

See this: http://automania.newmedia.hk/component/page,shop.product_details/flypage,shop.flypage/product_id,8/option,com_virtuemart/Itemid,26/vmcchk,1/
Title: Re: Sandisk Sansa e200 v2
Post by: rp on November 26, 2007, 09:11:59 AM
I mailed my contact at AMS today, i will keep you informed about the progress.
Title: Re: Sandisk Sansa e200 v2
Post by: gnu on November 26, 2007, 12:59:49 PM
If you need any help/ translations, I'm an Austrian who might be able to help...
Title: Re: Sandisk Sansa e200 v2
Post by: Btwizt on November 26, 2007, 03:45:03 PM
That would have to be done completely on Sandisk's part. IMO sending them teh v1's like that was already above waht is expected..at least to me.
Title: Re: Sandisk Sansa e200 v2
Post by: ponce10 on November 30, 2007, 11:33:34 AM
There is deffinitly a way to switch to USB (MSC) Mode:

1. switch off your Sansa e280v2
2.switch ON the hold button
3.press the |<< button an plug in your USB-cable
4. Keep it pressed  until the Sansa is completly recognized.

Works for shure with Windows Vista and XP!   Grin
Title: Re: Sandisk Sansa e200 v2
Post by: zajacattack on December 02, 2007, 02:32:26 PM
Excellent! I have added this information to the wiki for anyone who wants to use MSC mode on his/her e200v2.
Title: Re: Sandisk Sansa e200 v2
Post by: krazykit on December 02, 2007, 07:13:34 PM
There is deffinitly a way to switch to USB (MSC) Mode:

1. switch off your Sansa e280v2
2.switch ON the hold button
3.press the |<< button an plug in your USB-cable
4. Keep it pressed  until the Sansa is completly recognized.

Works for shure with Windows Vista and XP!   Grin

This actually sounds like you're in Recovery mode (though I don't have a device to test this, it looks rather similar to putting the v1 into Recovery mode).  Can you view and browse your music and other files on your Sansa, or is it a small partition?

Edit: according to Bagder's post here (http://forums.rockbox.org/index.php?topic=13781.msg104614#msg104614), it appears that this is Recovery mode, rather than MSC mode.

Edit 2: Ok, appears not then.  Just wanted to make absolutely sure no incorrect information was being put on the wiki or in the forums.
Title: Re: Sandisk Sansa e200 v2
Post by: philibuster on December 03, 2007, 12:01:13 AM
I tried this, and it's definitely not "recovery mode", as the partition is not 16mb, and has the VIDEO, PICTURES, RECORD, AUDIBLE and MUSIC directories. It also contains RES_INFO.SYS, MTABLE.SYS, SYS_CONF.SYS and version.sdk files. I'm pretty sure this is MSC mode.

For the life of me, I can't get recovery mode to show up. Perhaps it doesn't exist. Strange.
Title: Re: Sandisk Sansa e200 v2
Post by: ponce10 on December 03, 2007, 03:11:33 AM
@ krazykit: it is the MSC-Mode. I see the e280v2 as a drive with 7,6 GB space.
Title: Re: Sandisk Sansa e200 v2
Post by: Btwizt on December 03, 2007, 11:46:55 AM
Recovery mode is , witht eh player turned off. Turn teh hold switch on, then, while plugging in the USB cable, hold the Menu (power on) button until the player shows up as 16mb format.
Title: Re: Sandisk Sansa e200 v2
Post by: josephRAA on December 03, 2007, 11:39:10 PM
I got curious today and decided to open up my v2.  Unfortunately, I have no scanner and the only camera available was my mother's which has very poor macro-focus.  My hands were shaky, but I did the best I could, taking multiple shots of everything that seemed worth noting.  Anywhere text was printed, I took at least one picture.  I also removed stickers from chip-sets so that the text could be read.

I'm uploading as 121mb rar file to rapidshare and rarhost at the moment.  Connection is slow, I'll post links in about a half hour.  Hopefully somebody else will be able to host them somewhere better, or at least whatever ones are most useful.

And yes, I know there are already images of one disassembled, I felt like doing this anyways.

EDIT:  Rapidshare download part1 of 2 >>> http://rapidshare.com/files/74154643/Sansa.part1.rar.html
EDIT:  Rapidshare download part2 of 2 >>> http://rapidshare.com/files/74155847/Sansa.part2.rar.html

EDIT:  Rarhost download(full) >>> http://www.rarhost.com/download-acjjjq.html

Alright, I hope some of you might find something useful in these.
Title: Re: Sandisk Sansa e200 v2
Post by: Cooldown on January 15, 2008, 12:10:38 PM
The latest firmware update for the e200 v2's puts MSC mode back into the sansa's.
Title: Re: Sandisk Sansa e200 v2
Post by: Bagder on February 21, 2008, 02:50:04 AM
A recovery mode is pretty much the last thing we need before someone starts writing the first bootloader embryo to try on this target.

We have info to start that work, but if we manage to put a bootloader on this we need a way to revert back to the original firmware as the bootloader will most likely not work perfectly on the first attempt...
Title: Re: Sandisk Sansa e200 v2
Post by: ohle on February 21, 2008, 05:06:50 AM
So, does anyone have any new ideas for us v2 owners to try to get into recovery mode? I think it's pretty clear by now that if the v2s have one, it's quite a bit different from that of the v1s. I've tried a lot of combinations of buttons while connecting the cable with hold on (and off, too, for that matter) on my recently bought e280v2 without noticing anything. Is it guaranteed that a recovery mode would make itself known immediately (eg by presenting a new partition)? Might it be necessary to check with fdisk -l on every new try, or maybe check for new hidden files on the standard partition?
Title: Re: Sandisk Sansa e200 v2
Post by: Bagder on February 21, 2008, 06:56:02 AM
First, it's quite possible that there is no user-accessible recovery mode.

Then, if there is one it could be triggered by any imaginary means and there's no saying it needs to be anywhere similar to that of the v1.
Title: Re: Sandisk Sansa e200 v2
Post by: Llorean on February 21, 2008, 01:10:32 PM
In fact, it could require the insertion of a hardware dongle attached to the accessory port, that the OF can detect, or some other means that is very, very, very unlikely to be stumbled upon.
Title: Re: Sandisk Sansa e200 v2
Post by: Kakuwinki on February 21, 2008, 08:36:55 PM
Let's say we don't find how to turn the sansa in recovery mode, what could be tried to boot it with something else than the original firmware? Is their somewhere I could read about that? That way I wouldn't need to ask questions that sound stupid and I might help more ;)

Edit: I tried stuff on my sansa an figured that if you press both center and power when it is open, then let go the center, the sansa closes but skips the animation. when i tried to turn it on, it blocked on the starting video. I then repressed power after like 30 seconds and it opened and read "refreshing database". I don't know what it gives us but I find it quite interesting since maybe at the point when nothing was happening, we could trigger recovery mode. I will get on trying combinations right now, but it is long since each time I need to go through each step

edit2: actually, i found that all is needed to do what i just said was to close using the center button and the power button. it takes about 10 seconds. you need to press the center button slightly before the power button. after pressing both, it shuts down and when you start it it opens on the starting video, lasts about 30 seconds then starts and says refreshing database. what is to be tried? BTW, i checked and the version of the firmware stays the same, it is not a way to reset to the original version of the firmware
Title: Re: Sandisk Sansa e200 v2
Post by: rasher on February 28, 2008, 04:22:39 PM
Could someone with a v2 (of any kind) please plug it in and run http://www.chiark.greenend.org.uk/~christi/misc/usbids.exe if on Windows, and lsusb if on Linux and paste the output here?

And if you're feeling really generous fill in the table on http://www.rockbox.org/twiki/bin/view/Main/DeviceDetection

In any or all of msc, mtp and rescue/manufacturer modes if available.

Thank you  :)
Title: Re: Sandisk Sansa e200 v2
Post by: MaxRabbit on February 28, 2008, 07:46:30 PM
Pardon my hasty paint job, but here is my e280 v2:

(http://i5.photobucket.com/albums/y172/eX_kcc/MTPMSC.jpg)

Really hope this can help you get somewhere!
Title: Re: Sandisk Sansa e200 v2
Post by: Mike Gerwitz on February 28, 2008, 08:17:28 PM
Sansa e280v2
Firmware version: 03.01.14A

Below is the output of lsusb:

MSC
$ lsusb -v

Bus 002 Device 073: ID 0781:7423 SanDisk Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0781 SanDisk Corp.
  idProduct          0x7423
  bcdDevice           cb.b4
  iManufacturer           6 SanDisk
  iProduct                7 SanDisk Sansa e280
  iSerial                 8 FD02CE087652B49B0000000000000000
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          9 config1: Mass Storage only
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface             10 ms ifac 1 (SCSI::BULK_ONLY)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)


MTP
$ lsusb -v

Bus 002 Device 075: ID 0781:7422 SanDisk Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0781 SanDisk Corp.
  idProduct          0x7422
  bcdDevice           cb.b4
  iManufacturer           6 SanDisk
  iProduct                7 SanDisk Sansa e280
  iSerial                 8 FD02CE087652B49B0000000000000000
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          9 config1: Mass Storage only
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass         0 (Defined at Interface level)
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface             10 sic ifac 1 (Capture::PIMA)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               4
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)


Let me know if any additional information is needed.
Title: Re: Sandisk Sansa e200 v2
Post by: rasher on February 29, 2008, 04:33:50 AM
Thanks a lot to both of you. Could anyone with a differently sized Sansa confirm that they get the same numbers (0781:7422 and 0781:7423)? This has been the case for all other Sansas so far, but you never know.
Title: Re: Sandisk Sansa e200 v2
Post by: BlueHazzard on February 29, 2008, 09:41:31 AM
hallo,

for the sansa e250v2:
Device: MSC
VID: 0781 PID: 7423
Device: MTP
VID: 0781 PID: 7422

I hope the development for the port will go on.... ;)
Title: Re: Sandisk Sansa e200 v2
Post by: rothead on February 29, 2008, 11:04:13 AM
Hi,

Sansa e260v2
firmware: V03.01.14E

MSC
VID:0781 PID: 7423

MTP
VID:0781 PID: 7422
Title: Re: Sandisk Sansa e200 v2
Post by: peppi on March 01, 2008, 07:57:09 AM
Sansa e280v2
Firmware version: V03.01.14E
Memory: 7806 MB

MSC:
Device: USB-Massenspeichergerõt
VID:0781 PID: 7423


MTP:
Device: Sansa e280
VID:0781 PID: 7422

____
I am missing rockbox so much...
had an ipod using rb before....
sansa is a quite nice device but with a lack of functionality.
tnx for your research and development work!
Title: Re: Sandisk Sansa e200 v2
Post by: rasher on March 01, 2008, 08:08:18 AM
I think it's safe to assume that all e200v2s are 0781:7422 and 0781:7423. No further tests needed.
Title: Re: Sandisk Sansa e200 v2
Post by: broschb on March 08, 2008, 11:07:05 PM
I just got a v2 e250, and would really like to get rockbox going on it.  I hope this is the correct thread to post, I have not done any low level programming, but would be willing to learn, I have done quite a bit of java, c++.  I want to know if anyone can recommend the best way for me to get started and contribute working on/assisting this port.
Title: Re: Sandisk Sansa e200 v2
Post by: Bagder on March 09, 2008, 08:18:08 AM
Quote
I want to know if anyone can recommend the best way for me to get started and contribute working on/assisting this port.

http://www.rockbox.org/wiki/NewPort is the standard way. Of course you should also read up on everything we know about the e200v2 so far.
Title: Re: Sandisk Sansa e200 v2
Post by: brickhouse on March 11, 2008, 09:08:51 PM
So is the  recovery mode still the main issue left with getting code on one of these? I talked with a Sansa support person and asked if the e200v2 had a recovery mode and he said no. So the next logical question I asked is what can I do if I get it in a messed up mode and he explained that I would need to slide the hold switch over and press one of the other buttons(It was a bad connection so I didn't get the last step) to put it in MSC mode and then try updating the firmware. I konw on another post people have gotten these into MSC mode so I didn't ask to have him repeat it. So is the solution to this more so in the update software that is needed to check for updates from sansa and also used to update the e200v2 ?
Title: Re: Sandisk Sansa e200 v2
Post by: newflesh on March 12, 2008, 05:20:31 PM
First of all, I don't know actually anything about embedded system, so please excuse me if end up looking like a caveman trying to figure out a car using his club... anyway, since I'm interested in getting an e200 with RockBox I've geeked out a bit on the available info.

I looked at charts of the chips, and noticed the new one has an on-chip ROM, while the old one lacks this. Then I wanted to figure out what that ROM could do, and in the SDK document linked in the other Sansa V2 thread I found this:

Quote
Boot loader
The integrated Bootloader which is located in the on-chip ROM
supports direct boot from
• NandFlash
• IDE
• serial NorFlash
• SPI master
The boot loader also supports initial firmware programming and
field firmware update by connecting the device via USB
interface. By using a two stage Bootloader concept for the USB
boot loading mode, programming of the firmware code to all kind
of non-volatile memories is supported.

(http://www.streamunlimited.com/downloads/AS352x_SDK6_sw_pb.pdf page 2-6)

So, if we assume that the ROM-code can handle MSC transfers independently of the firmware, and that it has a function to look for the firmware files in the flash, wouldn't that indicate that there's a pretty safe way to unbrick the device if you can make files it accepts?

In any case, kudos to everyone working on RockBox, and unless I manage to track down an e200v1 I'll be ready to risk trying some stuff if there's any code ready if I get a v2 (which most likely is the case, since it seems to be the best player in my price range)
Title: Re: Sandisk Sansa e200 v2
Post by: saratoga on March 12, 2008, 08:20:21 PM
So, if we assume that the ROM-code can handle MSC transfers independently of the firmware, and that it has a function to look for the firmware files in the flash, wouldn't that indicate that there's a pretty safe way to unbrick the device if you can make files it accepts?

But how do you get into that mode?  If you write a bootloader with the correct header, the ROM is going to think the firmware is ok and then switch control over to it.  If your firmware then doesn't work properly, how will you get back to the ROM's USB mode?  
Title: Re: Sandisk Sansa e200 v2
Post by: newflesh on March 12, 2008, 09:06:12 PM
Maybe there's some key combo that instructs the embedded code to run the install/update feature? Maybe starting with the MSC command does that... it sounds possible with brickhouse's support response.

Is there a bootloader in the firmware bins available? Could it be possible Sandisk decided to only use the bootloader on the ROM, and that the installer checks root for a bin before loading the installed firmware?
Title: Re: Sandisk Sansa e200 v2
Post by: pgs on March 15, 2008, 10:11:22 AM

But how do you get into that mode?  If you write a bootloader with the correct header, the ROM is going to think the firmware is ok and then switch control over to it.  If your firmware then doesn't work properly, how will you get back to the ROM's USB mode?  


I could imagine that, if they did it properly, it could work, from boot ROM, like this:

reset:
start:

if(standalone) run_firmware
else /* following occurs in msc mode */
  while(msc_mode) do_msc_stuff
  /* out of MSC mode, i.e. USB detach */
  if(new_firmware) update_firmware
  udpate_db /*maybe in else clause? or maybe update_db.run_firmware */
  reset
 
Since this would be in the internal ROM, it will always work.
If the firmware fails, it could be possible to attach the thing to a PC, start in MSC mode, and replace the firmware.
Of course, _if_ they did this way.

The update db thing is a bit unclear, running it in boot ROM makes no sense, on the other hand, somewhere it should go...

Topic change, maybe someone could be interested.

About the "hidden directories", instead of changing the attribute on the device, one option could be to "modify" some FAT "drivers" in order to see the attribute  0x18 as a dir.
There is a quite easy possibility, so use some FAT, fuse based, filesystem, under Linux.
So, I installed "libfat", from: http://sourceforge.net/projects/libfat/ and added the above attribute as directory.
This is pretty straightforward, just edit bits/libfat.h (in the source tree) with:

--- libfat.h.org        2007-05-22 10:04:49.000000000 +0200
+++ libfat.h    2008-03-15 15:03:43.000000000 +0100
@@ -244,10 +244,11 @@
 #define ATTR_SYSTEM 0x4
 #define ATTR_VOLUME_ID 0x8
 #define ATTR_DIRECTORY 0x10
+#define ATTR_HIDDEN_DIRECTORY 0x18
 #define ATTR_ARCHIVE 0x20
 #define ATTR_LONG_NAME ( ATTR_READ_ONLY | ATTR_HIDDEN | ATTR_SYSTEM | ATTR_VOLUME_ID )
 
-#define ATTR_ISDIR(D)  ( ( (D) & ATTR_DIRECTORY ) ==  ATTR_DIRECTORY )
+#define ATTR_ISDIR(D)  ( ( ( (D) & ATTR_DIRECTORY ) ==  ATTR_DIRECTORY ) || ( ( ( (D) & ATTR_HIDDEN_DIRECTORY ) ==  ATTR_HIDDEN_DIRECTORY ) ) )
 
 /* values used by libfat. not correlated with fat file system values */

Configure, compile and mount (read-only), the hidden directory will be visible.

Hope this help.

pgs
Title: Re: Sandisk Sansa e200 v2
Post by: saratoga on March 15, 2008, 11:01:34 PM

I could imagine that, if they did it properly, it could work, from boot ROM, like this:

reset:
start:

if(standalone) run_firmware
else /* following occurs in msc mode */
 Â while(msc_mode) do_msc_stuff
 Â /* out of MSC mode, i.e. USB detach */
 Â if(new_firmware) update_firmware
 Â udpate_db /*maybe in else clause? or maybe update_db.run_firmware */
 Â reset
 
Since this would be in the internal ROM, it will always work.

Yes but if the firmware you flash does not work, none of that will matter since the system will crash as soon as it boots.  This is why you need a way to recover from bad flashes.
Title: Re: Sandisk Sansa e200 v2
Post by: pgs on March 16, 2008, 07:23:09 AM

Yes but if the firmware you flash does not work, none of that will matter since the system will crash as soon as it boots.  This is why you need a way to recover from bad flashes.


There is one assumption that maybe was not clear: the MSC mode is in the ROM (Read Only Memory), not in the flash (or it is in the boot loader of the flash, which can be protected).

So, as soon as the device is attached to a PC, it goes in MSC (if enabled) and this will always work, no matter what firmware it has.

This is similar to the (not so new) BIOS recovery feature of PCs, where, even in case of bad flashing, there is a part of the BIOS untouched, which can boot and reprogram the flash by its own.

If the flashing is gone bad, the device will be anyway able to go in MSC and reprogram the flash, since this mode is non-modifiable.

In other words, the very first boot manager is in ROM and it always has the chance to start the firmware or go into MSC mode, no matter how bad is the firmware, and later re-flash or re-start the firmware.

They _could_ have implemented this way, hopefully they did.

pgs
Title: Re: Sandisk Sansa e200 v2
Post by: saratoga on March 16, 2008, 02:49:44 PM

Yes but if the firmware you flash does not work, none of that will matter since the system will crash as soon as it boots.  This is why you need a way to recover from bad flashes.


There is one assumption that maybe was not clear: the MSC mode is in the ROM (Read Only Memory), not in the flash (or it is in the boot loader of the flash, which can be protected).

So, as soon as the device is attached to a PC, it goes in MSC (if enabled) and this will always work, no matter what firmware it has.

This is similar to the (not so new) BIOS recovery feature of PCs, where, even in case of bad flashing, there is a part of the BIOS untouched, which can boot and reprogram the flash by its own.

If the flashing is gone bad, the device will be anyway able to go in MSC and reprogram the flash, since this mode is non-modifiable.

In other words, the very first boot manager is in ROM and it always has the chance to start the firmware or go into MSC mode, no matter how bad is the firmware, and later re-flash or re-start the firmware.

They _could_ have implemented this way, hopefully they did.

pgs

Has anyone reported being able to get into UMS mode without booting the device?  I don't recall anyone saying so, which is why I tend to think its not possible to do that on the V2 (at least without some sort of hardware modding or unknown recovery mode).
Title: Re: Sandisk Sansa e200 v2
Post by: pgs on March 16, 2008, 04:08:26 PM
Has anyone reported being able to get into UMS mode without booting the device?  I don't recall anyone saying so, which is why I tend to think its not possible to do that on the V2 (at least without some sort of hardware modding or unknown recovery mode).

It _could_ be that MSC mode, or UMS mode, is always active _without_ booting the firmware.

How do you know if it is the firmware in flash running or the one in ROM?
You can't, so "booting" does not mean the firmware in flash is running, it just means the device is executing some starting code, but we do not know where this code is coming from.

This is the same as saying: how can you go in recovery mode without booting the firmware?
You can, since you do not boot the firmware, recovery mode happens before, same goes here.
When a key combination is pressed, who is reading the keys? If the firmware does not work, the machine did not boot, how could be the CPU reads the keypad? The CPU executes ROM code, that is it.

It _could_ be that the recovery mode _is_ the MSC mode.
I mean by this, _active_ MSC mode, i.e. MSC mode while connected to a PC. Like any simple mp3 player does.

How can I explain it more clearly?

Let me try again...

The ARM has a ROM, with some boot code. This is the code executed at power up (or reset), this goes in the booting phase. That is, the device always boots. This code is _not_ flashable. This code handle the MSC mode, _before_ the firmware starts.

_If_ they implemented this way, the MSC mode will always be available, it will be always possible to copy a new firmware to the device and, consequently, to update it.

Note that, when in MSC mode, connected to a PC, you cannot play songs or do anything with the device, like the firmware is not active...

Anyway, this are just hypothesis, without a test, there is not much to say more...
This means that, until someone bricks a device and recovers (or not) by MSC, we will never know for sure.

Any volunteers here? :-)

pgs
Title: Re: Sandisk Sansa e200 v2
Post by: fed on March 16, 2008, 08:25:46 PM
Have you tried to ask Sansa if your hypothesis is correct?
Title: Re: Sandisk Sansa e200 v2
Post by: pgs on March 17, 2008, 05:40:08 AM
Have you tried to ask Sansa if your hypothesis is correct?

Well, actually I was deriving the hypothesis from the comments of people asking the "recovery" question to Sandisk.

It seems the answer was always: "do this and that and you'll be in MSC mode", so I came to the conclusion that the device, connected to a PC, in MSC mode, _is_ in recovery mode.

Anyway, I sent an email to the Sandisk support, time ago, with a similar question and I'm still waiting the answer, so...

pgs
Title: Re: Sandisk Sansa e200 v2
Post by: eXomaniac on March 17, 2008, 05:53:34 AM
As is also own a Sansa 280 v2 and want to see Rockbox on it, i would like to know what exactly should be tested / done now to get this port forwards.

Is there any safe way to test this recovery mode ?

One thing i know ( dont know if this actually was told) is that to upgrade the firmware you have to plugin the sansa to you pc so it loads in MSC mode and then the firmware is being upgraded. After this you plug out, and after reboot you see that the player himself is updating and ready for use.

Perhaps it helps to know... as i dont know much about this, for me it sounds logically to use this as a recovery mode / firmware mode.

I want to help, tell me how ;)
Title: Re: Sandisk Sansa e200 v2
Post by: Llorean on March 17, 2008, 12:28:20 PM
The whole point of Recovery Mode is that it's there if you've done something distinctly not safe and need to undo it. So no, there really wouldn't be a safe way of testing it. Even if there was, all it'd confirm is something like "well, there's a recovery mode as long as I don't damage the existing USB mode."
Title: Re: Sandisk Sansa e200 v2
Post by: fed on March 17, 2008, 09:44:25 PM
I asked Sansa and this is what I got:

----------
There is no recovery mode on e280 v.2 player. We can use forced MSC mode instead (to format the device or to update firmware).

For that:

1. Turn off your player and disconnect from the computer.
2. Flip the hold switch located on the top of the player so the orange color marking is showing.
3. Hold down the rewind button (Rewind Key on your Control Wheel), while holding it, connect your player.
4. When your device is recognized by the PC - release the button.
-----------

I am now asking if this will work even if the firmware gets messed up.
Title: Re: Sandisk Sansa e200 v2
Post by: newflesh on March 17, 2008, 10:36:42 PM
If there's only one partition, and the only "protection" of the firmware is the hidden files that show up in forced MSC... wouldn't that make it too easy to brick by someone formatting the player from their system? I'm not sure SanDisk would allow that possibility if there was no means of recovery. Not that I ask anyone to do it, but I'd risk a format to try my hypothesis if I had one. :)

I also noticed the announced Sansa Fuze players, and I'm guessing when someone pulls one apart it will turn out that it has the same guts as the e200 v2. Explains the change of hardware, which otherwise wouldn't have made much sense so soon before it's (supposedly) going out of production due to replacement.
Title: Re: Sandisk Sansa e200 v2
Post by: eXomaniac on March 18, 2008, 05:21:10 AM
mhh i could try to delete the files and then reload a firmware to it...

i just got a new player so perhaps i could take it back ...in worst case
Title: Re: Sandisk Sansa e200 v2
Post by: jesterpb on March 18, 2008, 09:17:19 PM
Hello all,

I noticed this on Sandisk's site today:

Sansa Connect Recovery Tool
http://www.sandisk.com/Retail/Default.aspx?CatID=1532

Would this work to recover the device if one of us tried to flash the v2?

Title: Re: Sandisk Sansa e200 v2
Post by: eXomaniac on March 19, 2008, 04:02:30 AM
For me it sounds good.
Mh i will see if i have time to test this today...

What work is to be done if the reflashing / recovery works?
I mean what else must be done to get Rockbox on it ? Can we use anything from the v1 version ?
Title: Re: Sandisk Sansa e200 v2
Post by: zivan56 on March 19, 2008, 03:22:46 PM
Sansa Connect runs Linux and was not even made by Sandisk (or whoever makes players for Sandisk).
There is nothing that the v1 shares with the v2 in terms of the firmware, except for the basic low level architecture.
Title: Re: Sandisk Sansa e200 v2
Post by: fed on March 19, 2008, 08:56:56 PM
When I asked Sansa :

If my firmware gets corrupted, I can re-update it using MCR mode?

The response was:

We would recommend using forced MSC mode.
Title: Re: Sandisk Sansa e200 v2
Post by: zajacattack on March 19, 2008, 08:59:13 PM
Well, if someone is willing to upload an mi4 that won't work and then see if they can recover...
Title: Re: Sandisk Sansa e200 v2
Post by: zivan56 on March 19, 2008, 11:35:55 PM
The v2 does not even use mi4 files...and the format it does use requires a correct header for it to be accepted in the first place.
Title: Re: Sandisk Sansa e200 v2
Post by: Hillshum on March 20, 2008, 02:18:39 PM
The v2 does not even use mi4 files...and the format it does use requires a correct header for it to be accepted in the first place.
and i don't think we can update the checksum in it yet ???
Title: Re: Sandisk Sansa e200 v2
Post by: zivan56 on March 21, 2008, 12:57:57 AM
Well there is documentation here:
http://daniel.haxx.se/sansa/v2.html
Perhaps someone could follow it and convert junk data into the proper format and upload it to the player to see what happens?  Someone has to do it eventually...
Title: Re: Sandisk Sansa e200 v2
Post by: dan_a on March 21, 2008, 11:15:13 AM
It would be more prudent to change some strings in the original firmware, and recalculate the checksums on that.
At the moment, though, we don't know how to calculate the checksum at 0x14 in the header, nor do we know what the rules are for the 4 byte checksum at the end.
I've not been able to put a modified firmware onto my Clip yet.
Title: Re: Sandisk Sansa e200 v2
Post by: metalaso on August 08, 2008, 11:08:54 AM
i have e280 v2 but exist msc mode and mtp mode because i update my sansa e280v2 and with have msc and mtp mode and autodetect.
Title: Re: Sandisk Sansa e200 v2
Post by: Hillshum on August 08, 2008, 03:39:08 PM
This thread is almost dead. Use the general Sansa v2 thread:http://forums.rockbox.org/index.php?topic=14064.0