Sumeet Chakraborty wrote:
> Hello Roger, 
>
> Thanks for providing more insight to my problem. When we look into the 
> output of the "testlibusb-win32.exe" do we need to look at the key  by 
> the name "*bmAttributes*". In the key bmAttributes key I could see 
> values as "02h", "03h", so do these values correspond to the values 
> that is mentioned in section 4.2 of PSTN120.pdf.
>
> Is the SendEncapsulatedCommand supported with the javax.usb package?
Yes, SendEncapsulatedCommad is just a sequence of bytes posted as a IRP.
> what kind of flexibilities does a Abstract Control Model give me?
It seems to allow your device to understand AT commands sent over a 
specific protocol on top of USB.
> Is there any kind of modification I need to do at my code level to 
> send "AT" commands to the USB Modem?
You probably need something along the lines of:

byte[] data = "ATcommand".getBytes("US-ASCII");
UsbControlIrp controlIrp = thePipe.createUsbControlIrp((byte)0x21, 
(byte)0 , (short)0, (short)interfaceNum);
controlIrp.setData(data);
thePipe.synchSubmit(controlIrp);
> Please do let me know as to what I need to do to send AT Commands to 
> the USB modem?
As your modem probably supports CDC, PSTN specifically, you need to read 
and understand the document I pointed to. You must implement the 
protocol mandated by the device. Much as you can't just send random 
bytes over TCP IP, you must know if the other end wants HTTP, FTP, 
GOPHER etc.

//Roger Lindsjö
 

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
javax-usb-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to