Talk To NXT (t2n)
t2n is simple command-line tool for sending commands to nxt through the USB port, try t2n -help:
t2n version 0.0
usage: t2n [options] | t2n -help
recognized options:
-b : check battery level
-i : print nxt info
-ls : list files
-put <file.rxe> : upload file
-get <file.rxe> : download file
-v : set verbose mode
-vv : even more verbose
-vvv : gossip
-help : print help and return
-version : print version and return
t2n-0.5.tgz contains two versions: a dynamic executable, and a static one.
t2n-0.5.src.tgz contains the source code (lgpl).
Note that:
- Your linux version must have USB support
- The dynamic version requires lots of "so" (try ldd t2n)
- Setting correct rights for USB is rather tricky. I found that the "hotplug" solution was the simplest one :
- put "lego_usb.sh" and "lego_usb.usermap" in /etc/hotplug/usb
- If it does not work you will need to use t2n as root ...
Links
Official Lego Mindstorm page
Nbc/Nxt page