virtual TCP/IP socket driver for USB connection

Started by KeesZagers, January 21, 2013, 03:28:58 PM

Previous topic - Next topic

KeesZagers

Hello,

The use of the virtual serial port driver for the USB connection between PC and Duinomite Mega works great. I use teraterm and even with high speed I can communicate very well now (a little change in the firmware of DMBasic was necessary as mentioned before).
On the PC side I would like to have a browser based human interface for some applications. Using PHP I can communicate with the virtual serial driver. I can send commands to the duinomite without any problems. To receive the response seems to be not a problem in Linux systems, but is a problem in Windows systems. The serial port hangs up and only a reset of the PC helps to get it free again.
I would like to replace the virtual COM driver by a virtual TCP/IP Socket driver for this purpose. In that case I can still communicate with it through eg Telnet, but also from a WEB-based application.
Anyone on this list with some experience on this?

Kees

KeesZagers

After 4 days enough views, but no answers, so I believe no solution available (yet).

In the mean time I struggeled on with the virtual serial port driver and succeeded in getting it work also in Windows. I will publish the PHP code as soon as it is more reliable and completed with extra functionality.

The problem with hanging up of an application which communicates with a serial port, that you have to reboot the PC to get the serial port free again. So after 100 reboots I found out where and when it still fails.

The Olimex usbser driver looks for the to be used COMn port and configures it with some parameters. In my case COM8: was chosen and with the DOS command MODE COM8: I can read out the parameters. Bitrate, parity etc. are not relevant ofcourse, because it is only a virtual serial port. However the timeout parameter is relevant. This default OFF. Whenever I run a terminal program on this port (Teraterm, Hyperterminal) and afterwards I look again in MODE COM8: it has been set ON. My PHP program works fne now.

As I don't want to start a terminal program first after re-initialisation every time, I looked for another way to set the timeout. I can do it with the MODE COM8: TO=ON however now I get a timeout of 10 seconds or something like that. This is not what I want; it should be a much shorter timeout. Up to now I have not found where I should do that. There is no .ini file with the driver and I have not found a simple DOS CMD which I can execute in PHP. So any help is welcome here.