First, we need to deactivate the getty to serial port:
Code:
#sudo nano /etc/inittab
Scroll all the way down till you see:
Code:
#Spawn a getty on Raspberry Pi serial line
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
COMMENT THIS LAST LINE ADDING A
# BEFORE T0:23
Now open this file:
Code:
#sudo nano /boot/cmdline.txt
And remove all /dev/ttyAMA0 things in order to make the file look like this
Code:
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
The next step is to download pthsem and bcusdk and unzip it:
Code:
#cd /tmp
#wget http://optimate.dl.sourceforge.net/project/bcusdk/pthsem/pthsem_2.0.8.tar.gz
#wget http://dfn.dl.sourceforge.net/project/bcusdk/bcusdk/bcusdk_0.0.5.tar.gz
#tar xvfz pthsem_2.0.8.tar.gz
#tar xvfz bcusdk_0.0.5.tar.gz
Time to configure pthsem:
Code:
#cd pthsem-2.0.8
#./configure
#make
#sudo make install
Configure bcusdk:
Code:
#cd ../bcusdk-0.0.5
#export LD_LIBRARY_PATH=/usr/local/lib
#./configure --with-pth=yes --without-pth-test --enable-onlyeibd --enable-eibnetip --enable-eibnetiptunnel --enable-eibnetipserver --enable-ft12 --enable-usb
#make
#sudo make install
#echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf.d/bcusdk.conf
#sudo ldconfig
Add a route so the raspberry listen to 224.0.24.12 (Broadcast)
Code:
#sudo route add 224.0.23.12 dev eth0
Create log files
Code:
#sudo touch /var/log/eibd.log
#sudo chown $USER /var/log/eibd.log
Start EIBD (later I will add the startup script in order to start EIBD automatically)
Code:
#eibd -t 1023 -i -D -T -S --eibaddr=0.0.254 ft12:/dev/ttyAMA0