[Update] Omada Controller 3.2.1 for Debian, Raspbian and any other Linux system

[Update] Omada Controller 3.2.1 for Debian, Raspbian and any other Linux system
[Update] Omada Controller 3.2.1 for Debian, Raspbian and any other Linux system
2019-06-02 13:44:02 - last edited 2019-08-12 13:27:54

Last Update: 2019-07-28

 

I just made a .deb package with Omada Controller 3.2.1 for Debian, Raspbian and any other Linux system providing the dpkg installer.

 

This .deb package is in the tradition of the community version of Omada Controller, meaning it contains the same Java classes and remaining files as the official TP-Link version except for the binaries bundled with it (JRE, mongodb) and the start/stop script control.sh (which is replaced by my own version omadactl).

 

Prerequisites

You will need netstat (package: net-tools), curl and the native versions of JRE, jsvc and mongod (installed by default in Raspbian based on Stretch, unfortunately not so in Debian). Setting up the Oracle JRE and jsvc is left to you as an exercise; here are some suggestions:

 

Debian and any other Linux distribution:

Install mongodb from the standard repository and JRE8 from Oracle's website. As for jsvc, don't use the Debian binary package, it requires OpenJDK last time I checked this. Instead, get the source code for jsvc (command apt-get source jsvc), compile it and install jsvc manually. Sorry for this inconvenience, but TP-Link decided to use jsvc for Privilege Separation rather than the much more common standard start-stop-daemon or daemonize programs already present on almost any Linux system. Don't blame me for this – omadactl still can use both methods, but you need to use jsvc for Omada Controller versions starting with V3.0.2.

 

Raspbian (see »Limitations« below):

Oracle JRE8, jsvc and mongodb are pre-installed by default in Raspbian (make sure you did not explicitly choose OpenJDK as an alternative for the Oracle JRE). You can easily check whether the required programs are installed on your Raspbian:

 

$ java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)
$
update-java-alternatives -l
jdk-8-oracle-arm32-vfp-hflt    318        /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt
$
mongod -version
db version v2.4.14
Sun Jun  2 15:12:09.409 git version: nogitversion

 

Donwload the all-architectures .deb package

Connect via ftp (not a web browser) to ftp.rent-a-guru.de, use passive mode. Log in using anon ftp (username: anonymous, Password: your mail address). Once connected, change directory to /private. You won't see any files therein, it's a private directory. Just issue the command:

 

get omada-controller_3.2.1-1_all.deb

 

to download the file. Compute and compare the checksum of the downloaded .deb file:

 

md5sum: d39cf9c1f503419d309db29f74b3e93e *omada-controller_3.2.1-1_all.deb

sha256sum: d99d3209f7827d14518ba2258a33d90e4a6a5fac0d74a07d8712f1c40ddeb980 *omada-controller_3.2.1-1_all.deb

 

 

Installation

First, make a backup of your Omada Controller's settings before installing. Either use the web UI or copy the whole content of the subdirectory data in /opt/tplink/OmadaController to a backup directory. You can later move the data directory back into the new controller version.

 

Install the new version of Omada Controller with:

 

dpkg -i omada-controller_3.2.1-1_all.deb

 

After a successful installation the controller will be started automatically.

 

