How to: Update Platform
Update NRMK Cancape and can software
WARNING: doing the following jobs may change your platform behavior. Since this update will disable the I2C2 module for CAN0, your BBB may not automatically recognize other Capes anymore. Besides, after applying the update script, your BBB may automatically reboot, please save and exit other working jobs before doing the update.
There are two methods to update the CAN modules for NRMK/Platform, ONLINE and OFFLINE.
Use this method if your NRMK/Platform BBB is connected to internet
- If you have the script file "online-canupdate.sh", input the following command to the terminal:
chmod +x online-canupdate.sh ./online-canupdate.sh
- If you do not have any thing except the internet connection, type the following lines to terminal(these are actually the content of "online-canupdate.sh" script file):
wget http://www.neuromeka.com/NRMKPlatform/update/cancape-update.tar.bz2 tar -xjvf cancape-update.tar.bz2 cd cancape-update chmod +x can-update.sh ./can-update.sh
In order to use this updating method, you must have the update package "cancape-update.tar.bz2"
- If you have the script file "offline-canupdate.sh" saved in the same directory with update package (unless you should use the guide in 2.2 instead), input the following commands to the terminal:
chmod +x offline-canupdate.sh offline-canupdate.sh
- If you do not have script file "offline-canupdate.sh", type the following lines to update (these are actually the content of "offline-canupdate.sh" script file):
tar -xjvf cancape-update.tar.bz2 cd cancape-update chmod +x can-update.sh ./can-update.sh
RESTORE:If everything is going wrong or you do not need the CAN capability anymore, just restore your platform. We have prepared a script file named "can-restore.sh" in directory "cancape-update" to help you do this job (directory "cancape-update" was automatically made when you run update scripts). Get into "cancape-update" directory and type the following lines:
chmod +x can-restore.sh ./can-restore.sh
Checking the cape
After updating the CAN cape, you may immediately use the CAN function. First, let's check whether your updating was going well. In the terminal, type command:
You will see two can network nodes appear
- The NRMK CAN cape use galvanically isolated CAN transceiver (ISO1050) in which the input power and output power are supplied separately. The input side is supplied by 3.3V from the platform while the output side power is optional. Users can use jumpers J3, J4 to select the power supply for this side.
The J4 jumper connect the output side GND to the DGND of the platform. The J3 jumper is used to select the power source. Connect pin 1-2 of J3 when the platform is powered by an 5V adapter.
If the platform is powered via mini USB cable, connect pin 2-3 of J3.
Testing the cape with socketcan
In order to test the CAN cape, user can use can-utilities which are parts of socketcan. First, get the socketcan source, build the can-utilities and install them
svn co svn://svn.berlios.de/socketcan/trunk cd trunk/can-utils/ make sudo make install
If svn was not installed on the platform, user can install it before the previous step
sudo apt-get install subversion
After installing can-utilities, connect two can ports like the picture
Launch another ssh terminal. On the first terminal use candump utility to watch data come in can0 port:
On the second terminal, use cansend utility to send data out can1 port:
cansend can1 123#12345678
Look at the first terminal to check the received data
Terminate candump by pressing Ctrl+C keys