Difference between revisions of "Startup Info For Developers"

From LinuxMCE
Jump to: navigation, search
m ('''First Steps in making your own device driver''' (WIP))
(Compile new changes in c++ code)
 
(29 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== '''First Steps in making your own device driver''' (WIP) ==
+
[[Category: Tutorials]]
 +
[[Category: Programmer's Guide]]
 +
{{versioninfo|810Status=relevant|810UpdatedDate=8 oct 2010|810UpdatedBy=golgoj4}}
 +
== '''First Steps in making your own device driver''' ==
  
  
 +
      sudo apt-get install pluto-dcegen pluto-sql2cpp build-essential subversion libmysqlclient15-dev
  
 
+
      cd /usr/src
1- cd /usr/src
+
 
       sudo mkdir lmce
 
       sudo mkdir lmce
       sudo chown linuxmce lmce
+
       sudo chown "youruser" lmce
 
       cd lmce
 
       cd lmce
  
2- svn co http://svn.linuxmce.org/svn/branches/LinuxMCE-810
+
      svn co http://svn.linuxmce.org/svn/branches/LinuxMCE-0810/
 +
 
 +
      cp /usr/pluto/lib/* /usr/src/lmce/LinuxMCE-0810/src/lib
 +
 
 +
These two lines are no longer needed as the source tree has been pre-prepped.
 +
      export SNR_LDFLAGS=" "
 +
      SNR_CPPFLAGS="-DKDE-LinuxMCE"
 +
 
 +
Create the template via WebAdmin (add new device?)
 +
 
 +
Sqlcvs update to DCE via WebAdmin
 +
 
 +
        cd to /usr/src/lmce/LinuxMCE-0810/src/DCEGen
 +
        and run DCEGen -d templatenumber
 +
 
 +
        run usr/src/lmce/LinuxMCE-0810/src/nameofdevice/sql2cpp
 +
 
 +
        cd /usr/src/lmce/LinuxMCE-0810/src/nameofdevice
 +
 
 +
      chmod +x post_make.sh and make bin
 +
 
 +
      cp /src/nameofdevice /usr/pluto/bin
  
3- cp /usr/pluto/lib/* /usr/src/lib
+
Add device via WebAdmin (advanced>configuration>devices)
  
4- export SNR_LDFLAGS=" "
+
== To Run the Device: ==
      export SNR_CPPFLAGS=" "
+
  
5- sudo apt-get install pluto-dcegen
+
      cd /usr/src/lmce/LinuxMCE-0810/src/nameofdevice 
      sudo apt-get install pluto-sql2cpp
+
      sudo apt-get install build-essential
+
  
6- make
+
    ./nameofdevice -r dcerouter -d devicenumber
  
7- Create the template via WebAdmin (add new device?)
 
  
8- Sqlcvs update to DCE via WebAdmin
+
== Compile new changes in c++ code ==
 +
Profile lines no longer needed
 +
    export SNR_LDFLAGS=" "
 +
    export SNR_CPPFLAGS="-DKDE-LinuxMCE"
 +
    (or insert the variables in the .profile file)
  
9-  run /usr/pluto/bin/DCEGen -d templatenumber
+
      cd /usr/src/lmce/LinuxMCE-0810/src/nameofdevice 
  
10-  run /usr/pluto/bin/sql2cpp
+
      make bin
  
11-  cd /src/nameofdevice
+
== Send Commands to Device: ==
  
  12- make bin
+
# Log in via WebAdmin
 +
# Goto Advanced->Configuration->Devices
 +
# Select your device on the left panel
 +
# Select "Send Command to Device" on the right pane
  
13- cp /src/nameofdevice /usr/pluto/bin
 
  
14- Add device via WebAdmin (advanced>configuration>devices)
 
  
  
Thanks to TSCHAKeee2
+
Big Thanks to TSCHAKeee2

Latest revision as of 21:04, 8 October 2010

Version Status Date Updated Updated By
710 Unknown N/A N/A
810 relevant 8 oct 2010 golgoj4
1004 Unknown N/A N/A
1204 Unknown N/A N/A
1404 Unknown N/A N/A
Usage Information

First Steps in making your own device driver

      sudo apt-get install pluto-dcegen pluto-sql2cpp build-essential subversion libmysqlclient15-dev
      cd /usr/src
      sudo mkdir lmce
      sudo chown "youruser" lmce
      cd lmce
      svn co http://svn.linuxmce.org/svn/branches/LinuxMCE-0810/
      cp /usr/pluto/lib/* /usr/src/lmce/LinuxMCE-0810/src/lib

These two lines are no longer needed as the source tree has been pre-prepped.

      export SNR_LDFLAGS=" "
      SNR_CPPFLAGS="-DKDE-LinuxMCE"

Create the template via WebAdmin (add new device?)

Sqlcvs update to DCE via WebAdmin

       cd to /usr/src/lmce/LinuxMCE-0810/src/DCEGen 
       and run DCEGen -d templatenumber
       run usr/src/lmce/LinuxMCE-0810/src/nameofdevice/sql2cpp
       cd /usr/src/lmce/LinuxMCE-0810/src/nameofdevice
      chmod +x post_make.sh and make bin
      cp /src/nameofdevice /usr/pluto/bin

Add device via WebAdmin (advanced>configuration>devices)

To Run the Device:

     cd /usr/src/lmce/LinuxMCE-0810/src/nameofdevice   
    ./nameofdevice -r dcerouter -d devicenumber


Compile new changes in c++ code

Profile lines no longer needed

    export SNR_LDFLAGS=" "
    export SNR_CPPFLAGS="-DKDE-LinuxMCE"
    (or insert the variables in the .profile file)
     cd /usr/src/lmce/LinuxMCE-0810/src/nameofdevice   
     make bin

Send Commands to Device:

  1. Log in via WebAdmin
  2. Goto Advanced->Configuration->Devices
  3. Select your device on the left panel
  4. Select "Send Command to Device" on the right pane



Big Thanks to TSCHAKeee2