Where to start coding a USB device

I need to port some modem code I wrote several years ago
to support a USB Modem. I have never written code to
talk to a USB device and have no idea where to start,
(other than picking up some books which I haven’t done yet).

Will I need a driver? Or does anyone have examples of
how to talk to a USB device via an application program?

thanks, Ed in Calif.

> I need to port some modem code I wrote several years ago

to support a USB Modem. I have never written code to
talk to a USB device and have no idea where to start,
(other than picking up some books which I haven’t done yet).

Will I need a driver? Or does anyone have examples of
how to talk to a USB device via an application program?

You need no rewrite. USB modems are mapped to COM ports, so, just open the COM
port and use the CommXxx APIs as usually.

For instance, both HyperTerminal and TAPI/Unimodem works fine with Ericsson 520
cellphone, connected… by USB BlueTooth adapter. In this situation, the “COM
port” belongs to Bluetooth stack, and this stack itself sits on top of the USB
stack.

It is not even USB modem, but is 100% COM-port compatible and supports the
usual AT commands.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

I don’t get it. The modem plugs into a USB connector.
Are you saying I can write code that talks to a com port
and it will get redirected out to the modem via the USB
connection?

Ed

----- Original Message -----
From: “Maxim S. Shatskih”
To: “Windows System Software Devs Interest List”
Sent: Monday, February 23, 2004 4:45 AM
Subject: Re: [ntdev] Where to start coding a USB device

> > I need to port some modem code I wrote several years ago
> > to support a USB Modem. I have never written code to
> > talk to a USB device and have no idea where to start,
> > (other than picking up some books which I haven’t done yet).
> >
> > Will I need a driver? Or does anyone have examples of
> > how to talk to a USB device via an application program?
>
> You need no rewrite. USB modems are mapped to COM ports, so, just open the
COM
> port and use the CommXxx APIs as usually.
>
> For instance, both HyperTerminal and TAPI/Unimodem works fine with
Ericsson 520
> cellphone, connected… by USB BlueTooth adapter. In this situation, the
“COM
> port” belongs to Bluetooth stack, and this stack itself sits on top of the
USB
> stack.
>
> It is not even USB modem, but is 100% COM-port compatible and supports the
> usual AT commands.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@attbi.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Yes, that’s what he’s saying.

Chuck

----- Original Message -----
From: “Ed in Calif”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, February 24, 2004 11:36 AM
Subject: Re: [ntdev] Where to start coding a USB device

> I don’t get it. The modem plugs into a USB connector.
> Are you saying I can write code that talks to a com port
> and it will get redirected out to the modem via the USB
> connection?
>
> Ed
>
> ----- Original Message -----
> From: “Maxim S. Shatskih”
> To: “Windows System Software Devs Interest List”
> Sent: Monday, February 23, 2004 4:45 AM
> Subject: Re: [ntdev] Where to start coding a USB device
>
>
> > > I need to port some modem code I wrote several years ago
> > > to support a USB Modem. I have never written code to
> > > talk to a USB device and have no idea where to start,
> > > (other than picking up some books which I haven’t done yet).
> > >
> > > Will I need a driver? Or does anyone have examples of
> > > how to talk to a USB device via an application program?
> >
> > You need no rewrite. USB modems are mapped to COM ports, so, just
open the
> COM
> > port and use the CommXxx APIs as usually.
> >
> > For instance, both HyperTerminal and TAPI/Unimodem works fine with
> Ericsson 520
> > cellphone, connected… by USB BlueTooth adapter. In this situation,
the
> “COM
> > port” belongs to Bluetooth stack, and this stack itself sits on top
of the
> USB
> > stack.
> >
> > It is not even USB modem, but is 100% COM-port compatible and
supports the
> > usual AT commands.
> >
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > xxxxx@storagecraft.com
> > http://www.storagecraft.com
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@attbi.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@cbatson.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

And he is right. He must be ( have been ) hacking Bluetooth with cell phone
that is quite familiar to me :-).
In bluetooth stack there is RFCOMM, that is where Unimodem comes to play.

-prokash

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Chuck Batson
Sent: Monday, February 23, 2004 8:44 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Where to start coding a USB device

Yes, that’s what he’s saying.

Chuck

----- Original Message -----
From: “Ed in Calif”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, February 24, 2004 11:36 AM
Subject: Re: [ntdev] Where to start coding a USB device

> I don’t get it. The modem plugs into a USB connector.
> Are you saying I can write code that talks to a com port
> and it will get redirected out to the modem via the USB
> connection?
>
> Ed
>
> ----- Original Message -----
> From: “Maxim S. Shatskih”
> To: “Windows System Software Devs Interest List”
> Sent: Monday, February 23, 2004 4:45 AM
> Subject: Re: [ntdev] Where to start coding a USB device
>
>
> > > I need to port some modem code I wrote several years ago
> > > to support a USB Modem. I have never written code to
> > > talk to a USB device and have no idea where to start,
> > > (other than picking up some books which I haven’t done yet).
> > >
> > > Will I need a driver? Or does anyone have examples of
> > > how to talk to a USB device via an application program?
> >
> > You need no rewrite. USB modems are mapped to COM ports, so, just
open the
> COM
> > port and use the CommXxx APIs as usually.
> >
> > For instance, both HyperTerminal and TAPI/Unimodem works fine with
> Ericsson 520
> > cellphone, connected… by USB BlueTooth adapter. In this situation,
the
> “COM
> > port” belongs to Bluetooth stack, and this stack itself sits on top
of the
> USB
> > stack.
> >
> > It is not even USB modem, but is 100% COM-port compatible and
supports the
> > usual AT commands.
> >
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > xxxxx@storagecraft.com
> > http://www.storagecraft.com
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@attbi.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@cbatson.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@garlic.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

