|
![]() |
|
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. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Register | FAQ | Donate | Forum Rules | ★. iPhone Unlock .★ | -= JTAG BOOM =- | .: Nokia Unlock :. | Search | Today's Posts | Mark Forums Read |
| GSM Programming & Reverse Engineering Here you can post all Kind of GSM Programming and Reverse Engineering tools and Secrets. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) | |
| Insane Poster ![]() ![]() ![]() Join Date: Jun 2004 Location: Glasgow Age: 32
Posts: 82
Member: 69993 Status: Offline Thanks: 4
Thanked 4 Times in 4 Posts
| BB Connect help C++ Hey all I wonder if anyone can help me with this issue. I am trying to connect to a BB and ping some bytes over I am using this code below. Quote:
Send 0x1c bytes to the device (?????) 00 00 00 00 00 00 00 00 00 00 00 00 00 C2 01 00 43 6F 6E 66 69 67 00 00 78 56 34 12 .............Â..Config..xV4. Send 0x1c bytes to the device (?????) 00 00 00 00 00 00 00 00 00 00 00 00 00 C2 01 00 43 6F 6E 66 69 67 00 00 78 56 34 12 .............Â..Config..xV4. Send 0x22 bytes to the device (What i sent some incorrect) 00 00 1A 00 07 FF 00 00 43 61 6C 74 61 73 6B 20 43 6F 6E 66 69 67 00 00 FF FF 00 00 08 00 0A 02 00 01 Is this error because I am using the COM varriable for handle or is it the way I am sending these to the USB? I did the the PID connection method but none of the examples I found would work maybe because I am using a 9300 and its newer guid than the examples listed on here. Thanks in advance Last edited by Lombard; 07-17-2012 at 17:38. | |
|
| | #2 (permalink) | ||
| Freak Poster ![]() ![]() ![]() ![]() Join Date: Jul 2011 Location: Australia/Melbourne
Posts: 100
Member: 1610809 Status: Offline Sonork: 100.1616347 Thanks: 90
Thanked 20 Times in 18 Posts
| try this read bbpin Quote:
Quote:
writefile and readfile corect this if i wrong br | ||
|
| The Following User Says Thank You to GTunlocker For This Useful Post: |
| | #4 (permalink) |
| Insane Poster ![]() ![]() ![]() Join Date: Jun 2004 Location: Glasgow Age: 32
Posts: 82
Member: 69993 Status: Offline Thanks: 4
Thanked 4 Times in 4 Posts
| Guys thanks to much for the replys I will use fwrite from now on just reading up on it on MSDN now. My only other problem is connecting via USB I take it from examples in the forum so far its along the lines of \\?\usb#vid_0fca&pid_8004&mi_00#7&34ebb32b&0&0000# {80375827-83b8-4a51-b39b-905fedd4f118}\MAINMy USB device shows Interface GUID: {893B6A96-0B7F-4D4D-BDB4-BBD4CEEBB31C} Interface Size: 0x68 bytes Interface Version: 0x1 Status: 0xc00000bb Information: 0x0 Device ID: USB\VID_0FCA&PID_8004 So logic would tell me to try However this doesnt work either. Any help appreciated. |
|
| | #5 (permalink) | |
| Product Supporter ![]() ![]() ![]() Join Date: Apr 2002 Location: nckDongle
Posts: 1,965
Member: 11170 Status: Offline Sonork: 1603694 Thanks: 230
Thanked 1,598 Times in 593 Posts
| Quote:
Code:
BOOL GetDevicePath(LPGUID lpGuid, LPTSTR pszDevicePath)
{
HDEVINFO hDevInfoSet;
HANDLE hOut;
SP_DEVICE_INTERFACE_DATA ifdata;
SP_DEVINFO_DATA devInfoElem;
char szDevDesc[256];
DWORD DataType,length;
GUID dvGuid=CLASS_GUID_SMARTCARD;
int nCount;
BOOL bResult;
hDevInfoSet = SetupDiGetClassDevs((LPGUID)&dvGuid,
NULL,
NULL,
DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
if(hDevInfoSet == INVALID_HANDLE_VALUE)
{
return FALSE;
}
nCount = 0;
bResult = TRUE;
while (bResult)
{
ifdata.cbSize=sizeof(ifdata);
bResult = SetupDiEnumDeviceInterfaces(
hDevInfoSet,
NULL,
lpGuid,
(ULONG)nCount,
&ifdata);
if(bResult)
{
hOut = OpenOneDevice (hDevInfoSet, &ifdata, pszDevicePath);
if ( hOut != INVALID_HANDLE_VALUE )
{
CloseHandle(hOut);
::SetupDiDestroyDeviceInfoList(hDevInfoSet);
return TRUE;
}
nCount++;
}
}
::SetupDiDestroyDeviceInfoList(hDevInfoSet);
return FALSE;
} handle created ok? Code:
HANDLE OpenDev(char *devName)
{
HANDLE h;
h = CreateFile(devName,
GENERIC_WRITE | GENERIC_READ,
FILE_SHARE_WRITE | FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
0,
NULL);
return h;
} { do here some } | |
|
| The Following 3 Users Say Thank You to orbita For This Useful Post: |
| | #6 (permalink) |
| Insane Poster ![]() ![]() ![]() Join Date: Jun 2004 Location: Glasgow Age: 32
Posts: 82
Member: 69993 Status: Offline Thanks: 4
Thanked 4 Times in 4 Posts
| Thanks Orbita I amended the createflile to match yours however no luck with the GetDevicePath script. Is there a program that will display this path? maybe an .exe I dont need it to read by the program as its only an app for me to mess around with. So I can just manually enter it. |
|
| | #7 (permalink) | |
| Product Supporter ![]() ![]() ![]() Join Date: Apr 2002 Location: nckDongle
Posts: 1,965
Member: 11170 Status: Offline Sonork: 1603694 Thanks: 230
Thanked 1,598 Times in 593 Posts
| Quote:
I'am posted exe file here in this forum, just search for. It display device path and also detect ondevice_insert and ondevice_remove and display affected device path. | |
|
| The Following User Says Thank You to orbita For This Useful Post: |
| | #8 (permalink) |
| Insane Poster ![]() ![]() ![]() Join Date: Jun 2004 Location: Glasgow Age: 32
Posts: 82
Member: 69993 Status: Offline Thanks: 4
Thanked 4 Times in 4 Posts
| My friend good work with the .exe very good took me a second to work out you need to enter the GUID Here is link for others Simple exe for detect device by guid and know his path Now I get log GUID:{80375827-83B8-4A51-B39B-905FEDD4F118} Device detected: BlackBerry Smartphone Path: \\?\usb#vid_0fca&pid_8004&mi_00#6&9f8cd&0&0000#{80 375827-83b8-4a51-b39b-905fedd4f118}\ So i try this char *portName = "\\?\usb#vid_0fca&pid_8004&mi_00#6&9f8cd&0&0000#{8 0375827-83b8-4a51-b39b-905fedd4f118}"; HANDLE h; h = CreateFile(portName, GENERIC_WRITE | GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); if (h == INVALID_HANDLE_VALUE) { fprintf(stderr, "Failed to open port %s\n", portName); system ("pause"); exit(EXIT_FAILURE); } else printf("Opened port %s\n", portName); Still no connect otherwise I notice the \ at the end this wont compile. Do I need to add the \ afterwards i.e portName+"\" This is my first mess around with this language really just moved from php so sorry if my questions are dumb. |
|
| | #9 (permalink) |
| Product Supporter ![]() ![]() ![]() Join Date: Apr 2002 Location: nckDongle
Posts: 1,965
Member: 11170 Status: Offline Sonork: 1603694 Thanks: 230
Thanked 1,598 Times in 593 Posts
| Blackberry need in this way path+"\MAIN" Once you have valid handle must work. See also if some blackberry software not keep buzy your port. |
|
| | #10 (permalink) |
| Insane Poster ![]() ![]() ![]() Join Date: Jun 2004 Location: Glasgow Age: 32
Posts: 82
Member: 69993 Status: Offline Thanks: 4
Thanked 4 Times in 4 Posts
| Cheers was thinking that done so much messing tonight might have blocked ports. I will try a reboot I notice from my out put log Failed to open port \?usb#vid_0fca&pid_8004&mi_00#6&9f8cd&0&0000#{8037 5827-83b8- 4a51-b39b-905fedd4f118>MAIN Press any key to continue . . . is the >main correct as I entered /main but output is different? Think this could be my problem now. p.s your patience has been appreciated. |
|
| | #11 (permalink) | |
| Product Supporter ![]() ![]() ![]() Join Date: Apr 2002 Location: nckDongle
Posts: 1,965
Member: 11170 Status: Offline Sonork: 1603694 Thanks: 230
Thanked 1,598 Times in 593 Posts
| Quote:
Try with Borland C++ it's more friendly with beginners and allow more easy to understand C++. "//MAIN" Try in this way. | |
|
| | #12 (permalink) |
| Product Supporter ![]() ![]() ![]() Join Date: Apr 2002 Location: nckDongle
Posts: 1,965
Member: 11170 Status: Offline Sonork: 1603694 Thanks: 230
Thanked 1,598 Times in 593 Posts
| Just hint here. Try with Borland C++ it's more friendly with beginners and allow more easy to understand C++. "//MAIN" Try in this way. \?usb here also not corect. |
|
| | #13 (permalink) |
| Product Supporter ![]() ![]() ![]() Join Date: Apr 2002 Location: nckDongle
Posts: 1,965
Member: 11170 Status: Offline Sonork: 1603694 Thanks: 230
Thanked 1,598 Times in 593 Posts
| sorry maked mistake. need double each / so will be "\\MAIN" and "\\\\?usb" Seems forum bug, instead of edit make new post . Last edited by orbita; 07-17-2012 at 23:50. |
|
| | #14 (permalink) | |
| Insane Poster ![]() ![]() ![]() Join Date: Jun 2004 Location: Glasgow Age: 32
Posts: 82
Member: 69993 Status: Offline Thanks: 4
Thanked 4 Times in 4 Posts
| Thanks but still no joy I will give Borland a go just getting used to VS 2010 Pro though wasnt cheap :-( My last error log Failed to open port \?usb#vid_0fca&pid_8004&mi_00#6&9f8cd&0&0000#{8037 5827-83b8-4a51-b39b-905fedd4f118}\MAIN Press any key to continue . . . For others please compile and test with a Blackberry phone using the link provided for Orbitas GUID path locating tool. Would be interested to see if it works for anyone else. Quote:
| |
|
| | #15 (permalink) |
| Product Supporter ![]() ![]() ![]() Join Date: Apr 2002 Location: nckDongle
Posts: 1,965
Member: 11170 Status: Offline Sonork: 1603694 Thanks: 230
Thanked 1,598 Times in 593 Posts
| char *portName = "\\\\?\\usb#vid_0fca&pid_8004&mi_00#6&9f8cd&0&0000 #{80375827-83b8-4a51-b39b-905fedd4f118}\\MAIN"; In this way will be corect. Last edited by orbita; 07-18-2012 at 00:13. |
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| thread | Thread Starter | Forum | Replies | Last Post |
| my 8810 is phone locked ,can somebody please help | duyphuc | Nokia Legacy Phones ( DCT-1 , DCT-2 , DCT-3 , DCT-L ) | 16 | 02-01-2012 05:18 |
| HELP!!! BACKGROUND SCREEN LOGO | Michael Go | Nokia Legacy Phones ( DCT-1 , DCT-2 , DCT-3 , DCT-L ) | 6 | 12-25-2011 23:56 |
| Eeprom dump lost, help needed. | CAMILO | Nokia Legacy Phones ( DCT-1 , DCT-2 , DCT-3 , DCT-L ) | 6 | 11-29-2010 18:04 |
| Help with 6110 | paulomt1 | Nokia Legacy Phones ( DCT-1 , DCT-2 , DCT-3 , DCT-L ) | 3 | 05-25-2009 16:29 |
| Winlock 1.10 - Help | rdmfs | Nokia Legacy Phones ( DCT-1 , DCT-2 , DCT-3 , DCT-L ) | 3 | 06-25-1999 08:21 |