Results 1 to 2 of 2

Thread: Bash to c++/QT

  1. #1
    Join Date
    Jun 2006
    Posts
    6
    Thanks
    2
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Bash to c++/QT

    I found this bash script:

    Qt Code:
    1. #! /bin/sh
    2. # Display output (hex) from a WGL W800RF32A RF receiver
    3. # Significant bytes are bytes 1 and 3, i.e., XX and YY
    4. # in the displayed sequence "XX ~XX YY ~YY"
    5.  
    6.  
    7. if [ $# -ne 1 ] ; then
    8. echo "Usage: $0 <serial port>"
    9. exit
    10. fi
    11. echo "Reading W800RF32A on port: "$1
    12. stty -F $1 4800 cs8 raw cread clocal -parenb -cstopb -echo
    13. cat $1 | xxd -g1 -c4
    To copy to clipboard, switch view to plain text mode 

    But I need to figure out how to do the same thing in c++ / QT... any ideas???

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Bash to c++/QT

    You can't do that in pure Qt. If you don't want to use QextSerialPort, see `man termios` for some useful functions.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.