Results 1 to 4 of 4

Thread: Serial Port programming not working with any library

  1. #1
    Join Date
    Dec 2011
    Posts
    13
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Serial Port programming not working with any library

    I have downloaded the latest version of QT4 and the SDK and I am using it on Ubuntu 10.04.
    That is working perfectly OK.

    On studying all the forums and help online I could find out 3 projects that are used for accessing the serial port in QT.
    qextserialport, qserialdevice and a very lesser known qport.

    QEXTSERIALPORT:
    I have downloaded the qextserialport-1.1.tar.gz file and unzipped in a folder.
    THen i open the .pro file in directory and give Build All in the QT Creator.
    I get the following... and no DLL's are created.

    Starting /home/kpkale/Programs/Downloaded Examples/qextserialport/examples/event/event...
    /home/kpkale/Programs/Downloaded Examples/qextserialport/examples/event/event: error while loading shared libraries: libqextserialport.so.1: cannot open shared object file: No such file or directory
    /home/kpkale/Programs/Downloaded Examples/qextserialport/examples/event/event exited with code 127


    I am stuck up here as I did not get a valid solution to get this thing working...
    //************************************************** ****
    I also used another method as shown in this link
    http://code.google.com/p/aileron/sou...ers.wiki?r=324

    Here, first is could not understand how to differntly do "Manually build the qextserialport project." and moreover, I could not proceed to downloading the telem project... dont have experience on downloading using svn...


    QSERIALDEVICE:
    I have downloaded the tar file from this link.
    http://qt-apps.org/content/show.php?content=112039

    I unzipped it in a folder and then opened the BuildLIbaray.pro in QTCreator. WHen I give Build ALL It gives me a lot of errors and below.

    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp:35:25: error: libudev.h: No such file or directory
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp: In constructor 'SerialDeviceEnumeratorPrivate::SerialDeviceEnumer atorPrivate()':
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp:52: error: '::udev_new' has not been declared
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp:61: error: '::udev_monitor_new_from_netlink' has not been declared
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp:70: error: '::udev_monitor_filter_add_match_subsystem_devtype ' has not been declared
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp:71: error: '::udev_monitor_enable_receiving' has not been declared
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp:72: error: '::udev_monitor_get_fd' has not been declared
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp: In destructor 'virtual SerialDeviceEnumeratorPrivate::~SerialDeviceEnumer atorPrivate()':
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp:107: error: '::udev_monitor_unref' has not been declared
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp:110: error: '::udev_unref' has not been declared
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp: In member function 'SerialInfoMap SerialDeviceEnumeratorPrivate::updateInfo() const':
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp:158: error: '::udev_enumerate_new' has not been declared
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp:169: error: '::udev_enumerate_add_match_subsystem' has not been declared
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp:170: error: '::udev_enumerate_scan_devices' has not been declared
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp:172: error: '::udev_enumerate_get_list_entry' has not been declared
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp:174: error: 'udev_list_entry_foreach' was not declared in this scope
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp:174: error: expected ';' before '{' token
    qserialdeviceenumerator/serialdeviceenumerator_p_unix.cpp:252: error: expected '}' at end of input
    make[1]: Leaving directory `/home/kpkale/Programs/Downloaded Examples/qserialdevice-qserialdevice-new2/src'
    make[1]: *** [build/obj/serialdeviceenumerator_p_unix.o] Error 1
    make: Leaving directory `/home/kpkale/Programs/Downloaded Examples/qserialdevice-qserialdevice-new2'
    make: *** [sub-src-make_default] Error 2
    18:34:49: The process "/usr/bin/make" exited with code 2.
    Error while building project BuildLibrary (target: Desktop)
    When executing build step 'Make'

    How can I proceed with any one of them...

    I need to get one small application completed for I/O on serial port.

    KPKALE

  2. #2
    Join Date
    Oct 2007
    Location
    Lake Forest, CA, USA
    Posts
    132
    Thanks
    10
    Thanked 27 Times in 22 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: Serial Port programming not working with any library

    Install libudev-dev package to get libudev.h.
    Oleg Shparber

  3. #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: Serial Port programming not working with any library

    2 kpkale

    The version that you downloaded QSerialDevice - obsolete!
    Use version 2.0: http://gitorious.org/qserialdevice/q...ve-tarball/2.0

  4. #4
    Join Date
    Dec 2011
    Posts
    13
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Serial Port programming not working with any library

    Thanks oleg and kuzulis

    I will try both these things and post the results...


    Added after 45 minutes:


    Thanks Kuzulis

    This thread further helped me... got the serial working wuth the 2.0 library.

    http://developer.qt.nokia.com/forums/viewthread/12643
    Last edited by kpkale; 22nd December 2011 at 06:39.

Similar Threads

  1. Serial Port communication
    By mgurbuz in forum Qt Programming
    Replies: 12
    Last Post: 22nd January 2011, 03:38
  2. serial port programming
    By sujatashooter in forum Qt Programming
    Replies: 1
    Last Post: 29th November 2008, 16:51
  3. serial port programming in qt
    By sar_van81 in forum Qt Programming
    Replies: 46
    Last Post: 13th June 2007, 13:27
  4. Serial Port
    By b1 in forum Qt Programming
    Replies: 2
    Last Post: 18th January 2007, 03:05
  5. serial port and USB communication
    By shamik in forum Qt Programming
    Replies: 5
    Last Post: 4th December 2006, 11:40

Tags for this Thread

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.