Project

General

Profile

Control Module ABS 10 Technical Guide

Installing the Cross compiler

The installation of the cross compiler can be done by following the next recipe:
* Download the compressed file Cross_Compiler from the ABS 1.0 repository.
* Copy the folder Cross_Compiler/usr/local/arm/gcc-4.2.3-glibc-2.3.3 to /usr/local/arm/.
* Download the compressed file Control_Module from the repository, execute the shell script InstallLibraries.sh

Actualization of the Modules

Once installed the cross compiler, the developer can make changes to the source code, compile it and upload it to the modules. The next recipe shows a typical update of the module's firmware:

  • Connect to the SIR server by using ssh developer@10.10.20.128 (the password is xxxxx)
  • Enters the module by using telnet 192.168.1.xx where xx is the number of the module. The login is root, and the password is root if asked.
  • Repeat the previous steps in a new console tab.
  • Enter to /mnt/sd/ in the first tab and to /abscontrol/ in the second tab.
  • In either tab execute the top command, press q and executes the command kill #1 #2 where #1 and #2 are the PIDs of the programs tcp_Control_Module and multicast_receiver.py
  • Execute nc -l -p 1234 > tcp_Control_Module in the first tab.
  • In the local computer execute the shell script MoveScript.sh that is in the Control_Module folder.
  • Download the compressed file Multicast_Receiver.
  • Checks in the first tab if the command has finished. Once finished, in the second tab execute nc -l -p 1234 > multicast_receiver.py
  • In the local computer execute the shell script MoveScript.sh that is in the Multicast_Receiver folder.
  • In the first tab checks the file experimento1.ab1, if the file doesn't exist or has changed manually or badly when testing, erase the file, creates a new one with the same name and writes the following:

experimento1.ab1
ABS_1
111000
000111
0

  • Take in account that a write operation should be performed after updating all the modules because this file has non valid data.

  • Once the last command has finished, execute reboot if wanted or run the tcp_Control_Module experimento1.ab1 and multicast_receiver.py in each respective folder.

Changes of the source code and scripts by module

The move scripts and the source code are targeted by default to module 1, if the module to be updated is not the module 1 the following changes should be performed:

  • In both move scripts, inside the nc command the ip should be changed to the current module's ip.
  • In ServidorTCP.c that is in the folder Control_Module, the const MyID could be changed to the number of the current module, it doesn't change the behavior of this program but it's useful to realize if the developer forgot to the change the source or move scripts when updating a new module.
  • In multicast_receiver.py that is in the folder Multicast_Receiver, the module_ip should be changed to the current module's ip and the module_num should be changed to the number of the current module.

Another useful Programs

If by mistake the developer change the password of the module and forget it, download the compressed file ChangePsswd,
turnoff the module, extract its the SD, and copy the script chgpsswd to the sd overwriting the tcp_Control_Module.
Now puts the SD in the module and turn it on, the new password is root.

If by mistake the developer take down the telnet service of the module, download the compressed file Recovertelnet,
turnoff the module, extract its the SD, and copy the script recovertelnet to the sd overwriting the tcp_Control_Module.

Finally if the module doesn't have a telnetd script, this could be copied from another module to the problematic module. The connection between the problematic module and the local computer should be done using serial interface, should be take in account that in the minicom the Control Flow should be disabled, it is enabled by default.

##Interchanging modules
To move a module from a position to another position, the developer should follow the next steps:

  • Enter to the server using the command ssh developer@10.10.20.128
  • Execute telnet ip, where ip is the current ip of the module to be placed elsewhere.
  • When the telnet connection to the module is got, goes to /abscontrol, there execute vi multicast_receiver.py and look for the line that sets the module_ip for socket connections and the line that sets the module number. They should be lines 212 and 213 respectively. There change the module_ip and module_num to the desired ones.
  • Go to the folder /etc/init.d and execute vi MyApp, there change the ip to the desired one.
  • The module should be restarted by executing the reboot command or by unplugging and plugging again the module. This should work most cases, but if it doesn't for any reason the previous steps should be follow but using a Serial Connection to the module.

Serial connection

To connection a PC with an ABS module the following devices are needed: a FTDI chip, a PC with FTDI drivers and minicom, a MAX232 chip, five 1uF capacitors.

The steps to make the connection are the following:

  • Check the datasheet of the MAX232 found in http://www.ti.com/lit/ds/symlink/max232.pdf, specifically the page n°10 and connected the capacitors as shown in the document.
  • The VCC and GND pins should be driven by the FTDI mini board, that should be in 5V mode.
  • The Rx pin of the FTDI board should be connected to the 9 pin of the MAX232 and the Tx of the FTDI board should be connected to the 10 pin.
  • The pin 1(Rx) of the jumper JP0 in the ABS module should be connected to the pin 8 of the MAX232 and the pin2(Tx) of the same jumper should be connected to the pin 7 of the MAX232 and finally the pin3 of the same jumper should be connected to GND of the FTDI.

  • When the connection are finished, the user should connect the FTDI driver to the PC without turning on the module.

  • Later the user should start a minicom session as superuser to connect to the FTDI chip.

  • Finally, the minicom should be configured as a 115200 8 N 1 with no flow control, this is important because the default of the minicom is control flow enabled, when configured turn on the module and the minicom window should show a boot message, where you can later connect.