Author Topic: need help for a small USB project  (Read 4996 times)

hadel

  • Member
  • ***
  • Posts: 1
need help for a small USB project
« on: May 20, 2015, 09:18:39 pm »
Hi All,

I have a simple project where originally the PC is connected to a device (Bluetooth dongle) which is currently working fine but the project is to put an electronic board (like Raspberry PI 2 Model- this board has 4 USB ports) between the PC and the bluetooth dongle in order to do some changes to the data packets send between them. As shown in figure 1 and figure 2 respectively in the attachment desgin-V1-1.
My questions are:
 1- should the Raspberry board be used as A- USB hub or B- as device on the PC connection and host on the BT dongle connection. as shown in the diagram 2-a and 2-b in the attachment design-V1-2. What is the best criteria in order to make the decision .

2- Since I am new in the USB field, is there any code library to be used in order to read the data from one USB make some adjustment to the packet and send it to the other USB port.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: need help for a small USB project
« Reply #1 on: May 21, 2015, 10:43:19 am »
Every USB communication is between a host and a device. In your existing configuration, the Bluetooth dongle is the device.

If you want to insert hardware between your host and device, you will need a board that can function as a device (to connect to the host) and as a host (to connect to the original dongle). And you will need firmware that can pass received data in each direction up or down the bus.

I'm not sure if the Pi supports USB device mode.

Another approach would be write a low-level filter driver that intercepts the data. You may need to digitally sign the driver.

https://msdn.microsoft.com/en-us/library/windows/hardware/ff540215%28v=vs.85%29.aspx

What specifically are you trying to accomplish?