| gclib 307 Communications API for Galil controllers and PLCs |

All Data Structures Files Functions Variables Typedefs Macros Pages
pi.md
1 # Raspberry Pi {#pi}
2
3 ##Tested versions
4
5 See the \link installation \endlink page for supported versions.
6
7 ##Installation
8 ###Create a temporary variable for Raspbian version
9
10 uver=$(lsb_release -r | cut -f 2); echo $uver
11 8.0
12
13 ###Install Galil's public certificate
14
15 $ wget http://www.galil.com/sw/pub/raspbian/$uver/GALIL-PUB-KEY
16 $ sudo apt-key add GALIL-PUB-KEY
17
18 ###Get Galil's apt sources list
19
20 $sudo wget http://www.galil.com/sw/pub/raspbian/$uver/galil.list -O /etc/apt/sources.list.d/galil.list
21 $sudo apt-get update
22
23 ###Install Package
24
25 $sudo apt-get install gclib
26
27 ###Uninstall Package
28
29 To uninstall gclib.
30
31 $sudo apt-get remove gclib
32
33
34 ##Serial Ports and USB
35 If access to the serial ports or USB (e.g. DMC-4103) is desired through gclib, the following will provide steps to join the correct access group. If using USB, be sure the controller is powered and the usb is plugged in before beginning.
36
37 ###Determine group with access
38
39 $ ls -l /dev/ttyUSB* /dev/ttyS*
40 crw-rw----. 1 root dialout 4, 64 Mar 3 16:39 /dev/ttyS0
41 crw-rw----. 1 root dialout 4, 65 Mar 3 16:39 /dev/ttyS1
42 crw-rw----. 1 root dialout 4, 66 Mar 3 16:39 /dev/ttyS2
43 crw-rw----. 1 root dialout 4, 67 Mar 3 16:39 /dev/ttyS3
44 crw-rw----. 1 root dialout 188, 0 Mar 6 11:08 /dev/ttyUSB0
45
46 In the above listing, **dialout** is the group that needs to be joined. **uucp** is another common group that may be listed.
47
48 ###Check the user's group
49
50 The default *pi* username is already a member of dialout.
51
52 $ groups
53 pi adm dialout cdrom sudo audio video plugdev games users input netdev gpio i2c spi
54
55 ###If needed, add the desired *username* to the group.
56
57 $ sudo gpasswd -a username dialout
58 [sudo] password for username:
59 Adding user username to group dialout
60
61 Log out and back in for change to take effect.
62
63 $ groups
64 username wheel dialout
65
66 gclib can now connect to serial and usb devices from user *username*.
67
68 ##Documentation
69 The documentation is left as a tarball to minimize disk usage. The latest release version of the user manual is available at the following link.
70 * http://www.galil.com/sw/pub/all/doc/gclib/html/
71
72 ###Offline html
73 The following allows viewing of the html docs from the installation, in the GUI mode.
74
75 $ tar -xzf /usr/share/doc/gclib/gclib_132_doc.tar.gz html
76 $ epiphany html/index.html
77
78 ###Offline pdf
79 There may be a pdf shipped in the package. The following allows viewing of the pdf docs from the installation.
80
81 $ sudo apt-get update
82 $ sudo apt-get install evince
83 $ tar -xzf /usr/share/doc/gclib/gclib_132_doc.tar.gz gclib_132.pdf
84 $ evince gclib_132.pdf