User Tools

Site Tools


equipment:converters

Brainboxes Ehernet to R232/422/485 converters

Instructions apply to models ES-522 and ES-346.

First setup device static IP address in browser. Make sure that the serial transfer protocol is set to RAW!

Install cyclades serial client:

$ sudo apt-get install cyclades-serial-client

Edit file /etc/cyclades-devices by adding followind lines (for 4 port device)

/dev/ctty01:Brainboxes:161.53.68.189:1:socket:-p 9000 -d 0
/dev/ctty02:Brainboxes:161.53.68.189:2:socket:-p 9000 -d 0
/dev/ctty03:Brainboxes:161.53.68.189:3:socket:-p 9000 -d 0
/dev/ctty04:Brainboxes:161.53.68.189:4:socket:-p 9000 -d 0
  • ctty01-ccty04 can be any other name,
  • 161.53.68.189 is static IP address of the device (depending on the setup),
  • 1,2,3,4: are names of the ports

In file /usr/sbin/cyclades-serial-client replace all occurances (there should be 4) of tsrsock with cyclades-ser-cli

to start using ports write

$ sudo cyclades-serial-client start

to stop write

$ sudo cyclades-serial-client stop

You also need to provide access privileges to the port (adding user to dialout does not work right now, see below for potentially better solutions):

$ sudo chmod ga+rw /dev/ctty*

To automate the port startup procedure, add the following lines to your /etc/rc.local file (before exit 0):

cyclades-serial-client start
chmod ga+rw /dev/ctty*

Don't forget to make /etc/rc.local executable:

$ sudo chmod +x /etc/rc.local

When ports are started they cannot be used from other computer.

If the converter gets disconnected and then reconnected, the client needs to be restarted:

$ sudo cyclades-serial-client restart

(appropriate file permissions are retained).

Better ways of setting appropriate user permissions

The clean way of setting appropriate user permissions for the serial ports would be to create a file in /etc/udev/rules.d named brainboxes-serial-ports.rules (the name of the file is actually irelevant), containing only the following code:

KERNEL=="ctty*",GROUP="dialout",MODE="0660"

Unfortunately, this does not seem to be working right for some reason :/

Further info on setting appropriate permissions automatically:

http://ubuntuforums.org/showthread.php?t=782115

http://www.weather-watch.com/smf/index.php?topic=39257.0

PCAN ExpressCard34 CAN interface

Linux driver installation

Prerequisites

Libpopt command line argument parsing library:

$ sudo apt-get install libpopt-dev

Compiling and installing the driver

Download the driver from the PEAK-System LINUX Website and unpack it to the directory of your choice. Go to the directory and invoke make.

$ cd peak-linux-driver-7.13
$ make NET=NO

Plug the PCAN card into your ExpressCard34 slot and install the driver:

$ sudo make install
$ sudo modprobe pcan
Troubleshooting

If the PCAN card is recognized by your system at boot time (i.e. the red LED comes on when the card is inserted before your system boots), but not when it is hotplugged, check if the Hotplug driver is loaded on your system:

$ lsmod | grep acpiphp  

If the previous command does not return anything, add the following line

acpiphp

to the end of you /etc/modules file and reboot.

equipment/converters.txt · Last modified: 2017/05/12 09:29 (external edit)