Can anybody give me the idea about communicating with RNDIS layer over
Communication device class.
Thanks
HimaNshu
Henrik Viklund
http://www.addlogic.se
and if data sending and recieving procedure will take care by driver
then is it posible that I can send the data by TCP and the either PC
with get that data on serial port, it seems funy but I want to know is
it possible?
I find out some settings for communication on TCPIP for socket
programming I need IP address and port address is it so.
and if serial interface is not possible then should I have to modify
Serial_Class driver which is used by activeSync as per CDC spec?
here is some registry settings
[HKEY_LOCAL_MACHINE\Comm\RNDISMINI1\Parms\TcpIp]
"EnableDHCP"=dword:1
"DefaultGateway"=""
"UseZeroBroadcast"=dword:0
"IpAddress"="0.0.0.0"
"Subnetmask"="0.0.0.0"
ActiveSync uses a serial class, in other words it uses a usb class that
mimics a serial connection but the transport medium is USB. RNDIS on
the other hand, mimics a network connection but the transport medium is
still USB. You can only have _one_ USB function class active at a time
in your device, in other words you can _not_ use ActiveSync (serial)
and RNDIS (ethernet emulation) at the same time. Now, ActiveSync and
its USB serial class has precedence over the RNDIS class, so the RNDIS
function will not be loaded on your ActiveSync enabled device.
Now if I want to communicate with Host PC I need CDC support which is
only in RNDIS driver, but that RNDIS driver works for ethernet
emulation only. and I have to communicate by TCP only from device side
and at Host end it is serial interface.
so my RNDIS driver can work on serial interface like Serial Class? is
possible if not then I have one option only I have to modify serial
class driver for CDC is it?
Thnaks,
HimaNshu
To confuse you a bit more ActiveSync is actually setting up a ppp
connection between the host and the device, so you're actually able to
open a TCP connection to the device that is tunneled via ppp through
the serial transport. There's an (old) article about how to do this
here:
http://www.kbalertz.com/kb_183988.aspx
Windows CE 5.0 does support both of them, you need configuration device
differently in order to expose this device either RNDIS or USBSer function.
David Liao.
"HimaNshu" <gajjar....@gmail.com> wrote in message
news:1156325056....@m73g2000cwd.googlegroups.com...
so I want expose serial interface at device end not TCP.
As David Liao has told RNDIS expose NDIS-miniport and as well as serial
also.
How can I configure RNDIS driver with serial interaface in WinCE.
is there any registry settings or I have to made some change at coding
end.
If you've designed the PC side program to communicate over a USB serial
connection you can NOT use RNDIS on the device!
static USB_DEVICE_DESCRIPTOR g_HighSpeedDeviceDesc = {
sizeof(USB_DEVICE_DESCRIPTOR), // bLength
USB_DEVICE_DESCRIPTOR_TYPE, // bDescriptorType
USB_VERSION, // bcdUSB
0x00, // bDeviceClass
0x00, // bDeviceSubClass
0x00, // bDeviceProtocol
EP0_PACKET_SIZE, // bMaxPacketSize0
0, // idVendor
0, // idProduct
0x0000, // bcdDevice
0x01, // iManufacturer
0x02, // iProduct
0x00, // iSerialNumber
0x01 // bNumConfigurations
};
static USB_DEVICE_DESCRIPTOR g_FullSpeedDeviceDesc = {
sizeof(USB_DEVICE_DESCRIPTOR), // bLength
USB_DEVICE_DESCRIPTOR_TYPE, // bDescriptorType
USB_VERSION, // bcdUSB
0x00, // bDeviceClass
0x00, // bDeviceSubClass
0x00, // bDeviceProtocol
EP0_PACKET_SIZE, // bMaxPacketSize0
0, // idVendor
0, // idProduct
0x0000, // bcdDevice
0x01, // iManufacturer
0x02, // iProduct
0x00, // iSerialNumber
0x01 // bNumConfigurations
};
bDeviceClass perameter is 0x00 but for CDC it should be 0x02 so I was
confuse there and tried for RNDIS because it has 0x02(CDC code) and it
connect to my host successfully.
now if serial class has CDC support then I have tried by changing that
bDeviceClass to 0x02 in usbfndrv.cpp but it is still not connecting
properly, even I check with USB device viewer on my host it shows me
bDeviceClass is 0x02 and also my productID and vendor ID correctly.
so would you please sugest me what chnages I should do which can make
work with my host pc connection with vertual com port.
would it be any problem at Host end?
HimaNshu
Henrik Viklund
http://www.addlogic.se
Thnaks in advance.
HimaNshu
"Henrik Viklund" <henrik....@gmail.com> wrote in message
news:1156428021.2...@m79g2000cwm.googlegroups.com...
By the way, We do provide source code for USB Function(Device) Mode Serial
Driver on WM5.0.
David Liao
"HimaNshu" <gajjar....@gmail.com> wrote in message
news:1156382175.4...@75g2000cwc.googlegroups.com...
"HimaNshu" <gajjar....@gmail.com> wrote in message
news:1156381851.9...@75g2000cwc.googlegroups.com...
I got something from my search of two days, some ppl use USBser_Class
that is same dll used in Serial_class serialusbfn.dll to load the
USBser class but somewhat differance in registry only here I have
pasted that registry setting but there is no more information I found
for USBser_class, and I am still getting Code 10 error with this
registry settings
Do I have to do any more changes for USBser_class, means in
usbfndrv.cpp.
Do I have to change descriptor or anything else in code?
here is my device registry settings:
; @CESYSGEN IF CE_MODULES_USBFN
IF BSP_NOUSBFN !
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Usbfn]
"InterfaceType"=dword:0 ; Internal
"Prefix"="UFN"
"Dll"="ms2_usbfn.dll"
"Order"=dword:0
"Priority256"=dword:64
"MemBase"=dword:40600000 ; UDC_BASE_U_VIRTUAL
"MemLen"=dword:1000 ; Needs at least 0xE04. Round up to 1
page.
"Sysintr"=dword:1a
"BusIoctl"=dword:2a0048
"IClass"=multi_sz:"{E2BDC372-598F-4619-BC50-54B3F7848D35}=%b","{6F40791D-300E-44E4-BC38-E0E63CA8375C}=%b"
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\USBSER_Class]
"Index"=dword:4
"FriendlyName"="USB Cable:"
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
"DefaultClientDriver"="USBSER_Class"
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Serial_Class]
"Dll"="serialusbfn.dll"
"DeviceName"="USBFNS1:"
"Prefix"="COM"
"DeviceArrayIndex"=dword:1
"Tsp"="Unimodem.dll "
"DeviceType"=dword:0
"IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
; idVendor must be changed. 045E belongs to Microsoft and is only to be
used for
; prototype devices in your labs. Visit http://www.usb.org to obtain a
vendor id.
; "idVendor"=dword:045E
; "Manufacturer"="Generic Manufacturer (PROTOTYPE--Remember to change
idVendor)"
; "idProduct"=dword:00ce
; "Product"="Generic Serial (PROTOTYPE--Remember to change idVendor)"
; "bcdDevice"=dword:0
"idVendor"=dword:150E
"Manufacturer"="OnoSokki"
"idProduct"=dword:0008
"Product"="Onosokki ChFFT Analyzer"
"bcdDevice"=dword:0
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\USBSER_Class]
"Dll"=" serialusbfn.dll"
"DeviceName"="USBFNS2:"
"Prefix"="COM"
"DeviceArrayIndex"=dword:0
"IClass"=multi_sz:"{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}","{C375C787-B721-4b8e-B67F-A112D5C0A404}"
"Tsp"="Unimodem.dll"
"DeviceType"=dword:0
; idVendor must be changed. 045E belongs to Microsoft and is only to be
used for
; prototype devices in your labs. Visit http://www.usb.org to obtain a
vendor id.
; "idVendor"=dword:045E
; "Manufacturer"="Generic Manufacturer (PROTOTYPE--Remember to change
idVendor)"
; "idProduct"=dword:0079
; "Product"="Generic Serial (PROTOTYPE--Remember to change idVendor)"
; "bcdDevice"=dword:90
"idVendor"=dword:150E
"Manufacturer"="OnoSokki"
"idProduct"=dword:0008
"Product"="Onosokki ChFFT Analyzer"
"bcdDevice"=dword:0
ENDIF
; @CESYSGEN ENDIF CE_MODULES_USBFN
David Liao
"HimaNshu" <gajjar....@gmail.com> wrote in message
news:1156755542.2...@i3g2000cwc.googlegroups.com...
if you have Windows CE 6.0 then would you provide me USBser driver
code, please?
I don't follow the question about updating PB5.0, but you shouldn't expect
to get some update that gives you everything that a Windows Mobile OEM can
include in their device for your general CE5 use, no.
Paul T.
"HimaNshu" <gajjar....@gmail.com> wrote in message
news:1156817319.8...@m79g2000cwm.googlegroups.com...
Dose anybody know which changes I have to make for USBser support in
usbserdvr.cpp?
Descriptor? and which will be more changes?