gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FW: gnokii-corrupt file download on windows


From: Stitzinger, Thomas
Subject: FW: gnokii-corrupt file download on windows
Date: Fri, 1 Mar 2013 07:45:53 +0000

Hi

First of all my answers to your question:

#1) Well phonebook and SMS functionality is working fine

#2)The driver was installed from the Win7 automatically when I plugged in my phone. It roots an USB port to a COM Port and uses a FBUS (FieldBUS) protocol as far as I can see.  Here is  few information about the driver:
Driver Provider: Prolific

Driver Date:26.07.2012

Driver Version:3.4.36.247

Digital Signer: Microsoft Windows Hardware Compatibility Publisher

 

 

Now I analyzed the problem in more detail. I compared the files (the good one and the corrupted).

The file which was downloaded from the phone with gnokii was slightly different and it was a little bit longer than the good file.

I figured out that all a 0X0A bytes in the file have been shifted to a two byte (0X0D, 0X0A) sequence.

So I  wrote a little C# program which removes the 0X0D data, so I could open the file now.

 

byte[] bytes = File.ReadAllBytes(@"C:\Temp\gnokiiTest\OPEL_Gnokii.jpg");

byte[] bytes_new = new byte[bytes.Length];

 

int count = 0;

for (int i = 0; i < bytes.Length; i++)

{

if (bytes[i] == 0xD && bytes[i + 1] == 0xA)

      {

 

}

      else

      {

            bytes_new[count] = bytes[i];

            count++;

      }

}

File.WriteAllBytes(@"C:\temp\OPEL_Gnokii.jpg", bytes_new);

 

I think the problem is located in the –getfile routine in the gnokii lib.  I can live using that workaround. I think it is  a windows specific issue. I’m not so familiar with the C language, well I was. I try to get the sources compiled on my windows PC and figure out why  it works that way.

I absolutely have no clue about the  linux OS, but this may be a good reason to start and get a linux workstation running.

 

Thanks for your kind support

Thomas

 

 

 

 

 

 

 

 

 

 

_______________________________________________________

 

ASM Assembly Systems GmbH & Co. KG; Registered office: Munich, Germany;
Commercial registry Munich, HRA 92704; General Partner: ASM Assembly
Systems Management GmbH; Managing Directors: Guenter Lauber,
Mike
Moehlheinrich;  Registered office: Munich, Germany;  Commercial registry
Munich, HRB 174601;
ASM AS (V02-INT)

This message contains 1 attachments with an
overall size of
54.84 KB.

 

Attachment: OPEL_Gnokii.jpg
Description: OPEL_Gnokii.jpg


reply via email to

[Prev in Thread] Current Thread [Next in Thread]