# Accessing Watchport/H through ASCII commands

**URL:** <https://forums.digi.com/t/accessing-watchport-h-through-ascii-commands/8537>\
**Category:** Edgeport\
**Created:** [March 23, 2009, 6:46pm UTC](https://forums.digi.com/t/accessing-watchport-h-through-ascii-commands/8537 "2009-03-23T18:46:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cb1](https://avatars.discourse-cdn.com/v4/letter/c/cdc98d/32.png) [@cb1](https://forums.digi.com/u/cb1)\
**Post date:** [March 23, 2009, 6:46pm UTC](https://forums.digi.com/t/accessing-watchport-h-through-ascii-commands/8537/1 "2009-03-23T18:46:43Z")

</div>

How do I go about doing this? In a C# program I created a serial port and opened it successfully, but when I send the ASCII command to the com port I get nothing back (when using ReadExisting in C#). When I use “ReadLine” function in C# my app bombs.

I’m unsure whether or not I’m supposed to be using the c# serial port object or some other object to read this data, since the documentation says “ASCII command interface” - not sure what that means.

I’m opening the port like so…

```
       // Set the properties.
        port.PortName = "COM" + portnum;
        port.BaudRate = 9600;
        port.Parity = Parity.None;
        port.StopBits = StopBits.One;

        // Set the read/write timeouts
        port.ReadTimeout = 300;
        port.WriteTimeout = 300;
        port.DtrEnable = true;
        
        //open the port
        port.Open();

```

Then trying to write & read like so…

```
        port.Write("TF");
        //pause for a little and let the serial port catch up
        Thread.Sleep(50);
        returntemp = port.ReadLine();

```

---

<div class="post-metadata">

**Author:** ![swifty32661](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@swifty32661](https://forums.digi.com/u/swifty32661)\
**Post date:** [March 23, 2009, 7:03pm UTC](https://forums.digi.com/t/accessing-watchport-h-through-ascii-commands/8537/2 "2009-03-23T19:03:29Z")

</div>

Hi,

ASCII command interface just means you can send specific ascii characters to the sensors and expect a certain behavior back from them.

You may want to verify that you can get a response back from the H sensor at all by not using your program and trying something like Hyperterminal. Just open up a connection directly to the com port that has been assigned to the sensor and hit ? . see if you get a response back or not.

That would at least tell us the port is opening ok and that it’s responding.  
Mike
