| gclib 422 Communications API for Galil controllers and PLCs |

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