
QSerialDevice
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
So, announces release: QSerialDevice 2.0
QSerialDevice – cross-platform library for serial devices based on Qt4.
Release 2.0 will be the last for the library QSerialDevice.
Recently the project (2.0 branch) has been accepted into Qt as an addon (renamed to QtSerialPort), therefore, the current Gitorious repository is no longer used, and his development frozen. Ie do not send more here merge requests, etc., his repository works only in r/o mode.
The new repository is now available here (only available to registered developers):
git clone ssh://codereview.qt-project.org:29418/playground/qtserialport.git
More see: http://qt-project.org/wiki/QtSerialPort
In the future, after the stabilization of the code will create a public repository QtSerialPort, which is an addon for Qt (LGPL + commercial).
Version history:
v 0.4.0 (Outdated)
v 0.3.0 (Outdated)
v 0.2.0 (Outdated)
v 0.1.0 (Outdated)
9 years ago
More changes.
9 years ago
More changes.
mastupristi
10 years ago
I have problem compiling examples.
I successfully compile the library. then I get an error on examples:
../../src/release//libqserialdevice.a(nativeserialengine_unix.o): In function `NativeSerialEnginePrivate::nativeSelect(int, bool, bool, bool*, bool*)':
nativeserialengine_unix.cpp:(.text+0x975): undefined reference to `qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*)'
collect2: ld returned 1 exit status
I run ubuntu linux 9.10 64 bit, gcc 4.4.1, qt 4.5.2
thanks
Report
kuzulis
10 years ago
1. Try download new snapshot (Today I made a lot of changes.)
2. For build in Qt 4.5.x you must replace "qt_safe_select" simply "select".
Report
mastupristi
10 years ago
I downloaded the git tree just few minutes ago.
I modified the file nativeserialengine_unix.cpp to change from qt_safe_select to select
then I successfully bult the library.
now I want to buold an example (serialdevicewatcher), so I cd into examples/serialdevicewatcher, I modify serialdevicewatcher.pro to change the INCLUDEPATH to ../../src/qserialdevicewatcher and QMAKE_LIBDIR ../../src/build/release (other wise make fails)
Now there is an error linking:
g++ -Wl,-O1 -o ../../build/bin/serialdevicewatcher/release/serialdevicewatcher ../../build/bin/serialdevicewatcher/obj/main.o ../../build/bin/serialdevicewatcher/obj/moc_myclass.o -L../../src/build/release -L/usr/lib -lqserialdevice -ludev -lQtCore -lpthread
../../build/bin/serialdevicewatcher/obj/main.o: In function `main':
main.cpp:(.text+0x13c): undefined reference to `SerialDeviceWatcher::SerialDeviceWatcher(QObject*)'
main.cpp:(.text+0x168): undefined reference to `SerialDeviceWatcher::setEnabled(bool)'
collect2: ld returned 1 exit status
it seems that inside library there is no SerialDeviceWatcher class.
How can I solve?
Report
kuzulis
10 years ago
Report
amanz
10 years ago
Report
kuzulis
10 years ago
Report
tridule
10 years ago
The compiler tells me that "PCVOID" is not declared, at line 632 in qserialdevice\nativeserialengine_win.cpp.
Could you tell me if I missed something or how I must define it to have the lib compile ?
Report
kuzulis
10 years ago
---
For interest - go look in the directory / include (or similar) of your compiler in all files *. h - text PCVOID. Will it be found? And in what files?
---
Question: what the compiler uses MinGW, MSVS, other?
Report
tridule
10 years ago
typedef const void *PCVOID;
sorry, I'm a bit tired :-)
Report
tridule
10 years ago
I have solved the problem by adding the line
#define const void PCVOID;
at the beginning of the file.
By the way, I'm using msvc2005, but I couldn't find the include directory since I'm a noob with this compiler (I usually use gcc. Sorry for that.
It seems that PCVOID is not declared by default with msvc2005, or I may have to include a specific header which I don't know.
Report
gakov
10 years ago
поведение всегда одно и то же
1. загрузились - нет ключей
2. подключили девайс - создаются ключи и записи в них
3. отключили девайс - удаляются записи, ключи остаются
Report
kuzulis
10 years ago
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Serenum]
???
Report
gakov
10 years ago
Report
kuzulis
10 years ago
Report
gakov
10 years ago
"Ура! Заработало!"
Report
gakov
10 years ago
"Ура! Заработало!"
Report
K4ELO
10 years ago
My app that uses the library needs to get a list of available ports so the user can choose a valid one. Otherwise working great and thanks for your efforts!
Report
kuzulis
10 years ago
-> QStringList SerialDeviceWatcher:: devicesAvailable ()
See documentation.
Report
K4ELO
10 years ago
Report
bugiii
10 years ago
Report
kuzulis
10 years ago
Report
gakov
10 years ago
Report
kuzulis
10 years ago
Те ветки реестра о которых вы говорите автоматически создаются при "втыкании" в USB (или другие разъемы) конверторов USB/Serial и т.п. и, соответственно, автоматически удаляются при "извлечении" устройства.
PS: используйте не 0.2.0 а SVN. Там самые последние обновления.
Report
kuzulis
10 years ago
Report
gakov
10 years ago
на SVN под debug`ом...
SerialDeviceWatcherPrivate::SerialDeviceWatcherPrivate()
-> function: openKey() returned false. Error!
Report