FW: gnokii-corrupt file download on windows

"Stitzinger, Thomas" <[email protected]>
Newsgroups gmane.linux.drivers.gnokii
Message-ID <88A4246CBDBAB543B0C16FFCAADC40D4151DAEA6@MCHSV195.siplaceworld.net>
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.

_______________________________________________
gnokii-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/gnokii-users
OPEL_Gnokii.jpg (image/jpeg, 54.8 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.