USB Communication Using Qt
-
Hi. I have used rs232 communication in visual c++ 6.0
which work very well. But because of my problem with
transmit images trough socket in VC++ which is
too complicated than Qt implementation ( very simple ).
I need to implement rs232 comunication.
My interface have to use TCP socket for internet comunication and rs232 for comunicate with microcontroller
and electrical devices. -
Hi dan_geo, let me know if you get your RS232 comms working with Qt. I have had to shift focus to a different project but during the downtime over the December holidays and from Jan 2012 I will be putting effort into the USB via Qt project again since many of my projects can benefit from having a GUI that I can design with Qt. I decided not to go with the RS232 option because so many PCs these days don't have a serial port. USB to serial converters are cheap, but if I can communicate directly with my device using USB then I don't need any additional hardware / drivers etc.
Good luck! -
I have not get rs232 comm. Next days i will try to
implement them in Qt. If you are a source, please
sent to me. About usb, this task i will do later
with PIC18F4455. At usb i understand that
for make a host usb is more complicated than
implement a usb client for example a controller. -
What its the best to access USB port:
http://doc.qt.nokia.com/qtextended4.4/qserialport.html
http://code.google.com/p/qextserialport/
http://qt-apps.org/content/show.php/QSerialDevice?content=112039 (Updated)
Thanks.
-
According to "this post":http://qt-project.org/forums/viewthread/15580/#90074 there is a wiki on "QtSerialPort":http://qt-project.org/wiki/QtSerialPort Apparently, the source is inherited from QSerialDevice.
-
It's possible to use the QtSerialPort on QT4? On this page (see: http://qt-project.org/wiki/Building-Qt-5-from-Git#15e7b6ad3df43ff719f8388ab4afb1cc) show thats is possible but he only explains to build in qt5!
Anyone is using on QT4? The example there show only to build on Windows, not on linux...
-
Possible.
Build and install process:
bq. $mkdir serialport-build $cd serialport-build $qmake ../qtserialport/serialport.pro $make (or nmake) $make install (or nmake install) Note: But in Windows, this build and install only the Debug version. To build and install Release version - just repeat the steps again, with: bq. $qmake ../qtserialport/serialport.pro CONFIG+=release use: ~~~ your custom *.pro file: bq. CONFIG += serialport your *.cpp file: @#include <QtAddOnSerialPort/serialport.h> #include <QtAddOnSerialPort/serialportinfo.h> QT_USE_NAMESPACE_SERIALPORT@
-
hi kuzulis, from QtCreator I build and appears to works fine... Doing the make as you said give me an error...
I have already copy and past the folder "QtAddOnSerialPorta" to “../bin/QtSDK/Desktop/Qt/4.8.1/gcc/include/.” and QtCreator find the includes:@
#include <QtAddOnSerialPort/serialport.h>
#include <QtAddOnSerialPort/serialportinfo.h
@I'm trying to run the example on that page but doesn't works.... the errors:
"Undefined reference to 'QtAddOn::SerialPort::SerialPortInfo::avaliablePorts()'"
... (more others 14 similar erros) -
Sorry I made some mistake:
When I try to compile on Qt using 4.6.1 or using the make on shell It gives me this error:
moc_serialport.cpp:55:16: error: ‘SerialPort’ was not declared in this scope
On the QT 4.8.1 the Qt Creator gives the message:
...
#error (moc changes too much)
... -
Remove (clear) away all that you previously copied by hand and do as I have indicated in the "above":http://qt-project.org/forums/viewreply/90605/
-
See the errors:
@
...
...
...
/home/dvl/SOURCE_CODE/qtserialport/src -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I/home/dvl/SOURCE_CODE/qtserialport/src -I. -I/home/dvl/SOURCE_CODE/qtserialport/src -I. -o moc_serialport.o moc_serialport.cpp
moc_serialport.cpp:55:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:56:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:57:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:58:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:59:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:60:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:61:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:62:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:63:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:64:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:65:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:66:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:67:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:68:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:69:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:70:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:71:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:72:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:73:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:74:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:75:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:76:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:77:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:78:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:79:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:80:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:81:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:82:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:83:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:84:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:85:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:86:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:87:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:88:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:89:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:90:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:91:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:92:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:93:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:94:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:95:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:96:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:97:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:98:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:99:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:100:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:101:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:102:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:103:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:104:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:105:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:106:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:107:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:108:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:109:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:110:16: error: ‘SerialPort’ was not declared in this scope
moc_serialport.cpp:142:19: error: ‘SerialPort’ has not been declared
moc_serialport.cpp:151:20: error: ‘SerialPort’ has not been declared
moc_serialport.cpp:151:45: error: non-member function ‘const QMetaObject* metaObject()’ cannot have cv-qualifier
/usr/include/QtCore/qobject.h: In function ‘const QMetaObject* metaObject()’:
/usr/include/QtCore/qobject.h:296:33: error: ‘QScopedPointer<QObjectData> QObject::d_ptr’ is protected
...
...
...
@ -
I do not know what you did - but I have everything working well.
1.To start, try to remove all the headers, libraries, etc. QtSerialPort of the your *nix OS.
2. Download the latest version of the library
3. Build and install library to the system step-by-step, see an new updated manual in the Wiki.
4. Create a new blank project and include the library as stated in the WikiMore anything, I can not help you, because I can not control all of your "curves" action.