| Details | Message |
|---|
Author Doug Funny Posted 25-Jun-2008 13:28 Toolset ARM |  hid client example Doug Funny Hello, I have bought the Keil development tool for mcb2148 and I'm trying to compile the HID client example that comes with it... However using borland c++ 6 I get lots of error messages. If anyone knows how to solve this please leave me a note. Thanks Doug |
|
Author Tsuneo Chinzei Posted 25-Jun-2008 20:51 Toolset ARM |  RE: hid client example Tsuneo Chinzei I don't want to take the trouble to port the code to another development platform, but if it has much meaning for you, these are the point. - The code is written for MS VC++ with MFC - The code requires HID and SetupDi- header files and library I've heard recent C++ builder supports MFC, but not sure. Ask it on this forum, borland.public.cppbuilder.ms_compatibility http://groups.google.com/group/borland.public.cppbuilder.ms_compatibility/topics
As of HID and SetupDi- header files and library, Officially, these files are included in WinDDK. Free WinDDK (Server 2k3 SP1 DDK) is downloaded from MS "DDK - Windows Driver Development Kit" from MS WHDC http://www.microsoft.com/whdc/DevTools/ddk/default.mspx Find "Download the Windows Server 2003 SP1 DDK [236 MB ISO file]" link OR On the Intel Press site for the book, "USB Design by Example", you'll find an excerpt of HID files from Win2K DDK. :-) FromDDK.zip http://www.intel.com/intelpress/usb/examples/ZipFiles/FromDDK.htm Tsuneo |
|
Author Doug Funny Posted 4-Jul-2008 07:21 Toolset ARM |  RE: hid client example Doug Funny Tsuneo, these are the errors I get... Do you know what could cause this?
D:\WINDDK\3790.1830\inc\mfc42\afxres.rc(152) : error RC2135 : file not found: res\help.cur
D:\WINDDK\3790.1830\inc\mfc42\afxres.rc(171) : error RC2135 : file not found: res\3dcheck.bmp
D:\WINDDK\3790.1830\inc\mfc42\afxres.rc(194) : error RC2135 : file not found: res\minifwnd.bmp
D:\WINDDK\3790.1830\inc\mfc42\afxres.rc(199) : error RC2135 : file not found: res\ntcheck.bmp
D:\WINDDK\3790.1830\inc\mfc42\afxres.rc(200) : error RC2135 : file not found: res\95check.bmp
|
|
Author Per Westermark Posted 4-Jul-2008 11:22 Toolset ARM |  RE: hid client example Per Westermark Now, what could the probable causes be that a compiler fails to find files? Care to take a guess? - That you don't have any files with that name on your hard drive? - That you have the files, but that you haven't instructed the tool to process that specific directory? - That you have the files, but have specified any access rights that forbidds the compiler from accessing them (not too common problem on Win32 machines) So, time for you to start figuring out why you get these error messages, since we can not guess what files you have in your machine or where they are stored or where you have allowed the compiler to search... |
|
Author Doug Funny Posted 4-Jul-2008 12:31 Toolset ARM |  RE: hid client example Doug Funny I have the files on my machine. But I don't know where to include .bmp files. I have tried putting them on the folders that are included on the vc++ directories but that didn't work. |
|
Author Doug Funny Posted 4-Jul-2008 12:45 Toolset ARM |  RE: hid client example Doug Funny I figured it out, the /res folder didn't exist on the mfc so I created it and put the files there. It worked sorry about bugging you guys... and thanks ! |
|
Author Tsuneo Chinzei Posted 4-Jul-2008 18:42 Toolset ARM |  RE: hid client example Tsuneo Chinzei You seem to get into the porting trouble of MFC (Microsoft Foundation Class). I think it is the waste of your valuable time. Rather, split out the example code into building blocks, and ignore the GUI and framework of MFC. The essential blocks for USB handling are, - The SetupDi-APIs are used to specify the device, and to get the device handle. - USB communication is done over this device handle, using File I/O, CreateFile - ReadFile - WriteFile - CloseHandle. These code are stereotype one, and they works either in MSVC or C++ builder without modification, because these code use just the Windows APIs directly. Plug these blocks into the framework and GUI of C++ builder. Blind porting doesn't bring you any understanding of USB handling. Tsuneo |
|
Author Andy Neil Posted 5-Jul-2008 05:37 Toolset None |  RE: Blind porting doesn't bring you any understanding of USB handling Andy Neil I think the same can be said of any example code - not just USB! |
|
Author Doug Funny Posted 8-Jul-2008 14:37 Toolset ARM |  RE: hid client example Doug Funny Tsuneo, I've done just what you told me to. I'm using 64 bytes repots just like you've explained on another post. Still I don't get outreports from my application. What could be the cause of this? Any ideas on what sort of test should I do? |
|
Author Doug Funny Posted 9-Jul-2008 10:29 Toolset ARM |  RE: hid client example Doug Funny I wonder if this specific example doesn't work with vc++ 2008 express edition. Maybe it was compiled with some earlier version of the software, but all I know is that it doesn't work, the closest I've got for the example were linker errors. |
|
Author Tsuneo Chinzei Posted 11-Jul-2008 01:00 Toolset ARM |  RE: hid client example Tsuneo Chinzei "I wonder if this specific example doesn't work with vc++ 2008 express edition." Unfortunately, Express edition doesn't support MFC. Just .Net FrameWork. Tsuneo |
|
Author Andy Neil Posted 5-Jul-2008 05:29 Toolset None |  RE: I've heard recent C++ builder supports MFC Andy Neil My C++ Builder v5 - which is pretty old now - supports MFC... |
|
Author Doug Funny Posted 6-Jul-2008 10:44 Toolset None |  RE: I've heard recent C++ builder supports MFC Doug Funny Ok I'll tell you guys what I have done so far... Since where I work people are experienced with BC++ I have to use the compiler to make my application. With that said what I did was, there's a tool on the BC called "Visual C++ project conversion utility" so I used it on the HID example code from Keil. So I got an application that works fine for HID. But here comes the problem, I followed Tsuneo steps to make 64 bits in and out reports, on the arm everything works fine. I've got a sniffer looking at the packages that were being exchanged and I only get in reports. Out reports dont work with my application. How do I know that? I wrote code on the arm so it would set a led when outreport was received, then I used my sniffer to send out reports and the led was set. |
|
Author Per Westermark Posted 9-Jul-2008 11:02 Toolset None |  RE: I've heard recent C++ builder supports MFC Per Westermark "I wonder if this specific example doesn't work with vc++ 2008 express edition." To my knowledge, the Express edition doesn't have support for MFC. It was at least missing in a previous version of the Express edition that I looked at. |
|
Author Doug Funny Posted 9-Jul-2008 12:14 Toolset None |  RE: I've heard recent C++ builder supports MFC Doug Funny Bummer huh, subscription of the standard version costs something like U$1200. Also I can't get Tsuneo's idea of separating the software into blocks to work on bcb 6 with 64 byte reports, using 8 bit report works fine. |
|
Author Doug Funny Posted 10-Jul-2008 14:14 Toolset None |  RE: I've heard recent C++ builder supports MFC Doug Funny Does anybody know a software to test my win application? Not a sniffer but something that would emulate the hid device? |
|
Author Tsuneo Chinzei Posted 11-Jul-2008 01:16 Toolset None |  RE: I've heard recent C++ builder supports MFC Tsuneo Chinzei "Does anybody know a software to test my win application?" Win application? Do you mean something like HID device emulator? For HID device test, this app will work. On Ms.Axelson's "The HID Page", SimpleHIDWrite http://www.lvr.com/files/SimpleHIDWrite3.zip Tsuneo |
|
Author Tsuneo Chinzei Posted 11-Jul-2008 02:35 Toolset None |  RE: I've heard recent C++ builder supports MFC Tsuneo Chinzei "Also I can't get Tsuneo's idea of separating the software into blocks to work on bcb 6 with 64 byte reports, using 8 bit report works fine." 8 bit report? Isn't it 8 byte report? Anyway, start with the working one. What do you change from the "8 bit" report to 64 byte one, the device side and the host side. Tsuneo |
|
Author Doug Funny Posted 5-Aug-2008 11:53 Toolset None |  RE: I've heard recent C++ builder supports MFC Doug Funny On the device I did exacly what you've said on another thread and on the host I changed the report sizes to 64 bytes. |
|