Use USB client to communicate to a PC application.

Ferite
Hola a todos:

La versión breve de mi pregunta sería, si alguien ha sido capaz de
comunicar una aplicación Mini2440 desde una aplicación de PC mediante el
puerto USB de la parte cliente Mini2440?

La completa es la siguiente: hace unos días me escribió un mensaje con el
asunto "TCP a través de ActiveSync". Tras varios días de investigación y
después de publicar un nuevo tema en MSDN (Windows Mobile) foros, no he
hecho la RNDIS a trabajar ni hablar de PC y aplicación de dispositivos
entre sí. El siguiente es el enlace al hilo:

http://social.msdn.microsoft.com/Forums/en-US/windowsmobiledev/thread/86...

Básicamente, lo que hizo fue activa RNDIS función del cliente y
deshabilitar la función de serie, además de algunas otras cosas que debo
control en función de los consejos que me dieron, pero después de todo, el
Mini2440 ni siquiera es detectado cuando es conectar al PC ( No es posible
reproducir el sonido característico, ni un nuevo dispositivo se muestra en
Administrador de dispositivos "ventana").

Como parece que yo debería abortar la idea RNDIS, me gustaría saber si
alguien ha sido capaz de comunicarse con una aplicación Mini2440, desde una
aplicación de PC mediante el cable USB y pueden compartir lo que se
necesita para eso, voy a ser muy agradecido.

Gracias a todos y saludos cordiales.

LDS
Olá

este fórum é apenas para utilizadores que entendam inglês. Se souberes
falar e escrever inglês era melhor para ti. Senão duvido que te entendam
correctamente.

Espero que consigas compreender o que escrevi porque sou Português.



Abraço,
LDS

Ferite
Thanks LDS, It was my Mistake: The following is the english version:

Hi to all:

The brief version of my question would be, if some one have been able to
communicate to a Mini2440 application from a PC application by using the
USB client port on the device?

The complete question is as follows: Few days ago I wrote a message with
subject "TCP over ActiveSync". After several days of researching and after
post a new thread in MSDN (Windows Mobile) forums, I have not made the
RNDIS to work neither PC and device application talk wiht each other. The
follow is the link to the thread:

http://social.msdn.microsoft.com/Forums/en-US/windowsmobiledev/thread/86...

Basically, what I did was to active RNDIS Function Client and disable the
Serial Function, besides a few other things I should check according to the
advises given to me, but after all, the Mini2440 is not even detected when
the USB is pluged to the PC (doesn't play the caracteristic sound, neither
a new device is shown under "Device manager" window).

As it seems that I should abort the RNDIS idea, I wolud like to know if
some one have been able to communicate an application running on Mini2440
from a PC application through the USB cable and can share what is need for
that, I will be very gratefull.

Thanks to all and best regards.

domodom
Hello, 
You can maybe find a solution with RAPI :
http://www.xs4all.nl/~itsme/projects/xda/tools.html
Best regards
Domodom

Ferite
Hi Dominique:

Very kindly from you, as usual. I will check Rapi.

Thanks and best regards.

Ferite
Rapi could be the way to go, but unfortunately, for my custom needs, It
would demand to develop a native library to be called from the Rapi Invoke.
It would run out of my skills (my background is Java and C#) and I think it
would dangerous for a not experienced unmanaged programmer, the lack of
garbage collector in such restricted device.

andrés barré
ferite

te comento hice algunas pruebas mas no en modo client . por que tendria que
reescribir el driver del modulo y deslogar por llamarlo de alguna maera el
actyve.. o  usarlos. de modo que mi aplicacion en el pc  se comunique
atraves ...
lo que hice  es en ves del cliente es usar los host con drivers ftdi a
altas velocidades. 1.2 mbps como puertos serie virtuales .. si eso te  es
util ..    es una alternativa ]
los modulos ftdi serie usb permiten velocidades no convencionales muy  muy
altas sin problemas de comunicacion !

