View Single Post
Old 02-05-2010, 16:14   #4 (permalink)
.:Mr.Brain:.
Freak Poster
 
.:Mr.Brain:.'s Avatar
 
Join Date: Jul 2009
Posts: 132
Member: 1082040
Status: Offline
Sonork: 100.1583839
Thanks Meter: 47
Quote:
Originally Posted by *Diablo* View Post
hi all.
is it possible edit this loaders ?
and can someone explain process of booting bb5 phones ?
how to phone and get data

procedure TForm1.Button1Click(Sender: TObject);
var
n, i: integer;
buf: string;
DateTime: TDateTime;
strTime: string;
begin
DateTime := Time;
strTime := Timetostr(DateTime);
Button1.Enabled := False;
Memo1.Lines.Add(strTime + ' | ' + 'Init usb communication...');

if BB5_USB_ScanAndOpenConnection('BB5', '*VID_0421*IF_OTH*', false) then
begin

Memo1.Lines.Add(strTime + ' | ' + '++++++++++ Found! ++++++++++');

// Current Phone Mode - start
SendToUSB(#$1B#$00#$10#$15#$00#$06#$00#$06#$00#$02 #$00#$00);

n := ReadUBUSData;
if n < 1 then
begin
Memo1.Lines.Add(strTime + ' | ' + '» Current Phone Mode: null');
end
else
begin
buf := '';
for i := 4 to 5 do
begin
buf := buf + IntToHex(rxBuf[i], 2);
end;
if '0101' = buf then
begin
buf := 'NORMAL';
end;
if '0505' = buf then
begin
buf := 'LOCAL';
end;
if '0404' = buf then
begin
buf := 'TEST';
end;
Memo1.Lines.Add(strTime + ' | ' + '» Current Phone Mode: ' + buf);
end;
// Current Phone Mode - end

// MCU Sw Version - start
SendToUSB(#$1B#$00#$10#$D1#$00#$05#$00#$01#$00#$03 #$00#$01);

n := ReadUBUSData;
if n < 1 then
begin
Memo1.Lines.Add(strTime + ' | ' + '» MCU Sw Version: null');
end
else
begin
buf := '';
for i := 0 to n - 1 do
begin
if rxBuf[i] > $0F then
buf := buf + Chr(rxBuf[i]);
end;
Memo1.Lines.Add(strTime + ' | ' + '» MCU Sw Version: ' + buf);
end;
// MCU Sw Version - end

// IMEI - start
SendToUSB(#$1B#$00#$10#$1B#$00#$09#$00#$04#$00#$00 #$41#$00#$00#$00#$00);

n := ReadUBUSData;
if n < 1 then
begin
Memo1.Lines.Add(strTime + ' | ' + '» IMEI: null');
end
else
begin
buf := '';
for i := 10 to n - 1 do
begin
if rxBuf[i] > $0F then
buf := buf + Chr(rxBuf[i]);
end;
Memo1.Lines.Add(strTime + ' | ' + '» IMEI: ' + buf);
end;
// IMEI - end

// Product code - start
SendToUSB(#$1B#$00#$10#$1B#$00#$06#$00#$05#$00#$0B #$00#$02);

n := ReadUBUSData;
if n < 1 then
begin
Memo1.Lines.Add(strTime + ' | ' + '» Product code: null');
end
else
begin
buf := '';
for i := 9 to n - 1 do
begin
if rxBuf[i] > $0F then
buf := buf + Chr(rxBuf[i]);
end;
Memo1.Lines.Add(strTime + ' | ' + '» Product code: ' + buf);
end;
// Product code - end

Memo1.Lines.Add(strTime + ' | ' + '» Done.');
Memo1.Lines.Add(strTime + ' | ' + '+++++++++++++++++++++++++');
Memo1.Lines.Add('');
end
else
begin
Memo1.Lines.Add(strTime + ' | ' + '++++++++++ Not found! ++++++++++');
Memo1.Lines.Add('');
end;
Button1.Enabled := True;
end;
  Reply With Quote
The Following 4 Users Say Thank You to .:Mr.Brain:. For This Useful Post:
Show/Hide list of the thanked
 
Page generated in 0.09202 seconds with 7 queries