Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. problem in communicating with a device through TCPIP

problem in communicating with a device through TCPIP

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminhardwarehelpquestion
11 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C chandu004

    hai all masters, here is my problem. i want to access a hardware device(server) through TCPIP. i know its ip address, and i want to write an application(client) to access it. but i donot know the port number. is there any way to access it with out knowing the port number? if any more clarity is required, then i can provide. please give your views on this. thanks in advance.

    C Offline
    C Offline
    CPallini
    wrote on last edited by
    #2

    chandu004 wrote:

    is there any way to access it with out knowing the port number?

    Of course: (1) choose randomly a port (2) are you able to communicate with the device? (3) if the answer is yes then you're a lucky guy. (4) if the answer is no, goto point 1. That's called Montecarlo TCP/IP. :-D

    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
    This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

    C 1 Reply Last reply
    0
    • C CPallini

      chandu004 wrote:

      is there any way to access it with out knowing the port number?

      Of course: (1) choose randomly a port (2) are you able to communicate with the device? (3) if the answer is yes then you're a lucky guy. (4) if the answer is no, goto point 1. That's called Montecarlo TCP/IP. :-D

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

      C Offline
      C Offline
      chandu004
      wrote on last edited by
      #3

      thanks pallini, of course i have tried that before posting it here. i tried from 0 to 10000. but no use any way let me provide you more details such that, you can help me. 1.the device is access control system(card swipe system) in our office. 2.the vendor has provided his software, which will download the swpe logs to the PC. 3.for some reasons, i wanted to have my own software for that. so, i did the following things. 1.i made a session in hyperterminal using tcpip with the device ip and default port number 23. 2.then the device responded with welcome note, version number and a login prompt at my hyperterminal. 3.so here, i under stood that, i have to provide some username and pwd. so i tried to simulate the server(the device) through my application and communicate with his software and find the username and pwd. but the application is unable to communicate with my simulator. any ideas on this? please excuse me members, if my post is a bit lengthy.

      C 1 Reply Last reply
      0
      • C chandu004

        thanks pallini, of course i have tried that before posting it here. i tried from 0 to 10000. but no use any way let me provide you more details such that, you can help me. 1.the device is access control system(card swipe system) in our office. 2.the vendor has provided his software, which will download the swpe logs to the PC. 3.for some reasons, i wanted to have my own software for that. so, i did the following things. 1.i made a session in hyperterminal using tcpip with the device ip and default port number 23. 2.then the device responded with welcome note, version number and a login prompt at my hyperterminal. 3.so here, i under stood that, i have to provide some username and pwd. so i tried to simulate the server(the device) through my application and communicate with his software and find the username and pwd. but the application is unable to communicate with my simulator. any ideas on this? please excuse me members, if my post is a bit lengthy.

        C Offline
        C Offline
        CPallini
        wrote on last edited by
        #4

        I was just kidding, of course. Why don't you issue the netstat command (from command prompt) while the device is connected with vendor software to see involved ports?

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

        C 2 Replies Last reply
        0
        • C CPallini

          I was just kidding, of course. Why don't you issue the netstat command (from command prompt) while the device is connected with vendor software to see involved ports?

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

          C Offline
          C Offline
          chandu004
          wrote on last edited by
          #5

          wov thats wonderful. i was exactly looking for such a tool. but it gives me the results all at a time. not in real time. i mean, if i start it, and then start his application from another system, then it(netstat) should show me the commands that got transfered from one port to other. any way, i shall look into the options of it and get back to you. or if you have any idea of such an application then please forward me its url. thanks for the clue.

          1 Reply Last reply
          0
          • C CPallini

            I was just kidding, of course. Why don't you issue the netstat command (from command prompt) while the device is connected with vendor software to see involved ports?

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

            C Offline
            C Offline
            chandu004
            wrote on last edited by
            #6

            but how come did the device respond to my hyperterminal with port number 23? any idea on this? and more over, with other numbers it is not responding.

            C 1 Reply Last reply
            0
            • C chandu004

              but how come did the device respond to my hyperterminal with port number 23? any idea on this? and more over, with other numbers it is not responding.

              C Offline
              C Offline
              CPallini
              wrote on last edited by
              #7

              It accepts telnet connections. However maybe the vendor software uses another port to communicate. Why don't you ask the vendor?

              If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
              This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

              C 2 Replies Last reply
              0
              • C CPallini

                It accepts telnet connections. However maybe the vendor software uses another port to communicate. Why don't you ask the vendor?

                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                C Offline
                C Offline
                chandu004
                wrote on last edited by
                #8

                yes i tried that even, but he said it is not possible so easily. and he want to take his own time to give me the techical details. but iam not sure about him.

                1 Reply Last reply
                0
                • C CPallini

                  It accepts telnet connections. However maybe the vendor software uses another port to communicate. Why don't you ask the vendor?

                  If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                  This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                  C Offline
                  C Offline
                  chandu004
                  wrote on last edited by
                  #9

                  netstat could not give me the exact information that iam looking for. can you suggest me any other idea to achieve my goal? thank you.

                  C 1 Reply Last reply
                  0
                  • C chandu004

                    netstat could not give me the exact information that iam looking for. can you suggest me any other idea to achieve my goal? thank you.

                    C Offline
                    C Offline
                    CPallini
                    wrote on last edited by
                    #10

                    Nope. Try the Hardware / Device Drivers [^] forum. :)

                    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                    This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                    C 1 Reply Last reply
                    0
                    • C CPallini

                      Nope. Try the Hardware / Device Drivers [^] forum. :)

                      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                      C Offline
                      C Offline
                      chandu004
                      wrote on last edited by
                      #11

                      thank you.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups