Menu

--test works but not --service

Help
Brent
2005-10-12
2013-04-08
  • Brent

    Brent - 2005-10-12

    Hey,

    So this little program is great, and it works like a charm in the --test mode running from a cmd.exe window, but as soon as I install the service and start the service nothing happens.  When i connect to the appropriate port all i get is.

    +TCP2COM v1.0.0

    and nothing else.  My keystrokes do nothing and there doesn't seem to be any connection to the comport

    Any ideas?.

     
    • Brent

      Brent - 2005-10-12

      I should probably note that i'm using windows XP professional with SP2

       
      • Christophe Buguet

        Hello,

        Thanks for the interest you have in our application.

        It seems the socket gets blocked between the sending of first line ("+OK TCP2COM"...) and second line ("Enter password" or "OK logged in")

        Could you provide some more details on your system and how you have setup the application :
        - Windows firewall or any other firewall installed
        - User account running the service

         
    • Brent

      Brent - 2005-10-13

      Well my application is slightly different than what i think you intended this to be used for.  I'm using your application to connect to the com port of a CLI (command line interface) for an embedded project i'm working on. 

      As such there is no log in screen, no passwords or anything.  I've been using PuTTY in "raw" mode to connect, but have also tried hyperterm and SSH secure shell.  All of them seem to work nicely when i have the system running in test mode.

      But yes, in response to your statement "It seems the socket gets blocked between the first line and the second" is likely true as I don't get my prompt from my CLI.

      There are no firewalls installed on the PC (eventhough SP2 is installed, i've disabled the firewall).  I'll verify there is nothing silly like this when i get to work today, but am 99% positive there are no firewalls or the like left running on my system.

      The user account running the service has admin rights on the computer so i'm not sure why it's not working.

      Need any other information?

      Thanks for your reply.

       
    • Brent

      Brent - 2005-10-13

      Ok i figured out why it's not talking, but i'm not sure how to fix it. 

      I thought i'd sniff the com port while i was trying to use the service vs. the test and i came up with some interesting results.

      It seems that the --test opens the com port up at 115200 (what i have the com port settings set to and what our CLI is running at), but when i install the service and connect to the desired port it opens up a connection at 9600. 

      This makes perfect sense as to why it "seems" to connect but i can't see any output :)

      Any idea why the service is doing this and not the test?  Any possible solutions?

      I'd post my log file but i don't think it will paste in all that well.

      Thanks.

       
      • Christophe Buguet

        You have possibility to edit the baud rate in the service (and several other parameters) :
        - Run regedit.
        - Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servces\tcp2com-X (X is the nomber of the com port).
        - go to the Parameters sub-key
        - edit the ComBaudRate key

        I think it's a good Request For Enhancement to ask for some more documentation about editing values in the registry. We have a big lack of it with
        eye-candy images in it ;-)

        You can also edit some values but be careful cause it's related to Win32 API constants...

         
        • Brent

          Brent - 2005-10-13

          Ok that did it ... Thanks,  I also had to edit the CTS and RTS values to shut down flow control.

          Maybe adding those to the command line as optional parameters would be good....

          Well you don't even neccessarily need fancy images :)

          Just a short, "here are the default values the service installs as, if you need something different here are the keys and parameters you need to change."

          Thanks, this is awesome now.  Exactly what i needed.

           
    • aapocketz

      aapocketz - 2005-10-27

      what values did you put in to shut down flow control? 
      want to connect 9600 baud com1 with 8N1 without flow control.

      KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\tcp2com-1\Parameters

      ComBaudRate
      ComBinary
      ComByteSize
      ComDtrControl
      ComOutxCtsFlow
      ComParity
      ComPort
      ComRtsControl
      ComStopBits
      Password
      tcpPort

      here are my values:
      Key Name:          HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\tcp2com-1\Parameters
      Class Name:        <NO CLASS>
      Last Write Time:   10/26/2005 - 7:38 PM
      Value 0
        Name:            ComBaudRate
        Type:            REG_DWORD
        Data:            0x2580

      Value 1
        Name:            ComParity
        Type:            REG_DWORD
        Data:            0x0

      Value 2
        Name:            ComStopBits
        Type:            REG_DWORD
        Data:            0x0

      Value 3
        Name:            ComByteSize
        Type:            REG_DWORD
        Data:            0x8

      Value 4
        Name:            ComBinary
        Type:            REG_DWORD
        Data:            0x1

      Value 5
        Name:            ComDtrControl
        Type:            REG_DWORD
        Data:            0x1

      Value 6
        Name:            ComOutxCtsFlow
        Type:            REG_DWORD
        Data:            0x1

      Value 7
        Name:            ComRtsControl
        Type:            REG_DWORD
        Data:            0x2

      Value 8
        Name:            TcpPort
        Type:            REG_DWORD
        Data:            0x17

      Value 9
        Name:            ComPort
        Type:            REG_DWORD
        Data:            0x1

      Value 10
        Name:            BindAddress
        Type:            REG_SZ
        Data:            0.0.0.0

      Value 11
        Name:            Password
        Type:            REG_SZ
        Data:           

       
      • Brent

        Brent - 2005-10-27

        The value you want to change is ComOutxCtsFlow from 1 to 0.  This disables the flow control.  Depending on your system, you may need to set ComDtrControl to 0 as well.

        Here is my registry info for further reference:

        [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\tcp2com-1\Parameters]
        "ComBaudRate"=dword:0001c200
        "ComParity"=dword:00000000
        "ComStopBits"=dword:00000000
        "ComByteSize"=dword:00000008
        "ComBinary"=dword:00000001
        "ComDtrControl"=dword:00000001
        "ComOutxCtsFlow"=dword:00000000
        "TcpPort"=dword:00004e20
        "ComPort"=dword:00000001
        "BindAddress"="0.0.0.0"
        "Password"=""
        "ComRtsControl"=dword:00000000

         
    • aapocketz

      aapocketz - 2005-10-27

      I tried changing both those values.  neither worked.
      I ran a trace:  The purge commands are me hitting the enter key in the telnet window.

      3:09:31 PM    tcp2com.exe    IRP_MJ_CREATE    Serial5    SUCCESS    Options: Open    
      3:09:31 PM    tcp2com.exe    IOCTL_SERIAL_GET_BAUD_RATE    Serial5    SUCCESS       
      3:09:31 PM    tcp2com.exe    IOCTL_SERIAL_GET_LINE_CONTROL    Serial5    SUCCESS       
      3:09:31 PM    tcp2com.exe    IOCTL_SERIAL_GET_CHARS    Serial5    SUCCESS       
      3:09:31 PM    tcp2com.exe    IOCTL_SERIAL_GET_HANDFLOW    Serial5    SUCCESS       
      3:09:31 PM    tcp2com.exe    IOCTL_SERIAL_SET_BAUD_RATE    Serial5    SUCCESS    Rate: 9600   
      3:09:31 PM    tcp2com.exe    IOCTL_SERIAL_CLR_DTR    Serial5    SUCCESS       
      3:09:31 PM    tcp2com.exe    IOCTL_SERIAL_SET_LINE_CONTROL    Serial5    SUCCESS    StopBits: 1 Parity: NONE WordLength: 8   
      3:09:31 PM    tcp2com.exe    IOCTL_SERIAL_SET_CHAR    Serial5    SUCCESS    EOF:0 ERR:0 BRK:0 EVT:0 XON:0 XOFF:0   
      3:09:31 PM    tcp2com.exe    IOCTL_SERIAL_SET_HANDFLOW    Serial5    SUCCESS    Shake:0 Replace:80 XonLimit:0 XoffLimit:0   
      3:09:31 PM    tcp2com.exe    IOCTL_SERIAL_SET_WAIT_MASK    Serial5    SUCCESS    Mask: RXCHAR    
      3:09:31 PM    tcp2com.exe    IOCTL_SERIAL_PURGE    Serial5    SUCCESS    Purge: TXABORT RXABORT TXCLEAR RXCLEAR   
      3:09:31 PM    tcp2com.exe    IRP_MJ_READ    Serial5    SUCCESS    Length 0:    
      3:09:31 PM    tcp2com.exe    IRP_MJ_READ    Serial5    SUCCESS    Length 0:    
      3:09:37 PM    tcp2com.exe    IOCTL_SERIAL_PURGE    Serial5    SUCCESS    Purge: TXABORT TXCLEAR    
      3:09:37 PM    tcp2com.exe    IOCTL_SERIAL_PURGE    Serial5    SUCCESS    Purge: TXABORT TXCLEAR    
      3:09:37 PM    tcp2com.exe    IOCTL_SERIAL_PURGE    Serial5    SUCCESS    Purge: TXABORT TXCLEAR    
      3:09:37 PM    tcp2com.exe    IOCTL_SERIAL_PURGE    Serial5    SUCCESS    Purge: TXABORT TXCLEAR    
      3:11:55 PM    tcp2com.exe    IOCTL_SERIAL_PURGE    Serial5    SUCCESS    Purge: TXABORT TXCLEAR    
      3:11:55 PM    tcp2com.exe    IOCTL_SERIAL_PURGE    Serial5    SUCCESS    Purge: TXABORT TXCLEAR    
      3:11:55 PM    tcp2com.exe    IOCTL_SERIAL_PURGE    Serial5    SUCCESS    Purge: TXABORT TXCLEAR    
      3:11:55 PM    tcp2com.exe    IOCTL_SERIAL_PURGE    Serial5    SUCCESS    Purge: TXABORT TXCLEAR    
      3:12:08 PM    tcp2com.exe    IRP_MJ_CLEANUP    Serial5    SUCCESS       
      3:12:08 PM    tcp2com.exe    IRP_MJ_CLOSE    Serial5    SUCCESS       

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.