GSM Shop GSM Shop
GSM-Forum  

Welcome to the GSM-Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features.
Only registered members may post questions, contact other members or search our database of over 8 million posts.

Registration is fast, simple and absolutely free so please - Click to REGISTER!

If you have any problems with the registration process or your account login, please contact contact us .

Go Back   GSM-Forum > Other Gsm/Mobile Related Forums > GSM Programming & Reverse Engineering


GSM Programming & Reverse Engineering Here you can post all Kind of GSM Programming and Reverse Engineering tools and Secrets.

Reply
 
LinkBack Thread Tools Display Modes
Old 09-25-2011, 00:06   #106 (permalink)
Freak Poster
 
josedavido's Avatar
 
Join Date: Apr 2005
Location: Inside Vb.Net
Age: 41
Posts: 374
Member: 140822
Status: Offline
Sonork: 100.1594493
Thanks Meter: 1,010

Thanks Mr. Orbita.
I solved the problem in 2 different way's

1. Place a deviceHandle.Dispose() at the end of verification sentence
Quote:
Dim devicePathName As String = find_device()
deviceHandle = CreateFile(devicePathName, GENERIC_READ Or GENERIC_WRITE, FILE_SHARE_READ, IntPtr.Zero, OPEN_EXISTING, _
FILE_ATTRIBUTE_NORMAL, 0)

If deviceHandle.IsInvalid Then
MsgBox("WRONG Connection, invalid answer")
Else
MsgBox("GOOD Connection, OK")
End If

deviceHandle.Dispose()
It releases the connection port for a new verification, so I allwais get Good answer.


2. Just verificate a string on devicepathname

Quote:
If InStr(devicePathName, "{80375827-83b8-4a51-b39b-905fedd4f118}\MAIN") Then
MsgBox("ok, PHONE DETECTED")
Else
MsgBox("wrong answer, Ponoe NOT DETECTED")
End If

I connect 2 diferent devices, and get 2 different paths

\\?\usb#vid_0fca&pid_8004&mi_00#7&34ebb32b&0&0000# {80375827-83b8-4a51-b39b-905fedd4f118}\MAIN <-- fr3ncis Path
\\?\usb#vid_0fca&pid_8004&mi_00#6&2762282f&0&0000# {80375827-83b8-4a51-b39b-905fedd4f118}\MAIN <-- Blackberry 8520
\\?\usb#vid_0fca&pid_0001#5&23991be5&0&1#{80375827-83b8-4a51-b39b-905fedd4f118}\MAIN <-- Blackberry 7290

Now, Connection problem solved...and start studying Send commands, cause still not have luck with Fr3ncis Function:

Quote:
Public Function read_write_str(ByVal devicehandle, ByVal command, ByVal commandlenght) As String
Dim inputReportBuffer(100) As Byte
unManagedBuffer = Marshal.AllocHGlobal(inputReportBuffer.Length)
numberOfBytesRead = 0
numberOfBytesWritten = 0

success = WriteFile _
(devicehandle, _
command, _
commandlenght, _
numberOfBytesWritten, _
IntPtr.Zero)
Thread.Sleep(50)

success = ReadFile _
(devicehandle, _
unManagedBuffer, _
inputReportBuffer.Length, _
numberOfBytesRead, _
unManagedOverlapped)

Marshal.Copy _
(unManagedBuffer, inputReportBuffer, 0, numberOfBytesRead)

ReDim Preserve inputReportBuffer(numberOfBytesRead - 1)

Dim inputReportBuffer_element As Byte

Dim rest As String = ""
Dim n As Integer = 0


For Each inputReportBuffer_element In inputReportBuffer
If n > commandlenght - 1 Then
Select Case inputReportBuffer_element

Case Is < &H20
rest = rest & " "
Case Is = &H20
rest = rest & " "
Case Is > &H20

rest = rest & Chr(Val("&h" & inputReportBuffer_element.ToString("X2")))
End Select
End If
n += 1
Next

Return rest.Trim
End Function
I still don't know how to use it.
thanks for you help.

Last edited by josedavido; 09-25-2011 at 00:14.
  Reply With Quote
The Following 2 Users Say Thank You to josedavido For This Useful Post:
Old 09-25-2011, 13:55   #107 (permalink)
Freak Poster
 
Join Date: Aug 2009
Location: E G Y P T
Age: 26
Posts: 347
Member: 1102520
Status: Offline
Sonork: 100.1617999
Thanks Meter: 94
Quote:
Originally Posted by josedavido View Post
Thanks Mr. Orbita.
I solved the problem in 2 different way's

1. Place a deviceHandle.Dispose() at the end of verification sentence