If your usb modem is conformant to the CDC spec, there is no need to
write a driver and the built in driver (usbser.sys) will be loaded for
the device. This driver exposes a COM port which you can use to
communicate with the device. Not that this is not a full serial
interface, just a subset of the serial interface to interface with
modems.

If your device is not CDC compliant, you would have to write your own
driver.

D

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Chuck Batson
Sent: Monday, February 23, 2004 8:44 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Where to start coding a USB device

Yes, that’s what he’s saying.

Chuck

----- Original Message -----
From: “Ed in Calif”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, February 24, 2004 11:36 AM
Subject: Re: [ntdev] Where to start coding a USB device

> I don’t get it. The modem plugs into a USB connector.
> Are you saying I can write code that talks to a com port
> and it will get redirected out to the modem via the USB
> connection?
>
> Ed
>
> ----- Original Message -----
> From: “Maxim S. Shatskih”
> To: “Windows System Software Devs Interest List”
> Sent: Monday, February 23, 2004 4:45 AM
> Subject: Re: [ntdev] Where to start coding a USB device
>
>
> > > I need to port some modem code I wrote several years ago
> > > to support a USB Modem. I have never written code to
> > > talk to a USB device and have no idea where to start,
> > > (other than picking up some books which I haven’t done yet).
> > >
> > > Will I need a driver? Or does anyone have examples of
> > > how to talk to a USB device via an application program?
> >
> > You need no rewrite. USB modems are mapped to COM ports, so, just
open the
> COM
> > port and use the CommXxx APIs as usually.
> >
> > For instance, both HyperTerminal and TAPI/Unimodem works fine with
> Ericsson 520
> > cellphone, connected… by USB BlueTooth adapter. In this situation,
the
> “COM
> > port” belongs to Bluetooth stack, and this stack itself sits on top
of the
> USB
> > stack.
> >
> > It is not even USB modem, but is 100% COM-port compatible and
supports the
> > usual AT commands.
> >
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > xxxxx@storagecraft.com
> > http://www.storagecraft.com
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@attbi.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@cbatson.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

> And he is right. He must be ( have been ) hacking Bluetooth with cell phone

that is quite familiar to me :-).
In bluetooth stack there is RFCOMM

The BT stack vendor is WIDCOMM. In includes some NDIS-style (conceptually)
core, the virtual drivers for Ethernet, serial port and parallel port on top of
it, and invites the drivers for BT adapters to plug to the bottom of it. Surely
it also includes the GUI configuration software.

The stack was shipped as a part of the driver package for the Bluetooth USB
adapter
(the adapter’s driver links against the WIDCOMM’s binaries), and has
nothing related to Ericsson 520 (good to hear it is a worldwide known model).

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

Exactly. The same is true via Bluetooth.

Connect Ericsson 520 (or similar phone) to the machine via Bluetooth
wireless, and then open COMx (the virtual COM port created for your phone by
the Bluetooth software) via HyperTerminal.

Then type AT commands there, the same as for usual modems.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Ed in Calif”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, February 24, 2004 7:36 AM
Subject: Re: [ntdev] Where to start coding a USB device

> I don’t get it. The modem plugs into a USB connector.
> Are you saying I can write code that talks to a com port
> and it will get redirected out to the modem via the USB
> connection?
>
> Ed
>
> ----- Original Message -----
> From: “Maxim S. Shatskih”
> To: “Windows System Software Devs Interest List”
> Sent: Monday, February 23, 2004 4:45 AM
> Subject: Re: [ntdev] Where to start coding a USB device
>
>
> > > I need to port some modem code I wrote several years ago
> > > to support a USB Modem. I have never written code to
> > > talk to a USB device and have no idea where to start,
> > > (other than picking up some books which I haven’t done yet).
> > >
> > > Will I need a driver? Or does anyone have examples of
> > > how to talk to a USB device via an application program?
> >
> > You need no rewrite. USB modems are mapped to COM ports, so, just open the
> COM
> > port and use the CommXxx APIs as usually.
> >
> > For instance, both HyperTerminal and TAPI/Unimodem works fine with
> Ericsson 520
> > cellphone, connected… by USB BlueTooth adapter. In this situation, the
> “COM
> > port” belongs to Bluetooth stack, and this stack itself sits on top of the
> USB
> > stack.
> >
> > It is not even USB modem, but is 100% COM-port compatible and supports the
> > usual AT commands.
> >
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > xxxxx@storagecraft.com
> > http://www.storagecraft.com
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@attbi.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com