USB communications


i build an device USB based on pic18F4550 in bulk mode, and work fine under windows XP…

now i need use this device under qnx,

how can send an receive data from the microcontroller in qnx?

I have no idea wat a pic18f4550, but it sounds like you will have two write your own USB driver. Check the USB DDK.

the pic18f4550 its a microcontroller (Microchip) with USB communication module.The module supports both low-speed and full-speed communication for all supported
data transfer types

Ok then, it depends on what type of device you implement. If the device will implement some standard USB protocol like printer, human interface, IDE etc, then you may be able to use the already existing driver. However if you plan on building a custom protocol (or an unsupported one) you will have to write the driver yourself.


If you plug in this USB device to your QNX machine and enter the command ‘usb -vvv’ is your device found by QNX?

More importantly, under the ‘class’ report, is it a HID device or something else. If it’s a HID device you can use the existing HID driver and it will make your life a lot easier. If not, you have to do as Mario said and download the usb DDK which has examples of drivers for a printer, mouse and keyboard.


QNX found mi device, the command ‘usb -vvv’ return…

Device Address : 2
Upstream Host Controller : 0
Upstream Device Address : 1
Upstream Port : 2
Upstream Port Speed : Full
Vendor : 0x04d8 (VPC)
Product : 0x0011 (VPC PICUSB VC++)
Device Release : r0.01
USB Spec Release : v1.10
Serial Number : N/A
Class : 0x00 (Independant per interface)
Max PacketSize0 : 64
Languages : 0x0409 (English)
Configurations : 1
Configuration : 1
Attributes : 0xc0 (Self-powered)
Max Power : 100 mA
Interfaces : 1
Interface : 0 / 0
Class : 0xff (Vendor-specific)
Subclass : 0xff
Protocol : 0xff

i am using the bulk mode for send and receive data, but i can use the hid mode…
you have an example to send and receive data from a HID device?

It’s not a standard HID device ( as seen by 0xff class), that means you must get the USB DDK, read the manual and then write some code.


Mario is correct, you don’t have a HID device (the class field would say HID).

The DDK has an example of a usb printer which also uses the bulk transfer method. You should be able to take that code and replace the vendor/product values for the printer with your own and be able to talk to the device.

The DDK is available for download on the QNX site (this assumes you have bought a licensed seat and registered it online).


Dear all,

I also have to develop a driver for a USB device, so I downloaded the USB DDK for Windows.
However I had a problem during installation because of the JVM (Java Virtual Machine), which I didn’t manage to fix. Has anyone already solved this?
I’m using Windows XP SP3.

Thanks in advance and sorry, I didn’t know if it’s necessary to open a new thread or not.