apt-get install subversion g++ zlib1g-dev build-essential git python
apt-get install libncurses5-dev gawk gettext unzip file libssl-dev wget
git clone https://github.com/lede-project/source.git lede
cd lede
git checkout v17.01.2
echo "src-git modbusbridge https://github.com/Embedlynx/modbusBridge.git" >> feeds.conf
echo "src-git luci https://git.lede-project.org/project/luci.git" >> feeds.conf
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make menuconfig
Now select the right "Target System" and "Target Profile" for your device. For example, for VoCore2 select:
Target System --->
MediaTek Ralink MIPS
Subtarget --->
MT7628 based boards
Target Profile --->
VoCore VoCore2
Then build-in modbusbridge package, select:
Utilities --->
<*> modbusbridge
After that Save.
make -j4
The firmware images are now in bin/targets/____/____/*.bin
. In our example bin/targets/ramips/mt7628/lede-ramips-mt7628-vocore2-squashfs-sysupgrade.bin
.
Upload *-sysupgrade.bin
image to your device. You can use ssh, for example:
scp bin/targets/ramips/mt7628/lede-ramips-mt7628-vocore2-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/
And upgrade your device firmware:
root@LEDE:/# sysupgrade -v /tmp/lede-ramips-mt7628-vocore2-squashfs-sysupgrade.bin
/etc/init.d/modbusbridge enable
And reboot
reboot
There are two ways to configure the modbusbridge - in the web configuration or in the console.
Open your device web configuration:
sensible-browser 192.168.1.1
And go to:
Services
|-> Modbusbridge
Edit the configuration and click "Save and Apply". This will automatically reload the modbusbridge service.
Open /etc/config/modbusbridge
file.
vi /etc/config/modbusbridge
And edit the configuration. Then, you should manual restart the modbusbridge service:
/etc/init.d/modbusbridge reload