Notes:

  • Ignore the warnings from dpkg about some directories which can't be deleted. dpkg will remove files from older versions of the same package omada-controller, but it won't delete the old database directory (unless you do a manual purge before installing). This means that your database and settings from previous versions of Omada Controller will be retained - you can copy the files in the data subdirectory over to the new version. See »Restoring Omada Controller settings« below.
  • Installation directory is /opt/tplink/OmadaController-3.2.1. The symlink /opt/tplink/OmadaController is a short-hand alias to the installation directory.
  • Start/stop script has been renamed from tpeap to omadactl (deprecated tpeap is still there, it's a symlink to omadactl).
  • If installing using dpkg, you won't be able to switch between versions of Omada Controller using omadactl's switch command.
  • Some options of omadactl have no effect with only one version of the controller installed, that is if you install the .deb-Package. dpkg will override the old version before installing the new one. However, since the installation directoy reflects the version (intentionally!), you find all settings in the data subdirectory of the old version's installation directory. See »Restoring Omada Controller settings« below.
  • On my RasPi the start of the controller needs up to 69 seconds. You might want to increase the standard time-out (70 sec.) for starting the controller if it needs more time on your RasPi (time depends on other active processes during the start). To change the default time-out, use omadactl -S num, where num is the new time-out in seconds. This command will store the new time-out permanently in omadactl's config file and exits immediately (without starting Omada Controller).

 

Restoring Omada Controller settings

 

There is an easy way to restore your controller's settings using omadactl. Let's say you want to update Omada Controller 3.1.13 to 3.2.1. The directory OmadaController-3.1.13 will be cleaned by dpkg before it installs the new version in a new directory OmadaController-3.2.1. However, user files will be retained (dpkg prints warnings about which directories are not removed). Now stop the new controller using omadactl stop and run the command:

 

omadactl copydb OmadaController-3.1.13 OmadaController-3.2.1

 

This will copy all settings under the data subdirectory from the old version to the new version. Restart the controller and you will see all your EAPs, settings, maps etc. If everything works, you can safely remove the old directory using rm -rf OmadaController-3.1.13.

 

Limitations

 

Keep in mind that under Rasbian, which still is a 32-bit OS for compatibility with older Pis, mongodb has a 2GB limit for the total size of the database. You could compile a 64-bit kernel and userland programs to get rid of this limit. 

 

More information

 

For help with omadactl see its manpage attached to this post or use the command: man omadactl

 

For customization of omadactl see the config file /etc/default/omada.

 

For selection of the correct JRE and the starting method for the controller (either jsvc or standard Unix/Linux daemonizers) see file CONFIG in /opt/tplink/OmadaController.

 

For a list of all files installed by the .deb package use the command: dpkg -L omada-controller

 

If you want to uninstall and remove all files of this .deb package from your system, use the command: dpkg -P omada-controller

 

 

Have fun!

 

 

File:
omadactl-manual.pdfDownload
༺ 0100 1101 0010 10ཏ1 0010 0110 1010 1110 ༻
6
6
#1
Options
1 Accepted Solution
Re:Re:Omada Controller 3.1.13 for Debian, Raspbian and any other Linux system-Solution
2019-06-04 21:37:59 - last edited 2019-07-18 11:47:40

Grbz wrote

bu if i look the status, omada controller is not running.

do you have any idea what i'm doing wrong?

 

What RasPi model do you use?

 

Run the following commands to see debug and error messages from the server. It usually prints the reason why it can't be started:

 

sudo killall java

sudo killall mongod

sudo omadactl -w -v start

 

༺ 0100 1101 0010 10ཏ1 0010 0110 1010 1110 ༻
Best Solution
1
1
#4
Options
37 Replies
Re:Omada Controller 3.1.13 for Debian, Raspbian and any other Linux system
2019-06-04 20:25:04

 

.deb packages is good installed without errors.

 

bu if i look the status, omada controller is not running.

do you have any idea what i'm doing wrong?

 

thx

0
0
#3
Options
Re:Re:Omada Controller 3.1.13 for Debian, Raspbian and any other Linux system-Solution
2019-06-04 21:37:59 - last edited 2019-07-18 11:47:40

Grbz wrote

bu if i look the status, omada controller is not running.

do you have any idea what i'm doing wrong?

 

What RasPi model do you use?

 

Run the following commands to see debug and error messages from the server. It usually prints the reason why it can't be started:

 

sudo killall java

sudo killall mongod

sudo omadactl -w -v start

 

༺ 0100 1101 0010 10ཏ1 0010 0110 1010 1110 ༻
Best Solution
1
1
#4
Options
Re:Re:Re:Omada Controller 3.1.13 for Debian, Raspbian and any other Linux system
2019-06-07 09:38:38

Grbz, did you solve the problem?

༺ 0100 1101 0010 10ཏ1 0010 0110 1010 1110 ༻
0
0
#6
Options
Re:Re:Re:Re:Omada Controller 3.1.13 for Debian, Raspbian and any other Linux system
2019-06-18 06:42:18
Yes, thx man!! when i reboot the pi, omada controller startsup auto.. since i change my wifi network name, it will not start auto. rc.local is ok with the command: sudo omadactl -w start & thx for everything!!
0
0
#7
Options
Re:Omada Controller 3.1.13 for Debian, Raspbian and any other Linux system
2019-06-27 07:25:21

Hi all

How many AP can manage Raspberry Pi 3 or 4 version? anybody have this information?

What will be more profitable to buy, os200 or Raspberry Pi?

0
0
#8
Options
Re:Omada Controller 3.1.13 for Debian, Raspbian and any other Linux system
2019-07-17 13:46:16

works like a charm, thanks R1D2

0
0
#12
Options
Re:Omada Controller 3.1.13 for Debian, Raspbian and any other Linux system
2019-07-17 19:54:04
Installation works well. Great idea at all! Just forgot the jsvc before. Struggling now with apt-get source jsvc E: You must put some source URI's in Your sources list. Could someone just help me on that? Thank's. Tilo
0
0
#13
Options
Re:Omada Controller 3.1.13 for Debian, Raspbian and any other Linux system
2019-07-17 20:59:47 - last edited 2019-07-17 21:06:14

Tryin to get this running on my Raspberry Pi 3B+ and my java and mongod versions are the same as you posted, but I get the following eror when installating the package:

 

root@raspberrypi:/home/pi# dpkg -i omada-controller_3.1.13-1_all.deb
Selecting previously unselected package omada-controller.
(Reading database ... 81160 files and directories currently installed.)
Preparing to unpack omada-controller_3.1.13-1_all.deb ...
Unpacking omada-controller (3.1.13-1) ...
Setting up omada-controller (3.1.13-1) ...
[info] /etc/init.d/omadad: could not find the Java launcher 'jsvc'..
Processing triggers for systemd (232-25+deb9u9) ...
 

 

Edit: Nevermind, just had to do apt-get install jsvc and it worked! Thanks!

0
0
#14
Options
Re:Re:Omada Controller 3.1.13 for Debian, Raspbian and any other Linux system
2019-07-17 21:03:47

Tilo wrote

Installation works well. Great idea at all! Just forgot the jsvc before. Struggling now with apt-get source jsvc E: You must put some source URI's in Your sources list. Could someone just help me on that? Thank's. Tilo

 

Hi Tilo,

 

jsvc is part of Apache's Commons Daemon. Search for commons-daemon, donwload the source. Go into the jsvc src subdirectory, compile and install only the jsvc binary, not the comons daemon Java classes (they are in the TP-Link classes already).

 

Hope this helps.

༺ 0100 1101 0010 10ཏ1 0010 0110 1010 1110 ༻
1
1
#15
Options
Re: Omada Controller 3.1.13 for Debian, Raspbian and any other Linux system
2019-07-17 21:08:18 - last edited 2019-07-17 21:34:34

TP4MyWifi wrote


[info] /etc/init.d/omadad: could not find the Java launcher 'jsvc'.. 

 

Hi TP4MyWifi,

 

your Raspbian lacks jsvc. Try to install it (apt-get install jsvc). It usually comes pre-installed with latest Raspbian last time I checked.

༺ 0100 1101 0010 10ཏ1 0010 0110 1010 1110 ༻
1
1
#16
Options