It releases the connection port for a new verification, so I allwais get Good answer.


2. Just verificate a string on devicepathname




I connect 2 diferent devices, and get 2 different paths

\\?\usb#vid_0fca&pid_8004&mi_00#7&34ebb32b&0&0000# {80375827-83b8-4a51-b39b-905fedd4f118}\MAIN <-- fr3ncis Path
\\?\usb#vid_0fca&pid_8004&mi_00#6&2762282f&0&0000# {80375827-83b8-4a51-b39b-905fedd4f118}\MAIN <-- Blackberry 8520
\\?\usb#vid_0fca&pid_0001#5&23991be5&0&1#{80375827-83b8-4a51-b39b-905fedd4f118}\MAIN <-- Blackberry 7290

Now, Connection problem solved...and start studying Send commands, cause still not have luck with Fr3ncis Function:



I still don't know how to use it.
thanks for you help.
Thanks For your help
It's working
If you knew how to send commands please tell me
Thanks

Last edited by seifhatem; 09-25-2011 at 14:02.
  Reply With Quote
The Following User Says Thank You to seifhatem For This Useful Post:
Old 09-25-2011, 14:06   #108 (permalink)
Freak Poster
 
Join Date: Aug 2009
Location: E G Y P T
Age: 26
Posts: 347
Member: 1102520
Status: Offline
Sonork: 100.1617999
Thanks Meter: 94
what's the command to send to read MEP
here is the code to send the command
Quote:
Dim devicePathName As String = find_device()
deviceHandle = CreateFile(devicePathName, GENERIC_READ Or GENERIC_WRITE, FILE_SHARE_READ, IntPtr.Zero, OPEN_EXISTING, _
FILE_ATTRIBUTE_NORMAL, 0)

If deviceHandle.IsInvalid Then
MsgBox("WRONG Connection, invalid answer")
Else
MsgBox("GOOD Connection, OK")
read_write_str()
End If

deviceHandle.Dispose()
Thanks in Advance
  Reply With Quote
The Following User Says Thank You to seifhatem For This Useful Post:
Old 09-25-2011, 14:07   #109 (permalink)
Product Manager
 
orbita's Avatar
 
Join Date: Apr 2002
Location: nckDongle
Posts: 13,325
Member: 11170
Status: Offline
Sonork: 1603694
Thanks Meter: 6,944
SetupDiGetDeviceRegistryProperty function will help you better instead of compare giud from path.

you can have more info about device with this function.

I'am not have experience with VB but when you send some to blackberry
some times need read port 2..3 times if not will not work corect.
HEX you must convert to string before fill in write buffer.
for example

SendHEX('00 00 10 00 01 FF 00 00 0D 80 5E 5E 05 00 00 00');
GetResponse;

where sendhex is some like this
Code:
Procedure TBlackberryThread.SendHEX(aCmd: String);
Var P: Pchar;
    L: Integer;
    ByteSent: integer;
    aStart: Cardinal;
Begin
  aStart := GetTickCount;
  If aCmd <> '' then begin
    while Pos(' ', aCmd) > 0 do Delete(aCmd,Pos(' ', aCmd),1);
    aCmd:=hextostr(aCmd);
    p:=@aCmd[1]; // pchar
    l:=length(aCmd);
    while l>0 do begin
      if (aStart + Ftimeout) < GetTickCount then raise  exception.Create('Timeout!');
      ByteSent:=SerialWrite(p^,l);
      inc(p,ByteSent);
      dec(l,ByteSent);
    end;
  end;
end;
And ...good luck
  Reply With Quote
The Following User Says Thank You to orbita For This Useful Post:
Old 09-25-2011, 14:41   #110 (permalink)
Freak Poster
 
Join Date: Aug 2009
Location: E G Y P T
Age: 26
Posts: 347
Member: 1102520
Status: Offline
Sonork: 100.1617999
Thanks Meter: 94
i realised that it get a connection error if the device has been connected before running the program so i must disconnect then reconnect for the program to detect.
  Reply With Quote
Old 09-26-2011, 14:14   #111 (permalink)
Freak Poster
 
josedavido's Avatar
 
Join Date: Apr 2005
Location: Inside Vb.Net
Age: 41
Posts: 374
Member: 140822
Status: Offline
Sonork: 100.1594493
Thanks Meter: 1,010


Just connection, NOT SEND COMMANDS

Commands must be sended on HEX, and recived on HEX, then we must to convert to DEC

Hex -->
Hex <--
Convert to DEC --> show in Text


We need help from Mr. Fr3ncis to use his function

Last edited by josedavido; 09-26-2011 at 14:22.
  Reply With Quote
Old 09-26-2011, 15:02   #112 (permalink)
Product Manager
 
