root/trunk/tools/LinuxConnection/LinuxReadme.txt @ 444

Revision 444, 3.3 KB (checked in by atorf, 5 years ago)
  • Updated publishing script to finally work in Python under Windows!!!
  • Minor linux-readme update
Line 
1This archive contains some useful scripts to get the
2RWTH - Mindstorms NXT Toolbox for MATLAB running under Linux.
3
4
5Scripts in this archive:
6
7* btconnect
8Syntax of this script is: btconnect <NXTsMACorName>
9The expression <NXTsMACorName> can either be the MAC address (i.e. 00:16:.....)
10or the Name (i.e.: "My NXT") of the NXT brick that you want to connect to.
11After a successful connection, the terminal will be blocked until hung up.
12The toolbox is now ready to use!
13
14* 45-legonxt.rules
15* legonxt.sh
16Those scripts are used to make an NXT device ready to be used with USB.
17See below in the USB section for further explanations.
18
19
20
21*** BLUETOOTH ***
22
23To get Bluetooth up and running with the NXT and our toolbox, the bluez bluetooth
24stack must be installed. In order to do so, you should use your packet manager
25(e.g. Debian's apt-get) to retrieve the following packets:
26 - bluetooth
27 - bluez-utils  (should be included in bluetooth anyway)
28 - dbns
29 - dbns-x11     (includes the bluetooth-applet)
30
31Once properly installed, you should execute the following command in
32a terminal window:
33 bluetooth-applet --singleton
34
35Once the applet is running, a Bluetooth icon should appear in your system tray.
36This is important: You are ready to use the script btconnect now, but when using
37it the first time, the Bluetooth icon in the systray will flash and wait for
38user input. Enter the authorization key that was set on the NXT before (usually 1234).
39Now the script btconnect should create a device called /dev/rfcomm0, which is
40the virtual serial port the MATLAB toolbox uses. It might be a good idea to add the
41bluetooth-applet to your autostart.
42
43
44
45*** USB ***
46
47First you have to make sure that the open-source library libusb is properly installed.
48You can either retrieve it from the project's homepage
49http://libusb.wiki.sourceforge.net/ or download it using your packet manager
50(e.g. Debian's apt-get). If the package "libusb" does not work, please try
51installing "libusb0", the latest version "libusb-0.xx", or "libusb-dev".
52
53This was just one step. The second thing to do is making connected NXT devices appear
54inside the /dev/ folder. That is what the two other files are needed for
55(root rights are required):
56
571. Copy the file 45-legonxt.rules to /etc/udev/rules.d ,
58   e.g by executing the following:
59cp 45-legonxt.rules /etc/udev/rules.d
60
612. Now copy the file legonxt.sh to /etc/udev ,
62   e.g. by executing:
63cp legonxt.sh /etc/udev
64
653. Make sure the script is executable. You can do so
66   by typing:
67chmod a+x /etc/udev/legonxt.sh
68
694. Once successful, you might need to restart the udev-service. If unsure,
70   reboot your system. When connecting an NXT device to a USB port, a new
71   device /dev/legonxt-x-y should appear
72   (with x and y depending on your kernel and USB bus and port).
73
74
75This manual and the USB scripts are partly taken from:
76http://forums.nxtasy.org/index.php?showtopic=2143&view=findpost&p=16723
77
78Please note that our solution does not require a group "legonxt" on your system,
79as we slightly modified the scripts.
80
81If you need more resources, these links are recommended for further reading:
82
83http://jan.kollhof.net/wiki/projects/Lego/linux
84http://www.lysator.liu.se/~nisse/lego-nxt-dev/
85http://nxt.ivorycity.com/index.php?/categories/3-Linux-USB
86
87
Note: See TracBrowser for help on using the browser.