Docker Environment (qthread): https://hub.docker.com/r/ryanjh31011/qthread/
- [Ubuntu 16.04] docker run -v ~/Desktop/qthread/ryan:/home/ryan -d -P ryanjh31011/qthread:Ubuntu16.04_latest /usr/sbin/sshd -D
- [Raspberry Pi2] docker run -v ~/Desktop/qthread/ryan:/home/ryan -d -P ryanjh31011/qthread:RaspberryPi2_latest /usr/sbin/sshd -D
- ssh -p 32779 [email protected] #The Port and IP address should be set accordantly
- adduser ryan #Add your user account
- adduser ryan sudo
- su - ryan #Switch to your account
- git clone https://github.com/ryanjh/qthread.git
- cd qthread/
Qt5 Run-time Environment (Raspberry Pi2):
- download lib/qt5pi_rpi2.tar.gz cross-compiled share libraries to target board
- tar zxvf lib/qt5pi_rpi2.tar.gz
- export LD_LIBRARY_PATH=qt5pi/lib/
Build (GitHub libqthread.a) https://github.com/ryanjh/qthread/tree/qthread_library/src
-
[Ubuntu 16.04] Build debugging library (build/qthread/libqthread.a)
/opt/Qt/5.8/gcc_64/bin/qmake -o build/qthread/Makefile qthread.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
-
[Raspberry Pi2] Build debugging library (build/qthread/libqthread.a)
/opt/qtrpi/bin/qmake-qtrpi -o build/qthread/Makefile qthread.pro -spec devices/linux-rasp-pi2-g++ CONFIG+=debug CONFIG+=qml_debug
-
make -C build/qthread/
Build (GitHub qt_console): https://github.com/ryanjh/qthread/tree/master/qt_console
-
[Ubuntu 16.04] Link to debugging library (build/qthread/libqthread.a)
/opt/Qt/5.8/gcc_64/bin/qmake -o build/qt_console/Makefile example/qt_console/qt_console.pro -spec linux-g++ CONFIG+=debug_lib CONFIG+=debug CONFIG+=qml_debug
-
[Raspberry Pi2] Link to debugging library (build/qthread/libqthread.a)
/opt/qtrpi/bin/qmake-qtrpi -o build/qt_console/Makefile example/qt_console/qt_console.pro -spec devices/linux-rasp-pi2-g++ CONFIG+=debug_lib CONFIG+=debug CONFIG+=qml_debug
-
make -C build/qt_console/
Release qthread library:
Test Steps [Ubuntu16.04]:
- Create two devices, one becomes leader and the other one becomes child->router
(Docker Container 1) ./build/qt_console/qt_console 2
- Create threes devices connecting to the leader of container 1, All child->router
(Docker Container 2) ./build/qt_console/qt_console 3 5
Test Steps [Raspberry Pi2]:
- Create leader devices
(Ubuntu Laptop) ./qt_console
- Create a child device connected to the leader
(Raspberry Pi2) ./qt_console 1 2
(Appendix) Install qthread library [deprecated]
- sudo make -C build/qthread/ install #Install /usr/local/lib/qthread/libqthread.a
(Appendix) Link to installed library (/usr/local/lib/qthread/libqthread.a) [deprecated]
- /opt/Qt/5.8/gcc_64/bin/qmake -o build/qt_console/Makefile example/qt_console/qt_console.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
- make -C build/qt_console/