Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

COM port Snooping

  • 25-01-2006 11:19am
    #1
    Posts: 3,620 ✭✭✭


    Hi all,
    I need to debug an application that uses virtual com ports as well as hardware com ports.

    Specifically I have written a program to talk to a mobile phone both by Bluetooth and serial cable.
    The commands I send to the COM port work using HyperTerminal, but the same commands sent using a C++ program work on and off with no particular pattern.

    I need to see in verbatim what is going out over the COM port and what is being sent back. I think I need some sort of driver or program to snoop the COM port.

    Can anyone point me in the right direction?


Comments

  • Registered Users, Registered Users 2 Posts: 362 ✭✭theone


    I'm doing something similar I'm talking to a router over the com port not touching blue tooth though.
    I have a program that imitates hyperterminal and I send commands using buttons in c# it seems to work,you can see the output to your commands in a text box.
    not up on programmining c++ but it might be similar.

    I'm using this http://msdn.microsoft.com/msdnmag/issues/02/10/netserialcomm/
    thats using the .net 1.1 framework
    it's alot easier to do using the 2.0 framework i'm going to redevelop the program using it.

    try checking the buffers for the serial port to see if the command is sent,I was having problems sending the command and then pressing enter i sorted that out that might be why the commands aren't working all the time.


  • Posts: 3,620 ✭✭✭ [Deleted User]


    theone wrote:
    I'm doing something similar I'm talking to a router over the com port not touching blue tooth though.
    I have a program that imitates hyperterminal and I send commands using buttons in c# it seems to work,you can see the output to your commands in a text box.
    not up on programmining c++ but it might be similar.

    I'm using this http://msdn.microsoft.com/msdnmag/issues/02/10/netserialcomm/
    thats using the .net 1.1 framework
    it's alot easier to do using the 2.0 framework i'm going to redevelop the program using it.

    try checking the buffers for the serial port to see if the command is sent,I was having problems sending the command and then pressing enter i sorted that out that might be why the commands aren't working all the time.
    Thanks for the input, I think I left out a vital bit of information in my first post.

    I'm using a third party API. I want to see if it is doing anything to my input that is screwing it up.

    I think I need a device filter for the COM port to see the exact information it is sending, or am I totally wrong.


  • Closed Accounts Posts: 24 lexeme


    using an API?

    why not just open a COM port as a file and read and write AT Hayes commands to it? windows, right? something like (note: it's been a while ;)) fstream file.open( "COM1", OPTS | MORE_OPTS ) or int fd = fopen( ... ), or FILE * x = fopen() or whatever. on *NIX, with bluetooth, you can just open /dev/rfcomm0 as a rw file and r/w to it, once bluetooth devices have been paired, and rfcomm is running.

    don't forget to flush!


  • Registered Users, Registered Users 2 Posts: 23 RazorEdge


    Try portmon

    http://www.sysinternals.com/utilities/portmon.html

    You will be able to see all port activity.


  • Posts: 3,620 ✭✭✭ [Deleted User]


    RazorEdge wrote:
    Try portmon

    http://www.sysinternals.com/utilities/portmon.html

    You will be able to see all port activity.

    Thats the one.
    Thank you!


  • Advertisement
Advertisement