para los que no les agrada la escritura en castellano. 
 del mismo modo como hay traductores ingles castellano, hay castellano
ingles...;-)

Ferite
Que tal Andrés.

No se si te entendí completamente. Sé que el Ftdi es un chip que convierte
de USB (host) a Serial. Si uno instala los drivers en el PC se registrará
un nuevo puerto virual COM o serial. 
Lo que propones es que conectar un Ftdi a los puertos host del PC y del
Mini2440 y hacer una especie de cable serial cruzado en la mitad?

Gracias por tu ayuda. Saludos.

__________________________________________________________________________

Hi Andrés.

Let me know if I understood well. I know that Ftdi is a USB to Serial
coneverter chip. If the Ftdi drivers are installed, a new virtual serial or
COM port would be registered on the system.
Is your sugestion to connect a Ftdi chip to both PC and Mini2440 host ports
and connect them through a null modem cable.

andrés barré
exacto...
   lo podrias hacer de dos formas  o usando la puerta serie del 2440 y el
conversor serie hay, colocando el driver en tu pc usandolo como serie
virtual (VCP)   vcp en la pc <-> serie 2440 o... invertido
colocando el VCP en el 2440... y la serie en la pc o.... una tersera
opcion..
vcp en ambas... es medio loco , mas funciona  .!!!  en este caso tendrias
que usar dos chips FTDI
  
hice por casualidad unas pruebas y  vi que podia usar velocidades muy altas
, no estandar tipo  500Kbps 1Mbps etc .. tambien estoy usando eso  con un
ARM7 lpc2138 .. a 1,5Mbps justamente de esta forma la uart del LPC2138 se
conecta como puerto serie normal al ftdi.. y el ftdi se conecta al pc como
VPC exelente como trabaja


espero que te sirva la idea 
abrazo

Exact ...
   I could do this in two ways or using the serial port of 2440 and the
series converter is, placing the driver on your pc using it as a virtual
serial (VCP) vcp on pc <-> 2440 series o. .. invested
placing the VCP in 2440 ... and the series in the pc o. ... third option ..
vcp in both ... is half mad, but it works.! in this case would have to use
two chips FTDI
  
by chance did some tests and saw that he could use very high speeds, no
such standard 500Kbps 1Mbps etc. .. I am also using this with an ARM7
lpc2138 .. 1.5 Mbps in just this way the LPC2138 UART serial port is
connected as normal to ftdi .. and connects to the pc ftdi as excellent as
it works VPC


We hope this idea
hug

domodom
If a "simple" serial communication fills your need, you can configure the
USB Client connector like a serial port. When you connect the mini2440 to
your PC, a new serial port appears on the PC without to use a FTDI chip.
Domodom

Ferite
Thanks Andrés and domdom.

After analyze the aproach suggested by Andrés, fell into account that one
of my goals to implement RNDIS, is that the system must handle two
protocols simultaneously. If I have a TCP/IP stack, each one of these
protocols can be assigned to a diferent TCP port. As the serial interface
only offer a Unique end point, the serial aproach could no be a solution
for my particular needs.

Andrés, thanks again for your help, it would be interesting to hear such
creative ideas from you in the future.

andrés barré
ferite   
sin problemas, 
y suerte en tu aplicacion!

joan
Hi Domodon
I'm interested in your solution. How Can I configure the
USB Client connector like a serial port on mi mini2440. Can I do it
modifying de registry without recompiling the image?
Thanks
Joan

domodom
Hello Joan, 
Some articles are almost finished on my website, there is one that will
present 3 differents uses of the USB device connector : activesync, virtual
serial port over usb, usb mass storage.
I have to re-read and verify that everything is correct before to publish
the article.
But you will have to generate your own image to include the needed
components.
domodom

Ferite
Hi Domodom:

Great news to hear about your articles. Honestly, after several tweaks, I
can't finally make the USB port behaves as TCP/IP connection. I hope to
read your articles soon.

Thanks and all the best.