Search This Blog

Feb 20, 2008

Read firmware from player

Now we can read firmware under normal USB connection. It looks work well.

Feb 15, 2008

Read10, Write10, ReadCapacity command support

With my co-worker help, it can do read/write through SCSI command. The original data buffer pointer return from structure member. change it to golbal array, it can write data into u-disk now.

Feb 14, 2008

Python access mass storage class device

use SWIG function. Build C dll which access USB port with DDK support. Python implement SCSI command function. Now can send INQUIRY and READ10 command. Try to add more SCSI command support in future.

Jan 28, 2008

Python call C function with pointer parameter

昨天折腾了一下。 可以传递指针参数了。
1. 在useSwig.i 里面加上
%module useSWIG

%inline %{
extern void add(int size, int *result);
%}

%include carrays.i
%array_functions(int, intp);

2. useSWIG.c
void add(int size, int *result)
{
}

3. runme.py
import useSWIG
a = useSWIG.new_intp(100);
useSWIG.add(100,a)
for i in range(0,100):
r = useSWIG.intp_getitem(a,i);
print r
useSWIG.delete_intp(a);

这样有点麻烦,但是能实现指针的传递。暂时先这么用。

Jan 24, 2008

SWIG call C function

Download the Swig, check the Examples\python\simple. It makes a dll project. Something need notice.
1. VC7 tools->option->projects->VC++ Directories->Excutable files "c:\swigwin"
tools->option->projects->VC++ Directories->Include files "c:\python25\include"
tools->option->projects->VC++ Directories->Library files "c:\python25\libs"
tools->option->projects->VC++ Directories->Library files "c:\python25\lib"

2. example.i customer build step->command line
swig -python "$(InputPath)"

3. project properties C/C++->Advanced->Compile As->Compile as C++ code(/TP)

after that, write simple python file and can call windows functions.

Jan 23, 2008

Play for Sure 1.21 with WMP11

Yesterday we found P4S1.21 win WMP10 can pass the error point, and still on going now. We also check another Nand flash which pass the stress test long time ago, it fail with WMP11 installed. It looks it is relate with WMP version. Oh, what Microsoft doing? It already took our 3 weeks to investigate this problem!

Jan 17, 2008

HY27UT088G2A validation

These are working on HY27UT088G2A MTP stress test fail issue. We have tested 3 pcs Nand flash, all of them are fail on deleting 280 or 281 song file. It looks strange here. Every test will take 70 minutes, it is hard to debug the problem. I try to copy some large files into Nand flash with hidden attribute, the failure will happen within 20 minutes. However, the MTP stress test need at least 128 MB free space, I can not cut down to many space to shorten the test time.