x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

USD Device detection in WinCE 6.0 Device using MFC

[Frozen]
1 2
Frozen
anurag.kela@gmail.co Page Icon Posted 2012-12-25 5:34 AM
#
Avatar image of anurag.kela@gmail.co
H/PC Newbie

Posts:
24
Location:
India
Status:
Hello everyone,

Can anyone help me how to detect USB Device connected to WinCE 6.0 Device and send the data to the same device??
Please Help me out... Its really urgent..
 Top of the page
C:Amie Page Icon Posted 2012-12-25 10:35 AM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,950
Location:
United Kingdom
Status:
You need to look at the device driver API used by the device, unless it is a standard USB HID or USB Serial device in which case use MSDN to find the correct system calls.
 Top of the page
anurag.kela@gmail.co Page Icon Posted 2013-01-03 10:11 AM
#
Avatar image of anurag.kela@gmail.co
H/PC Newbie

Posts:
24
Location:
India
Status:
Thanks for replying and sorry i was out of town so couldn't reply.
I just want to detect a USB Device. I don't have the drivers of the device and one which i have are not compatible on WinCE platform. I tried the RequestDeviceNotification() but got nothing. I just want the path or name or something about the device so that i can open the port and write or read the data i want. Please suggest me any Functions or system calls so that i can get the info?
 Top of the page
Rich Hawley Page Icon Posted 2013-01-03 10:45 AM
#
Avatar image of Rich Hawley
Global Moderator
H/PC Guru

Posts:
7,188
Location:
USA
Status:
It would help if you would give us the exact model of your CE device....if it only has USB host and not USB client support, I'm afraid you cannot do what you want to do...
 Top of the page
C:Amie Page Icon Posted 2013-01-03 10:45 AM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,950
Location:
United Kingdom
Status:
Unless there is a generic driver, you will have to write one.

What you're asking is akin to saying I want my XBox 360 to be compatible with the contents of every box coming on the "for delivery" conveyor belt at an Amazon warehouse, without opening the package and irrespective of whether the box contains an XBox 360 game, a PS3 game or a Barbie doll.

You still haven't said what the device is/does.

You should be able to get the raw device header information from PnP out of it, but that isn't data.
LPCUSB_DEVICE GetDeviceInfo( 
  USB_HANDLE hDevice  
);
Unless it is a raw serial device you will need to know the correct memory ranges to read data from in order to get information out of it. Without the device driver you have no idea about the format, size, flow control, required buffer rates, acceleration, encoding, whether it is a frame based transport or a stream and whether what you are receiving is data or a protocol instruction.

If it is a simple stream device then see http://msdn.microsoft.com/en-us/library/ms895460.aspx

If you really don't know anything about the i/o then something like http://www.thesycon.de/eng/usbio_ce.shtml may be of use.

This tells you about the API calls required to implement a USB driver under CE: http://msdn.microsoft.com/en-us/library/ms894783.aspx
 Top of the page
anurag.kela@gmail.co Page Icon Posted 2013-01-04 4:57 AM
#
Avatar image of anurag.kela@gmail.co
H/PC Newbie

Posts:
24
Location:
India
Status:
I am using i-Pan7 Trizeps VI CE Device (Keith-Koep Corp)
 Top of the page
C:Amie Page Icon Posted 2013-01-04 9:45 AM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,950
Location:
United Kingdom
Status:
That's the BSP (computer), what are you trying to make it talk TO?
 Top of the page
anurag.kela@gmail.co Page Icon Posted 2013-01-05 5:12 AM
#
Avatar image of anurag.kela@gmail.co
H/PC Newbie

Posts:
24
Location:
India
Status:
Thermal Printer via USB... but i don't have drivers for it for WinCE Platform? And it will take much time to create the drivers for the same as i am a fresher and i have never worked on drivers?
 Top of the page
C:Amie Page Icon Posted 2013-01-05 10:00 AM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,950
Location:
United Kingdom
Status:
If it is a basic text mode printer assuming that you can get it assigned to a COM port, you should be able to use the serial stream stuff above to do it. If it is a GDI printer or uses a line protocol e.g. PCL, you will need a driver.
 Top of the page
anurag.kela@gmail.co Page Icon Posted 2013-01-07 12:32 PM
#
Avatar image of anurag.kela@gmail.co
H/PC Newbie

Posts:
24
Location:
India
Status:
Amie,
I am using FindFirstDevice() function and even the handle is valid but when i try to open the port by the Device Name (From Device Info Structure) I am getting Invalid handle.?
 Top of the page
anurag.kela@gmail.co Page Icon Posted 2013-01-07 12:36 PM
#
Avatar image of anurag.kela@gmail.co
H/PC Newbie

Posts:
24
Location:
India
Status:
I have to set communication via USB only. I have already done the serial port communication.
I want to ask that is there any library like SetupApi.lib for WinCE platform??
Because for my Desktop utility I have used that library and I was able to set Communication via USB. can you please help me with any such libraries or functions?
 Top of the page
C:Amie Page Icon Posted 2013-01-07 12:39 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,950
Location:
United Kingdom
Status:
It's C:Amie, not Amie.

Did you call ActivateDeviceEx before trying to use GetDeviceInformationByDeviceHandle?

http://msdn.microsoft.com/en-us/library/ms898294.aspx
 Top of the page
anurag.kela@gmail.co Page Icon Posted 2013-01-09 12:56 PM
#
Avatar image of anurag.kela@gmail.co
H/PC Newbie

Posts:
24
Location:
India
Status:
Extremely Sorry C:Amie...!!
No i didn't call that function. All this is new to me and i seriously don't know that how should i go?
Please suggest me proper way. I mean Steps to set up the Communication.
 Top of the page
Rich Hawley Page Icon Posted 2013-01-09 1:07 PM
#
Avatar image of Rich Hawley
Global Moderator
H/PC Guru

Posts:
7,188
Location:
USA
Status:
Exactly what model printer is it?
 Top of the page
anurag.kela@gmail.co Page Icon Posted 2013-01-10 4:23 AM
#
Avatar image of anurag.kela@gmail.co
H/PC Newbie

Posts:
24
Location:
India
Status:
It is a Thermal printer....Which has its own Commands.
 Top of the page
1 2
Frozen
Jump to forum:
Seconds to generate: 0.281 - Cached queries : 72 - Executed queries : 9