orbita's Avatar
 
Join Date: Apr 2002
Location: nckDongle
Posts: 13,325
Member: 11170
Status: Offline
Sonork: 1603694
Thanks Meter: 6,944
Quote:
Originally Posted by josedavido View Post


Just connection, NOT SEND COMMANDS

Commands must be sended on HEX, and recived on HEX, then we must to convert to DEC

Hex -->
Hex <--
Convert to DEC --> show in Text
Why ? You love hex ?
  Reply With Quote
The Following User Says Thank You to orbita For This Useful Post:
Old 09-30-2011, 00:16   #113 (permalink)
Junior Member
 
Join Date: Aug 2006
Posts: 29
Member: 324384
Status: Offline
Thanks Meter: 0
than you for this driver i cant fin it only here @ gsm thank you so much....
  Reply With Quote
Old 09-30-2011, 09:50   #114 (permalink)
No Life Poster
 
darmiles's Avatar
 
Join Date: Sep 2005
Location: Resign
Posts: 525
Member: 177036
Status: Offline
Thanks Meter: 934
Donate money to this user
how can i restart device? in button1
  Reply With Quote
Old 09-30-2011, 22:53   #115 (permalink)
Freak Poster
 
josedavido's Avatar
 
Join Date: Apr 2005
Location: Inside Vb.Net
Age: 41
Posts: 374
Member: 140822
Status: Offline
Sonork: 100.1594493
Thanks Meter: 1,010
Quote:
Originally Posted by darmiles View Post
how can i restart device? in button1

Man, tis is another project. I just use Javaloader to make all this functions work.
right now i am studying USB connection to update my old software.
But still don't know send and recive commands
if you want my software, can download it here: Multiupload.com - upload your files to multiple file hosting sites!


Br,
Josedavido
  Reply With Quote
Old 10-01-2011, 08:24   #116 (permalink)
No Life Poster
 
darmiles's Avatar
 
Join Date: Sep 2005
Location: Resign
Posts: 525
Member: 177036
Status: Offline
Thanks Meter: 934
Donate money to this user
Quote:
Originally Posted by josedavido View Post

Man, tis is another project. I just use Javaloader to make all this functions work.
right now i am studying USB connection to update my old software.
But still don't know send and recive commands
if you want my software, can download it here: Multiupload.com - upload your files to multiple file hosting sites!


Br,
Josedavido
can i have your delphi code ? can u send it to me in private?
  Reply With Quote
Old 10-01-2011, 22:50   #117 (permalink)
Freak Poster
 
josedavido's Avatar
 
Join Date: Apr 2005
Location: Inside Vb.Net
Age: 41
Posts: 374
Member: 140822
Status: Offline
Sonork: 100.1594493
Thanks Meter: 1,010
Quote:
Originally Posted by darmiles View Post
can i have your delphi code ? can u send it to me in private?
I made it on VB2010, i don't know to programm on delphi.
  Reply With Quote
Old 10-19-2011, 01:05   #118 (permalink)
No Life Poster
 
karabey's Avatar
 
Join Date: Nov 2003
Age: 42
Posts: 1,055
Member: 45183
Status: Offline
Thanks Meter: 474
Anybody who can do a Blackberry App that read the IMEI and MEP ?


regards
  Reply With Quote
Old 10-19-2011, 01:06   #119 (permalink)
No Life Poster
 
IAMJASONBOURNE's Avatar
 
Join Date: Nov 2009
Posts: 1,009
Member: 1162191
Status: Offline
Thanks Meter: 281
Impossible. No such API to read the MEP.
  Reply With Quote
Old 10-19-2011, 08:03   #120 (permalink)
Product Manager
 
orbita's Avatar
 
Join Date: Apr 2002
Location: nckDongle
Posts: 13,325
Member: 11170
Status: Offline
Sonork: 1603694
Thanks Meter: 6,944
Quote:
Originally Posted by karabey View Post
Anybody who can do a Blackberry App that read the IMEI and MEP ?


regards
already exist

called engeneering screen and it's part of blackberry firmware.
  Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MEPSERVER - 1ST IN WORLD - BLACKBERRY MEP READER built for MAC users FuriouS TeaM FuriousGold 35 06-09-2010 09:56
ALL BlackBerry Meps Level & HTC qualcomm/Omap code reader ! Professional Services !! MB code Main Sales Section 0 03-03-2010 02:33

 



All times are GMT +1. The time now is 06:56.



Powered by Searchlight © 2024 Axivo Inc.
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
- GSM Hosting Ltd. - 1999-2023 -
Page generated in 0.34790 seconds with 10 queries

SEO by vBSEO