Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hidden Partition error - body not accepted #50

Open
ajja opened this issue Oct 30, 2014 · 1 comment
Open

Hidden Partition error - body not accepted #50

ajja opened this issue Oct 30, 2014 · 1 comment

Comments

@ajja
Copy link

ajja commented Oct 30, 2014

Good afternoon,

Using a Toshiba 16GB pen drive with the controller information detailed below I'm trying to get the hidden partition demo to work. The method I used was as follows:

*Ensure boot mode is in effect

  • DriveCom.exe /drive=E /action=SendExecutable /burner=BN03V104M.bin
    *DriveCom.exe /drive=E /action=GetNumLBAs which returns value 0x1F005C57
    *modify base.c in patch folder to:

//#define FEATURE_CHANGE_PASSWORD

define FEATURE_EXPOSE_HIDDEN_PARTITION

define NUM_LBAS 0x1F005C56 //this needs to be even! (round down)

This is all I've changed in the base.c file. Do I need to switch LBA in elsewhere?

//Get the passed-in LBA
lba = ((unsigned long)(scsi_cdb[2]) << 24) & 0xFF000000;
lba |= ((unsigned long)(scsi_cdb[3]) << 16) & 0xFF0000;
lba |= (scsi_cdb[4] << 8) & 0xFF00;
lba |= scsi_cdb[5];

        //Shift it if necessary
        if (IsHiddenAreaVisible())
        {
            lba += NUM_LBAS / 2;
        }

        //Save it
        scsi_cdb[2] = (lba >> 24) & 0xFF;
        scsi_cdb[3] = (lba >> 16) & 0xFF;
        scsi_cdb[4] = (lba >> 8) & 0xFF;
        scsi_cdb[5] = lba & 0xFF;

        //Let the firmware do its thing <-- like this section ????

Using FW file 2303FW10110.Bin lifted from USB.dev.ru, changed filename to fw.bin I ran build.bat which produced a fw.bin output. When I tried flashing it to the drive I was presented with the following error:

C:\Users\ajones\Documents\Psychson-master\tools>
DriveCom.exe /drive=E /action=SendFirmware /burner=BN03V104M.BIN /firmware=fw.bin
Action specified: SendFirmware
Gathering information...
Reported chip type: 2302
Reported chip ID: 98-3A-A8-92-76-57
Reported firmware version: 1.01.10
Mode: Burner
Rebooting...
Sending firmware...
FATAL: System.InvalidOperationException: Body not accepted
at DriveCom.PhisonDevice.TransferFile(Byte[] data, Byte header, Byte body) in
c:\Users\ajones\Documents\Psychson-master\DriveCom\DriveCom\PhisonDevice.cs:lin
e 282
at DriveCom.Startup._RunFirmware(String fileName) in c:\Users\ajones\Document
s\Psychson-master\DriveCom\DriveCom\Startup.cs:line 427
at DriveCom.Startup._SendFirmware() in c:\Users\ajones\Documents\Psychson-mas
ter\DriveCom\DriveCom\Startup.cs:line 378
at DriveCom.Startup.Main(String[] args) in c:\Users\ajones\Documents\Psychson
-master\DriveCom\DriveCom\Startup.cs:line 114

Any pointers massively appreciated.

@Bonjour123
Copy link

Hello, I know it is a bit late, but I have some questions.
Can you built the bin ? Because I have tons of errors when I launch build bat in patch.
Thnaks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@ajja @Bonjour123 and others