PICED serial port default line states

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by BradJ, Mar 19, 2006.

  1. BradJ

    BradJ

    Joined:
    Aug 6, 2004
    Messages:
    95
    Likes Received:
    0
    I've been trying to get PICED to talk to my mobile phone all weekend with no success. I'm developing my logic, so I'm using PC serial ports. After much diagnostic effort I've come to the conclusion that my old Nokia 7110 does not want to talk back to PICED because PICED is not raising RTS or DTR. I've determined this by running a serial port sniffer and comparing the data from HyperTerminal (which works) and PICED (which doesn't).

    I don't yet know whether this will be a problem when I eventually hook up my phone to the PAC. I suspect it won't be because I can wire the cable to loopback the control signals.

    Even if PICED does not use Hardware flow control, it should raise RTS and DTR on an open serial port. Any chance this can be changed in the next release, or commands can be added to control the lines directly?

    I've played with my phone's AT commands from Hyperterminal to try to make the comms work regardless of the state of the control lines, but with no success. Hopefully a breakout box will work around the problem so I can loopback DSR from the phone to RTS and DTR going back into the phone.

    Thanks,
    Brad.
     
    BradJ, Mar 19, 2006
    #1
  2. BradJ

    Phil.H

    Joined:
    Jul 29, 2004
    Messages:
    466
    Likes Received:
    0
    Location:
    Sydney
    How did you initialise the serial port for PICED. You would need to enable flow control along with bits, stop, parity etc.
     
    Phil.H, Mar 19, 2006
    #2
  3. BradJ

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    PICED should use hardware flow control if you open the port that way.

    Try building a "null modem with loop back handshaking" cable as described in http://www.lammertbies.nl/comm/info/RS-232_null_modem.html

    A wiring diagram is attached.
     

    Attached Files:

    Darren, Mar 19, 2006
    #3
  4. BradJ

    BradJ

    Joined:
    Aug 6, 2004
    Messages:
    95
    Likes Received:
    0
    The help for OpenSerial states that Hardware flow control for the PAC is not supported. I assumed that included PAC projects simulated under windows?

    I'm pretty sure I tried turning on the flow control setting on the OpenSerial() call. I'll try it again tonight. I've borrowed an RS232 breakout box from work, so I should be able to get it working tonight and I'll report the results.
     
    BradJ, Mar 20, 2006
    #4
  5. BradJ

    BradJ

    Joined:
    Aug 6, 2004
    Messages:
    95
    Likes Received:
    0
    OK, I turned on flow control an it raises RTS but that didn't fix the problem.

    To get my old phone to communicate I had to tap the high from RTS and break it out to both DTR to the phone and CTS coming back into my PC. Looks like there's two problems:

    1. PICED doesn't raise DTR and my phone doesn't like that

    2. For some reason my phone does not return CTS, and Windows / PICED does not like that.

    My PAC solution will be OK so long as there is something high on the serial port I can route to DTR and CTS. Will either RTS or DTR be raised on the PAC?
     
    BradJ, Mar 20, 2006
    #5
  6. BradJ

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    The PAC does not drive any of the handshaking lines.

    I think that if you use the null modem cable shown in the previous post, it will probably work fine, as long as your phone is a "DTE" device. If it is a "DCE" device it probably won't work.
     
    Darren, Mar 21, 2006
    #6
  7. BradJ

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Actually, the cable supplied with the PAC should work, as the handshaking lines are looped back within the PAC, as shown in the attached diagram.
     

    Attached Files:

    Darren, Mar 21, 2006
    #7
  8. BradJ

    Phil.H

    Joined:
    Jul 29, 2004
    Messages:
    466
    Likes Received:
    0
    Location:
    Sydney
    Darren,

    I think the PAC is only shipped with a USB lead. Are you referring to the serial lead provided with the CTouch B&W.

    I have made a heap of different cross / serial leads to work with various pieces of hardware.

    Question 2 would you clasify the PAC as DCE or DTE ??
     
    Phil.H, Mar 21, 2006
    #8
  9. BradJ

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,397
    Likes Received:
    26
    Location:
    Adelaide, South Australia
    Sadly, the terms DTE and DCE are very unhelpful.

    Far better not claiming to be either, just providing as much info as possible about the signals and pinout.

    Serial comms is one of those "my standard is standard and your standard is non-standard" types of arguments in which folks only get grumpy.

    Publish (the details) and perish is the only foolproof way to do. The readers then have to figure out how to make an appropriate cable to use the device.
     
    ashleigh, Mar 21, 2006
    #9
  10. BradJ

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    You are quite right. I was referring to the black and white C-Touch cable.
    As Ashleigh says, these terms are a bit misleading and imprecise. The PAC definitely isn't a DCE device, so by an extensive process of elimination, I have concluded that it is really a DTE.
     
    Darren, Mar 22, 2006
    #10
  11. BradJ

    Phil.H

    Joined:
    Jul 29, 2004
    Messages:
    466
    Likes Received:
    0
    Location:
    Sydney
    I suppose it comes down to whether you consider the PAC gives or takes. I would have definitely thought DTE. A lot of standard reference re wiring illustrates connections between DTE and DCE devices, however, you chaps are right - the result of which is not always definitive.
     
    Phil.H, Mar 22, 2006
    #11
  12. BradJ

    BradJ

    Joined:
    Aug 6, 2004
    Messages:
    95
    Likes Received:
    0
    I might be stuffed as it look like my phone doesn't raise any control lines back (DSR, CTS), and PAC doesn't raise any lines so I've got no 'high' line to tap into and bridge to DTR like I do when testing connected to my PC. Without DTR high, my old Nokia 7110 does not communicate. Possibly the serial interface is powered off DTR being high. I'll have to look at some external electronics to provide a signal to DTR for the phone.

    In the future will PAC be able to assert control lines or is the hardware capability just not there?

    Thanks for your assistance.
     
    BradJ, Mar 23, 2006
    #12
  13. BradJ

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    The hardware is not there. If you look at one of the diagrams I posted, you will see that the handshaking lines are just looped back internally.
     
    Darren, Mar 23, 2006
    #13
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.