Skip to content
/ qthread Public

An open source project for headed devices to manage Thread mesh network easily

Notifications You must be signed in to change notification settings

ryanjh/qthread

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Qthread = Qt + OpenThread

Architecture

Docker Environment (qthread): https://hub.docker.com/r/ryanjh31011/qthread/

  1. [Ubuntu 16.04] docker run -v ~/Desktop/qthread/ryan:/home/ryan -d -P ryanjh31011/qthread:Ubuntu16.04_latest /usr/sbin/sshd -D
  2. [Raspberry Pi2] docker run -v ~/Desktop/qthread/ryan:/home/ryan -d -P ryanjh31011/qthread:RaspberryPi2_latest /usr/sbin/sshd -D
  3. ssh -p 32779 [email protected] #The Port and IP address should be set accordantly
  4. adduser ryan #Add your user account
  5. adduser ryan sudo
  6. su - ryan #Switch to your account
  7. git clone https://github.com/ryanjh/qthread.git
  8. cd qthread/

Qt5 Run-time Environment (Raspberry Pi2):

  1. download lib/qt5pi_rpi2.tar.gz cross-compiled share libraries to target board
  2. tar zxvf lib/qt5pi_rpi2.tar.gz
  3. export LD_LIBRARY_PATH=qt5pi/lib/

Build (GitHub libqthread.a) https://github.com/ryanjh/qthread/tree/qthread_library/src

  1. [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

  2. [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

  3. make -C build/qthread/

Build (GitHub qt_console): https://github.com/ryanjh/qthread/tree/master/qt_console

  1. [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

  2. [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

  3. make -C build/qt_console/

Release qthread library:


Test Steps [Ubuntu16.04]:

  1. Create two devices, one becomes leader and the other one becomes child->router

(Docker Container 1) ./build/qt_console/qt_console 2

  1. 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]:

  1. Create leader devices

(Ubuntu Laptop) ./qt_console

  1. Create a child device connected to the leader

(Raspberry Pi2) ./qt_console 1 2


(Appendix) Install qthread library [deprecated]

  1. 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]

  1. /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
  2. make -C build/qt_console/

About

An open source project for headed devices to manage Thread mesh network easily

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published