Welcome to TP-LINK Tech Support Forum
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Junior Member Creative! is on a distinguished road
    Join Date
    Aug 2017
    Posts
    2

    Cool EAP controller software on a Raspberry Pi?

    Model :

    Hardware Version :

    Firmware Version :

    ISP : [/COLOR]

    I wanted to ask if the controller software is running on a Rasbarry Py (under Snappy Ubuntu Core), since I can get so much power, and have a durging disposition. On the Rasbarry is echoing only a Slimmed version of Ubuntu.


    Thanks in advance for the answer!

  2. #2
    Members R1D2 is on a distinguished road
    Join Date
    Dec 2015
    Posts
    1,009
    Probably it could run on a Pi 3 Model B, but limitation still would be the Pi's RAM. I doubt that it would be much fun to run the EAPC on it.

  3. #3
    I just tried this and unfortunately it doesn't work. TP-Link has not compiled the binaries included in the install package for ARM processors, which is what Raspberry Pis use. I wish they do this, because that would be a very nice power efficient way to manage the APs.

    FYI, I tested on the Raspberry Pi Zero W with Raspbian Stretch and received the following error during installation:

    Code:
    /opt/tplink/EAPController/bin/portt: Cannot execute binary file: Exec format error

  4. #4
    Unfortunately, before memory, the restriction comes from the binaries that are not compiled for ARM processors. I was hoping it would work, since they seems to have a Java requirement. Some of the utilities during the installation are not compiled for ARM. I tried this on a Raspberry Pi Zero W on Raspbian Stretch and recievied Exec format error. I wish TP-Link would make their software cross-platform.

  5. #5
    Members R1D2 is on a distinguished road
    Join Date
    Dec 2015
    Posts
    1,009
    It makes not much sense to compile SW for tiny SoC boards if the boards don't meet all other requirements to run the controller.

  6. #6
    Hi all!
    I am working on a solution and I have got some promising results on a raspberry pi zero W.
    I will write a full post on my solution once I have got it to work reliably.

    In the mean time, here are some hints.

    /opt/tplink/EAPController/bin/portt: Cannot execute binary file: Exec format errorThis error is due to the portt binary which is for x86 architecture whereas the raspberry pi has an arm architecture.
    The portt binary is only used in file controller.sh, you can replace the call in controller.sh or skip it and replace it with a long delay.

    The included jre is for x86. You will have to replace it with the raspberry's. The raspberry's jre doesn't support -server option, you have to replace it with the -client option.

    The controller also uses mongodb, you have to replace the binaries by the raspberry's.

    I have managed to make it work, just wait a few days and I will publish a full patch for the raspberry

  7. #7
    Hi there, will follow this closely as the possibility of running the EAP Controller on a Raspberry Pi (3 model B in my case) would definitely be very interesting

  8. #8

    EAP Controller on a Raspberry Pi!

    Hi!

    Hi there, will follow this closely as the possibility of running the EAP Controller on a Raspberry Pi (3 model B in my case) would definitely be very interesting :)
    I have not tested on a Raspberry Pi 3 model B. It works successfully on a Raspberry Pi zero W and it fails on a Raspberry Pi 2 model B, must likely because it runs out of memory.

    Using a script
    I have made a simple script for you to install the eap controller on a Raspberry Pi: https://gist.github.com/Arth-ur/ea1a...196c3490af6d99
    On raspbian, simply log in using ssh and type:
    Code:
    wget https://gist.githubusercontent.com/Arth-ur/ea1a6709055cec3dab196c3490af6d99/raw/a0283f963f42a4c7a50200fa092cb3f2df87f1cb/eap-controller-pi.sh
    chmod +x eap-controller-pi.sh
    sudo ./eap-controller-pi.sh
    Manual Install
    Step-by-step explanation:

    Replace the portt tool by a bash command in /opt/tp-link/tpeap/bin/controller.sh :
    line
    Code:
    ${PORTT_TOOL} 127.0.0.1 8088 500
    should be
    Code:
    netstat -plnt | grep :::8088
    .
    Install java with
    Code:
    sudo apt-get install oracle-java7-jdk
    then in bin/controller.sh, replace line
    Code:
    JAVA_TOOL=${JRE_HOME}/bin/java
    by
    Code:
    JAVA_TOOL=/usr/bin/java
    .
    Then on a Raspberry Pi zero W, replace:
    Code:
    nohup $JAVA_TOOL -server -Xms128m -Xmx1024m -XX:MaxHeapFreeRatio=60 -XX:MinHeapFreeRatio=30 -XX:+UseSerialGC -XX:+HeapDumpOnOutOfMemoryError -Deap.home="${eapHome}" -cp ${eapHome}"/lib/com.tp-link.eap.start-0.0.1-SNAPSHOT.jar:"${eapHome}"/lib/*:"${eapHome}"/external-lib/*" com.tp_link.eap.start.EapMain start > ${eapHome}/logs/startup.log 2>&1 &
    by
    Code:
    nohup $JAVA_TOOL -client -Xms128m -Xmx1024m -XX:MaxHeapFreeRatio=60 -XX:MinHeapFreeRatio=30 -XX:+UseSerialGC -XX:+HeapDumpOnOutOfMemoryError -Deap.home="${eapHome}" -cp ${eapHome}"/lib/com.tp-link.eap.start-0.0.1-SNAPSHOT.jar:"${eapHome}"/lib/*:"${eapHome}"/external-lib/*" com.tp_link.eap.start.EapMain start > ${eapHome}/logs/startup.log 2>&1 &
    On a raspberry pi 2, this change is not needed. Maybe it is on a raspberry pi 3, I could not test it.

    Finally, replace the mongodb binaries:
    Code:
    sudo apt-get install mongodb
    cd /opt/tplink/EAP_Controller/bin
    rm mongo mongod
    ln -s /usr/bin/mongo mongo
    ln -s /usr/bin/mongod mongod
    And use a tool such as rcconf to disable the mongodb service at startup and enable the tpeap service at startup.
    I have written a more in-depth explanation here: https://medium.com/@arthurgay/eap-co...i-9e93ecd1672e


    ================================================== ===

    On my raspberry pi zero W, it can take up to 10 minutes to start, so be patient :)

    I have been asked to install the same system on another site later this year, so I will try to clean it a bit.
    I don't think it is a good idea to use a Raspberry Pi zero W for this task, because it is wirelessy connected to the network and there is a risk to disconnect the raspberry pi if one change the wifi network in the eap controller settings.
    A raspberry pi 3 would be a better alternative because of the eternet connection but it is more expensive. I am going to try using an orange pi instead.

    It was very interesting to work on this project, I hope some of you will find it useful !

  9. #9
    Thank you so much for posting this! I agree that using the Raspberry Pi Zero W wirelessly is not a good idea, especially since we are managing the very AP that it might be connected to. I use the Raspberry Pi Zero W with an USB OTG cable with a USB Ehternet adapter. This allows it to be wired.

    Quote Originally Posted by arzul View Post
    Hi!


    I have not tested on a Raspberry Pi 3 model B. It works successfully on a Raspberry Pi zero W and it fails on a Raspberry Pi 2 model B, must likely because it runs out of memory.

    Using a script
    I have made a simple script for you to install the eap controller on a Raspberry Pi: https://gist.github.com/Arth-ur/ea1a...196c3490af6d99
    On raspbian, simply log in using ssh and type:
    Code:
    wget https://gist.githubusercontent.com/Arth-ur/ea1a6709055cec3dab196c3490af6d99/raw/a0283f963f42a4c7a50200fa092cb3f2df87f1cb/eap-controller-pi.sh
    chmod +x eap-controller-pi.sh
    sudo ./eap-controller-pi.sh
    Manual Install
    Step-by-step explanation:

    Replace the portt tool by a bash command in /opt/tp-link/tpeap/bin/controller.sh :
    line
    Code:
    ${PORTT_TOOL} 127.0.0.1 8088 500
    should be
    Code:
    netstat -plnt | grep :::8088
    .
    Install java with
    Code:
    sudo apt-get install oracle-java7-jdk
    then in bin/controller.sh, replace line
    Code:
    JAVA_TOOL=${JRE_HOME}/bin/java
    by
    Code:
    JAVA_TOOL=/usr/bin/java
    .
    Then on a Raspberry Pi zero W, replace:
    Code:
    nohup $JAVA_TOOL -server -Xms128m -Xmx1024m -XX:MaxHeapFreeRatio=60 -XX:MinHeapFreeRatio=30 -XX:+UseSerialGC -XX:+HeapDumpOnOutOfMemoryError -Deap.home="${eapHome}" -cp ${eapHome}"/lib/com.tp-link.eap.start-0.0.1-SNAPSHOT.jar:"${eapHome}"/lib/*:"${eapHome}"/external-lib/*" com.tp_link.eap.start.EapMain start > ${eapHome}/logs/startup.log 2>&1 &
    by
    Code:
    nohup $JAVA_TOOL -client -Xms128m -Xmx1024m -XX:MaxHeapFreeRatio=60 -XX:MinHeapFreeRatio=30 -XX:+UseSerialGC -XX:+HeapDumpOnOutOfMemoryError -Deap.home="${eapHome}" -cp ${eapHome}"/lib/com.tp-link.eap.start-0.0.1-SNAPSHOT.jar:"${eapHome}"/lib/*:"${eapHome}"/external-lib/*" com.tp_link.eap.start.EapMain start > ${eapHome}/logs/startup.log 2>&1 &
    On a raspberry pi 2, this change is not needed. Maybe it is on a raspberry pi 3, I could not test it.

    Finally, replace the mongodb binaries:
    Code:
    sudo apt-get install mongodb
    cd /opt/tplink/EAP_Controller/bin
    rm mongo mongod
    ln -s /usr/bin/mongo mongo
    ln -s /usr/bin/mongod mongod
    And use a tool such as rcconf to disable the mongodb service at startup and enable the tpeap service at startup.
    I have written a more in-depth explanation here: https://medium.com/@arthurgay/eap-co...i-9e93ecd1672e


    ================================================== ===

    On my raspberry pi zero W, it can take up to 10 minutes to start, so be patient

    I have been asked to install the same system on another site later this year, so I will try to clean it a bit.
    I don't think it is a good idea to use a Raspberry Pi zero W for this task, because it is wirelessy connected to the network and there is a risk to disconnect the raspberry pi if one change the wifi network in the eap controller settings.
    A raspberry pi 3 would be a better alternative because of the eternet connection but it is more expensive. I am going to try using an orange pi instead.

    It was very interesting to work on this project, I hope some of you will find it useful !


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Copyright 1996-2017 TP-LINK Technologies Co., Ltd. All rights reserved.