PORTS Forum
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
This forum is closed to new activity.
The posts are available to browse, but posting has been disabled. BIG THANKS to all who have participated and shared your knowledge over the past 13 years.
Aug 11, 2023
Home
Help
Search
Login
Register
PORTS Forum
»
Ports and Interfaces
»
USB
»
USB CDC Communication
« previous
next »
Print
Pages: [
1
]
Author
Topic: USB CDC Communication (Read 11796 times)
sivakumar
Member
Posts: 2
USB CDC Communication
«
on:
July 02, 2014, 06:39:35 am »
Hello,
I am new to USB and started understanding the USB Specifcation.
I would like to Bring a processor(running Linux) in between the host PC(running Windows) and device(modem) can i make the device is visible to host PC and behave like it is directly connected to the host PC?
Can it implementable to make communication between the control Endpoints of host driver and Device driver on the processor ?
There are some class specific request are going to the device(modem) like SET_CONTROL_STATE_LINE,SET_LINE_CODING etc.Can we suppress this class specific requests?
Any suggestions helpful.
Thanks & Regards
Siva Kumar
Logged
Jan Axelson
Administrator
Frequent Contributor
Posts: 3033
Re: USB CDC Communication
«
Reply #1 on:
July 02, 2014, 08:01:43 am »
If your processor has both a USB host and USB device port, you could connect the device port to the upstream USB host, connect the host port to the modem, and provide firmware that passes data between the modem and the upstream host.
Logged
sivakumar
Member
Posts: 2
Re: USB CDC Communication
«
Reply #2 on:
July 03, 2014, 12:42:07 am »
Hello Jan,
Thanks for your quick reply.
As you said processor having the two USB ports one acting as host and other as a device.
On the processor (Linux) the gadget driver( g_serial.ko module) loaded by changing the product_id and vendor_id(with modem device product_id and vendor_id) on the USB structure and connected it to the Host PC(Windows) and driver for the 3G modem is loaded on the host PC.
The modem is connected to the processor as device (loading cdc-acm.ko module).
After above setup is done running an application that transferring data between the host PC and modem.
From my understanding some class specific requests SET_CONTROL_STATE_LINE,SET_LINE_CODING generated from the host PC giving some problems.
From USB Specification understanding class Specific requests are done through the default control endpoint.
Is it possible to make a bridge between the control endpoints(both device and host) on the processor in Linux environment?
There are some timing constraints also defined at the USB Specification.
Thanks & Regards
Siva Kumar
Logged
Barry Twycross
Frequent Contributor
Posts: 263
Re: USB CDC Communication
«
Reply #3 on:
July 03, 2014, 04:06:21 am »
It should be perfectly possible to send the resquests on down to the device, wait for the answer and send the same answer back to the host.
Logged
Jan Axelson
Administrator
Frequent Contributor
Posts: 3033
Re: USB CDC Communication
«
Reply #4 on:
July 03, 2014, 11:15:01 am »
Of course the Linux processor is not the same thing as the attached modem so should use a different Vendor ID/Product ID though for personal use it may work if you can emulate the device exactly.
Logged
Print
Pages: [
1
]
« previous
next »
PORTS Forum
»
Ports and Interfaces
»
USB
»
USB CDC Communication