Results 1 to 20 of 24

Thread: QSerialDevice v 0.2.0 released

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Thanks
    2
    Thanked 43 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QSerialDevice v 0.2.0 released

    Hi

    So, announces release: QSerialDevice v 0.2.0

    Many amendments, write makes no sense, therefore, give a brief clipping annotations:

    QSerialDevice - a cross-platform library for serial devices, which uses framework Qt4 (see http://qt.nokia.com/).

    Requirements:

    OC: Win2K/WinXP/WinVista/Win7 or any GNU / Linux distribution
    Qt4:>=4.5.0
    Processor: any (which is supported by Qt4)
    Compiler: any (which is supported by Qt4)

    Notes:

    Due to the fact that I (the author) do not have the opportunity to test the library at all possible operating systems, all compilers, processors, etc. - It is possible that the library in some cases will not work: (.
    Library tested only on:
    OC: Windows XP Pro Sp3 (win32) and GNU ArchLinux x86_64
    Qt4: from 4.5.3 to 4.6.2
    Processor: AMD Athlon 4400 + 64x2 Socket AM2
    Compiler: gcc, MinGw
    Theoretically (with minor fixes source code) can ensure that the library has worked on other platforms.

    QSerialDevice Library contains the following classes:

    * AbstractSerial
    * SerialDeviceWatcher
    * SerialDeviceInfo

    AbstractSerial

    Class AbstractSerial - provides a self-contained set of methods and properties for light and easy to work with serial devices (serial port) of your PC (or other device).

    The class supports the following features:
    - to set the speed of data exchange
    - to set the number of bits of data
    - to set the number of stop bit
    - set modes parity
    - to establish regimes of control flow
    - set timeout symbol
    - write data to the serial device
    - read data from serial device
    - manage such lines as a port: DTR, RTS
    - reading of such lines as a port: CTS, DSR, DCD, RI, RTS, DTR, ST, SR
    - automatically receive notification when:
    - receiving at least one byte (character) in the input buffer
    - writing the last byte in the output buffer
    - change of status of the serial device (for errors, etc.)
    - to get the current value of the number of bytes in the receiving buffer
    - set timeout joining at least one byte (character) in the input buffer

    (see further description AbstractSerial and source code)

    SerialDeviceWatcher

    Class SerialDeviceWatcher - is a helper class for the monitoring of serial devices.

    Class provides the following features:
    - to obtain a list of names of all serial devices that are available in the system
    - automatically receive notification when adding / removing of any serial device

    (see further description SerialDeviceWatcher and source code)

    SerialDeviceInfo

    Class SerialDeviceInfo - also is a helper class to obtain information about the serial device.

    Class provides the following features:
    - to get "friendly" name interesuyushego us serial device
    - to obtain the "description" interesuyushego us serial device
    - to get VID and PID interesuyushego us serial device (experimental)
    - we are interested to check the serial device to the existence of
    - we are interested to check the serial device on employment (lock)
    -, etc.

    (see further description SerialDeviceInfo and source code)

    Download from Qt-Apps.org: http://www.qt-apps.org/content/show....d0a355634137ac
    Download Releases can be the home page of the project: http://fireforge.net/frs/?group_id=199
    Download the latest cuts SVN: http://fireforge.net/snapshots.php?group_id=199

  2. The following user says thank you to kuzulis for this useful post:

    cutie.monkey (15th June 2010)

  3. #2
    Join Date
    Jun 2010
    Posts
    18
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSerialDevice v 0.2.0 released

    Is there something special I need to do to build QSerialDevice on an Ubuntu Linux platform? I have no trouble building and running successfully on windows, but building on Linux I get
    /moc_serialdevicewatcher.cpp:12: error: #error "The header file 'serialdevicewatcher.h' doesn't include <QObject>."
    If I add "#include <QObject>" to serialdevicewatcher.h I get
    /moc_serialdevicewatcher.cpp:78: error: invalid use of incomplete type ‘struct SerialDeviceWatcherPrivate’
    and
    /../QSerialDevice/serialdevicewatcher.h:33: error: forward declaration of ‘struct SerialDeviceWatcherPrivate’
    moc_serialdevicewatcher.cpp:78 is
    Qt Code:
    1. case 1: d_func()->_q_processAvailableNotifier(); break;
    To copy to clipboard, switch view to plain text mode 
    As I try to fix these, the errors start to multiply. Any ideas?

  4. #3
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Thanks
    2
    Thanked 43 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSerialDevice v 0.2.0 released

    I just checked the compilation of: svn checkout svn://scm.fireforge.net/svnroot/qserialdevice
    and I have all good compile. OS ArchLinux x86_64.

    Try has make the so:
    - Remove from the project all Makefile, *. moc, *. obj files and then compile. (Or equivalent to do: # make distclean)

  5. The following user says thank you to kuzulis for this useful post:

    jnadelman (14th June 2010)

  6. #4
    Join Date
    Jun 2010
    Posts
    18
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSerialDevice v 0.2.0 released

    Thanks. That was helpful. Builds fine now.

  7. #5
    Join Date
    Jul 2008
    Location
    Philippines
    Posts
    60
    Thanks
    9
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSerialDevice v 0.2.0 released

    QSerialDevice is very helpful! I'ved been using this in LINUX and WINDOWS. Thanks to the author..

  8. #6
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Thanks
    2
    Thanked 43 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSerialDevice v 0.2.0 released

    NEWS!

    QSerialDevice moved to Git: http://gitorious.org/qserialdevice

    Now the main line (master) and the development will be on Git!!!

  9. #7
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QSerialDevice v 0.2.0 released

    Cool. I've been using QextSerialPort, but it isn't without its problems. How is QSerialDevice different/better than QExtSerialPort? Why was it created?

  10. #8
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Thanks
    2
    Thanked 43 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSerialDevice v 0.2.0 released

    Cool. I've been using QextSerialPort, but it isn't without its problems.
    What's the problem with QextSerialPort?

    How is QSerialDevice different/better than QExtSerialPort?
    Difference is enormous. As in the very architecture of the library, and additional opportunities.
    There are only a small minus, which lies in the fact that at the moment fully supported by OS Win 2k/XP/Vista/7 + GNU / Linux. Other OS partially supported.
    More information you will find viewing the source code and documentation. And compare for yourself.

    Why was it created?
    Yes just like that! You will not believe it!
    I am not happy QextSerialPort. I could add a functional - but this would alter the entire architecture QextSerialPort. But then it was already not QextSerialPort - but something else!
    So I decided to create a new library from scratch.

    ----
    Another remark for all:
    Need help in implementation of native support for classes SerialDeviceWatcher and SerialDeviceInfo for MacOSX and other operating systems (if possible).
    It would be nice for that "steal" code from QextSerialPort - but I do not know MacOSX and I have no time! Still, it's summer - a summer to relax!

  11. #9
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QSerialDevice v 0.2.0 released

    Quote Originally Posted by kuzulis View Post
    What's the problem with QextSerialPort?
    I never got the enumerator to work properly, and also never got it working by listening for readyRead. It seems to only work using polling.

    More information you will find viewing the source code and documentation. And compare for yourself.
    Thanks, will do. I guess the other difference is that QextSerialPort is BSD or public domain instead of GPL...

  12. #10
    Join Date
    Jun 2010
    Posts
    18
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSerialDevice v 0.2.0 released

    I was able to get QSerialDevice working on linux and windows without too much trouble. I was only able to get QextSerialPort working on windows.

  13. #11

    Default problems compiling QSerialDevice under visual studio 2008

    Hello all,

    I'm trying to compile QSerialDevice v 0.2.0 on windows with VisualStudio 2008.
    * I've created a CMakeLists file (attached)
    * When I compile the project i have the two (similar) following errors:

    - in moc_serialdevicewatcher.cxx, I get a compiler error because I use the undefined type SerialDeviceWatcherPrivate in the function SerialDeviceWatcher::qt_metacall (the d_func() is supposed to return a SerialDeviceWatcherPrivate object)

    - in moc_serialdevicenotifier.cxx, I get a compiler error because I use the undefined type SerialNotifierPrivate in the function SerialNotifier::qt_metacall (the d_func() is supposed to return a SerialNotifierPrivate object)

    If in moc_serialdevicewatcher.cxx I replace the include file
    #include "../../qserialdevice/serialdevicewatcher.h"
    by the include file
    #include "../../qserialdevice/serialdevicewatcher_p.h" in

    And in moc_serialdevicenotifier.cxx I replace the include file
    #include "../../qserialdevice/serialnotifier.h" in
    by the include file
    #include "../../qserialdevice/serialnotifier_p.h"

    I can compile everything without problem. However I get linker errors like this :

    warning LNK4006: "public: virtual struct QMetaObject const * __thiscall SerialDeviceWatcher::metaObject(void)const " (?metaObject@SerialDeviceWatcher@@UBEPBUQMetaObjec t@@XZ) déjà défini dans moc_serialdevicewatcher.obj

    which i think suggest that i have problems with my .moc files

    Would anyone have some insight on why I get this compiler error and how I could compile the library correctly with MSVS2008 ?

    Thanks a lot,
    Best
    Attached Files Attached Files

  14. #12
    Join Date
    May 2009
    Posts
    75
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QSerialDevice v 0.2.0 released

    Quote Originally Posted by kuzulis View Post
    I just checked the compilation of: svn checkout svn://scm.fireforge.net/svnroot/qserialdevice
    and I have all good compile. OS ArchLinux x86_64.

    Try has make the so:
    - Remove from the project all Makefile, *. moc, *. obj files and then compile. (Or equivalent to do: # make distclean)
    I have the same problem, but also distcleaning the problem is still present.
    I am able to correclty compile the integrated library

    here is the project:
    http://dl.dropbox.com/u/7966431/testQSer.zip

    I run Ubuntu 9.10 64 bit, gcc 4.4.1, qt 4.5.2

    thanks


    Maybe I am wrong but I can check only tomorrow morning

    thanks
    Last edited by mastupristi; 13th September 2010 at 20:09. Reason: updated contents

  15. #13
    Join Date
    May 2009
    Posts
    75
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QSerialDevice v 0.2.0 released

    Quote Originally Posted by mastupristi View Post
    I have the same problem, but also distcleaning the problem is still present.
    I am able to correclty compile the integrated library

    here is the project:
    http://dl.dropbox.com/u/7966431/testQSer.zip

    I run Ubuntu 9.10 64 bit, gcc 4.4.1, qt 4.5.2

    thanks


    Maybe I am wrong but I can check only tomorrow morning
    Unfortunately I must confirm the problem, even if I delete all generated files:

    the errors are:
    Qt Code:
    1. Running build steps for project testQSer...
    2. Starting: "/usr/bin/qmake-qt4" /home/POWERSOFT/massimiliano/prog/testQser/testQSer/testQSer.pro -r -spec linux-g++ CONFIG+=debug
    3. The process "/usr/bin/qmake-qt4" exited normally.
    4. Starting: "/usr/bin/make" -w
    5. make: ingresso nella directory «/home/POWERSOFT/massimiliano/prog/testQser/testQSer-build-desktop»
    6. g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../testQSer -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I. -I../testQSer -I. -o main.o ../testQSer/main.cpp
    7. /usr/bin/moc-qt4 -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../testQSer -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I. -I../testQSer -I. ../testQSer/myclass.h -o moc_myclass.cpp
    8. g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../testQSer -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I. -I../testQSer -I. -o moc_myclass.o moc_myclass.cpp
    9. /usr/bin/moc-qt4 -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../testQSer -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I. -I../testQSer -I. ../testQSer/seriale/serialdevicewatcher.h -o moc_serialdevicewatcher.cpp
    10. g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../testQSer -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I. -I../testQSer -I. -o moc_serialdevicewatcher.o moc_serialdevicewatcher.cpp
    11. moc_serialdevicewatcher.cpp:12:2: error: #error "The header file 'serialdevicewatcher.h' doesn't include <QObject>."
    12. In file included from moc_serialdevicewatcher.cpp:10:
    13. ../testQSer/seriale/serialdevicewatcher.h:29: error: expected class-name before ‘{’ token
    14. ../testQSer/seriale/serialdevicewatcher.h:30: error: ‘Q_OBJECT’ does not name a type
    15. ../testQSer/seriale/serialdevicewatcher.h:36: error: expected ‘)’ before ‘*’ token
    16. ../testQSer/seriale/serialdevicewatcher.h:41: error: ‘QStringList’ does not name a type
    17. ../testQSer/seriale/serialdevicewatcher.h:47: error: ISO C++ forbids declaration of ‘Q_DECLARE_PRIVATE’ with no type
    18. ../testQSer/seriale/serialdevicewatcher.h:48: error: expected ‘;’ before ‘Q_DISABLE_COPY’
    19. ../testQSer/seriale/serialdevicewatcher.h:50: error: expected ‘;’ before ‘}’ token
    20. ../testQSer/seriale/serialdevicewatcher.h:44: warning: non-static const member ‘SerialDeviceWatcherPrivate* const SerialDeviceWatcher::d_ptr’ in class without a constructor
    21. moc_serialdevicewatcher.cpp:20: error: expected constructor, destructor, or type conversion before ‘static’
    22. moc_serialdevicewatcher.cpp:46: error: ‘QMetaObject’ does not name a type
    23. moc_serialdevicewatcher.cpp:51: error: expected initializer before ‘*’ token
    24. moc_serialdevicewatcher.cpp:56: error: no ‘void* SerialDeviceWatcher::qt_metacast(const char*)’ member function declared in class ‘SerialDeviceWatcher’
    25. moc_serialdevicewatcher.cpp:64: error: ‘int SerialDeviceWatcher::qt_metacall’ is not a static member of ‘class SerialDeviceWatcher’
    26. moc_serialdevicewatcher.cpp:64: error: ‘QMetaObject’ has not been declared
    27. moc_serialdevicewatcher.cpp:64: error: expected primary-expression before ‘int’
    28. moc_serialdevicewatcher.cpp:64: error: expected primary-expression before ‘void’
    29. moc_serialdevicewatcher.cpp:64: error: initializer expression list treated as compound expression
    30. moc_serialdevicewatcher.cpp:65: error: expected ‘,’ or ‘;’ before ‘{’ token
    31. make: uscita dalla directory «/home/POWERSOFT/massimiliano/prog/testQser/testQSer-build-desktop»
    32. make: *** [moc_serialdevicewatcher.o] Errore 1
    33. The process "/usr/bin/make" exited with code %2.
    34. Error while building project testQSer (target: Desktop)
    35. When executing build step 'Make'
    To copy to clipboard, switch view to plain text mode 

    my test project has been updated:
    http://dl.dropbox.com/u/7966431/testQSer.zip

    any idea?

    thanks
    Last edited by mastupristi; 14th September 2010 at 08:44.

  16. #14
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Thanks
    2
    Thanked 43 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSerialDevice v 0.2.0 released

    Try download current Git snapshot and rebuild library.
    Classes SerialDeviceWatcher and SerialDeviceInfo more is not supported (deprecated). Try class SerialDeviceEnumerator.

  17. #15
    Join Date
    Sep 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QSerialDevice v 0.2.0 released

    Hello, I´m using QT4.6.3 in conjunction with VS2008.... so i downloaded QSERIALDEVICE 2.0 and tried to compile the QserialDevice.Lib in the way documented in the file readme_en.txt....... so qmake BuildIntegr........... works fine....the when i type the command "make" ther appears the Error Message "makefile:83: *** missing separator. Stop" so the tree under the directory build stays nearly empty..... Do anyone have an Idea? Without the Lib there ist no way to try serial programming Thanks for every help -Ralf-

  18. #16
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Thanks
    2
    Thanked 43 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSerialDevice v 0.2.0 released

    2 rmeeh

    1. Try download from Git : http://gitorious.org/qserialdevice
    2. The current version (Git) is not 0.2.0! (It is closer to 0.3.0).
    3. Do not use "readme_en.txt" and etc.
    4. To build the library, use only "BuildLibrary.pro":
    #qmake BuildLibrary.pro
    #make
    (Preset project to build DEBUG or RELEASE)

  19. #17
    Join Date
    Sep 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QSerialDevice v 0.2.0 released

    Thank´s for your mail.
    I don´t have a cvs system in use, so i´m not able to download the sources.
    Is there no way to get a ZIP or rar archive with an actual snapshot? Normaly i develop small projects for Amateur Radio (technical things) so i don´t need a cvs. This time i need a serial asyncronus communication to an ATMEGA Microcontroller which controlls an Axis.......and i´ve never used a CVS in my life ;-)
    best Regards, -Ralf-

  20. #18
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Thanks
    2
    Thanked 43 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSerialDevice v 0.2.0 released

    2 rmeeh,

    You're not looking for and inconsiderate!

    Download here http://gitorious.org/qserialdevice/q...tarball/master

  21. #19
    Join Date
    Sep 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QSerialDevice v 0.2.0 released

    [QUOTE=kuzulis;158746]2 rmeeh,

    You're not looking for and inconsiderate!

    Thank´s very much, you´re right, how could i belive that you would not be prepeared..
    with a little trouble the library compiled using Visual Studio 2008
    Now the work will start understanding the classes.
    Have a nice weekend
    -Ralf-

Similar Threads

  1. QSerialDevice Problem
    By waynew in forum Qt Programming
    Replies: 8
    Last Post: 21st January 2010, 14:31
  2. QSerialDevice
    By clinisbut in forum Qt Programming
    Replies: 2
    Last Post: 23rd October 2009, 13:30
  3. [solved] QSerialDevice: How to set baudrate?
    By schlingel in forum Qt Programming
    Replies: 1
    Last Post: 14th October 2009, 11:52
  4. Library QSerialDevice v 0.1.0 released
    By kuzulis in forum Qt Programming
    Replies: 0
    Last Post: 15th September 2009, 06:47
  5. new library QSerialDevice
    By kuzulis in forum Qt Programming
    Replies: 2
    Last Post: 13th July 2009, 05:42

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.