Z-Connector for Asus RT-N16 with Oleg's firmware compilation

Official announcements from Z-Wave.Me team. Check this forum to get information about new releases and bug fixes.
Post Reply
LA
Posts: 17
Joined: 19 Aug 2011 10:15

Z-Connector for Asus RT-N16 with Oleg's firmware compilation

Post by LA » 20 Sep 2011 23:08

The manual below is not complete and contains just preliminary steps.In order to execute commands listed below, you should connect to the router using Terminal or by SSH/Telnet (on Windows use PuTTY). You will also need to have /opt folder created and ipkg installed (last two links are in Russian!).Install packages required for Z-connector compilation:ipkg install libuclibc++
ipkg install buildroot
ipkg install coreutils
ipkg install makeInstall libraries needed for Z-Connector:ipkg install openssl-dev
ipkg install zlibWe also need to compile argtable library needed for Z-ConnectorInstall packages needed for argtable library compilation:ipkg install perl
ipkg install findutils
ipkg install grepdownload argtable sources (version 2.13 has been used in my case) and unpack thatgo to argtable directory (use your path) and configure it:cd /opt/argtable
GREP=/opt/bin/grep ./configure --target=mipsel-linux --build=mipsel-linux(GREP=/opt/bin/grep was used to define path to correct grep installed in /opt. May be you will not need this.)Make it and install:make
make installVerify that argtable libraries appeared at lib directory:ls -la /usr/local/lib/libargtable*(only libargtable2.so.0 is needed)In order to make these libraries visible to our Z-Connector program, run:export LD_LIBRARY_PATH=/usr/local/libAdd this folder to ld.so.conf file, so Z-Connector program will always know where to find them:echo /usr/local/lib >> /etc/ld.so.confZ-Connector compilationDownload Z-Connector archive and unpack in /opt/z-connectorGo to Z-Connector folder and delete Windows directory:rm -r WindowsModify Makefile by adding -L/usr/local/lib to EXTRA_LIBS line, so it will look like:EXTRA_LIBS = -L/usr/local/lib -lssl -largtable2 -lcryptoCompile:makeEnable automatic start (NOT COMPLETED SECTION!):echo /opt/z-connector/Run_Z-Agent.sh >> /usr/local/sbin/post-mountDrivers installation:Download modules package from ftp://core.dumped.ru/rt-n/ (choose the version in accordance with your firmware version). Note that driver name depends on the Z-Wave USB dongle hardware!Extract needed cp2101.ko fileInstall it:insmod /opt/kernel/drivers/usb/serial/cp2101.koenable automatic start (NOT COMPLETED SECTION!):echo "insmod /opt/kernel/drivers/usb/serial/cp2101.ko" >> /usr/local/sbin/post-mountVerify that everything works (run z-agent manually):CERT_DIR=/opt/z-connector/CertificatesDEVICE=/dev/ttyUSB0
./z-agent -d $DEVICE -s z-cloud.z-wave.me --cert=$CERT_DIR/cert.pem --key=$CERT_DIR/cert.key --cacert=$CERT_DIR/cacert.pemSave changes you've made (and files you've compiled) using:echo /etc/ld.so.conf >> /usr/local.filesflashfs save && flashfs commitReboot router :reboot 

Mihail2205
Posts: 11
Joined: 01 Nov 2011 14:13

ставлю по инструкции на

Post by Mihail2205 » 20 Sep 2011 23:08

ставлю по инструкции на чистую систему (после установки ipkg)

 прошивка 1.9.2.7-d-r2985[root@(none) root]$ uname -a
Linux (none) 2.4.37.11 #1 2011-05-20 00:33:19 MSD mips GNU/Linux
при попытке выполнить GREP=/opt/bin/grep ./configure --target=mipsel-linux --build=mipsel-linux[root@(none) argtable]$ GREP=/opt/bin/grep ./configure --target=mipsel-linux --build=mipsel-linuxchecking build system type... mipsel-unknown-linux-gnuchecking host system type... mipsel-unknown-linux-gnuchecking target system type... mipsel-unknown-linux-gnuchecking for a BSD-compatible install... /opt/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /opt/bin/mkdir -pchecking for gawk... gawkchecking whether make sets $(MAKE)... yeschecking for gcc... nochecking for cc... nochecking for cl.exe... noconfigure: error: in `/opt/argtable':configure: error: no acceptable C compiler found in $PATHSee `config.log' for more details.говорит что в системе нету компилятора.. 

User avatar
PoltoS
Posts: 3454
Joined: 26 Jan 2011 19:36

Не забыли сделать пункт 1?

Post by PoltoS » 20 Sep 2011 23:08

Нужно же поставить компилятор

Mihail2205
Posts: 11
Joined: 01 Nov 2011 14:13

в инструкции наверное стоит

Post by Mihail2205 » 20 Sep 2011 23:08

виноват, проглядел в логах что buildroot не поставилось сразу из-за конфликта с какой-то ранее установленной библиотекой.. помогла установка с флагом -force-overwrite

все работает спасибо!


-
кстати можно же сделать универсальный скрипт автоматической установки (по крайней мере под олеговскую прошивку, под все поддерживаемые ей роутеры разом), чтобы людей не мучить..

User avatar
PoltoS
Posts: 3454
Joined: 26 Jan 2011 19:36

Будем благодарны, если сделаете!

Post by PoltoS » 20 Sep 2011 23:08

Мы настоятельно рекомендуем всем пользователям делиться своими находками.

К сожалению у нас нет времени, чтоб компилировать наш софт под всё. Мы благодарны Андрею (LA_) за его описание, и будем рады видеть описание Ваших успехов здесь на форуме.

Mihail2205
Posts: 11
Joined: 01 Nov 2011 14:13

все по инструкции

Post by Mihail2205 » 20 Sep 2011 23:08

да вобщем-то все по инструкции сверху, только у меня ядро 2.4, как я писал выше (по инструкции 2.6) и USB-to-UART чип Prolific во "флешке", т.е. драйвер другой, а так все по инструкции

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest