{"id":137,"date":"2025-12-20T19:02:36","date_gmt":"2025-12-20T18:02:36","guid":{"rendered":"https:\/\/www.scienzaludica.ibe.cnr.it\/?page_id=137"},"modified":"2025-12-20T19:13:10","modified_gmt":"2025-12-20T18:13:10","slug":"nxtrc","status":"publish","type":"page","link":"https:\/\/www.scienzaludica.it\/index.php\/nxtrc\/","title":{"rendered":"NXTRC"},"content":{"rendered":"\n<p class=\"has-base-color has-text-color has-link-color wp-elements-93bce5c405dbd3827ae0a662cc721a35\"><\/p>\n\n\n\n<p>I&nbsp;work on Linux and I found that there is very little around on how to use the NXT Mindstorm by LEGO with BlueTooth on Linux, so I started writing my own set of tools. I have finished a first version of a Program to interact with NXT and a group of functions to do various tasks.<\/p>\n\n\n\n<p>It&#8217;s called&nbsp;<strong>nxtrc<\/strong>&nbsp;(NXT Remote Command) and the Help that tells you what it can do is this: <\/p>\n\n\n\n<p class=\"has-contrast-2-color has-base-2-background-color has-text-color has-background has-link-color wp-elements-99ad7c58a91e477e438d6c7d1556120b\">nxtrc vers. 2.3 &#8211; A program to interact with LEGO Mindstorm NXT<br>using a Bluetooth connection.<br><br>   Usage: nxtrc [-a ADDR] [-v] command<br>        -a  ADDR     Connect with NXT at ADDR<br>                       required unless -s is used<br>                       or ADDR is in BTADDR Env Var<br>        -v           Be verbose<br>      and one command<br>        -i           Get info on NXT brick<br>        -l[PATT]     List files on NXT brick <br>                       matching PATT if present (e.g. -l*.rxe)<br>                       N.B. No spaces between -l and PATT!<br>        -b           Get Battery Level<br>        -n  NAME     Set NXT name to NAME<br>        -w  FILE     Write FILE on NXT<br>        -W  FILE     Same as -w overwriting FILE if exists <br>        -r  FILE     Read FILE frome NXT and save it<br>        -d  FILE     Delete FILE frome NXT<br>        -p  FILE     Run Program FILE on NXT<br>        -k           Stop a program running on NXT<br>        -m  FILE     Play Sound File once<br>        -M  FILE     Play Sound File indefinitely<br>        -z           Stop Sound Playback<br><br>    or<br>      nxtrc -s         Scan for BT devices<br><br>    if more than one command is given only<br>    the last one is performed.<\/p>\n\n\n\n<p>It wasn&#8217;t easy as BlueTooth support with linux is not well documented but with the\u00a0<a href=\"http:\/\/www.bluez.org\/\">Bluez<\/a>\u00a0utilities and some info I found on the net I was able to communicate with the NXT. I wrote a short intro on how to do that, it&#8217;s obsolete now but you can find it\u00a0<a href=\"https:\/\/www.scienzaludica.it\/wp-content\/uploads\/2025\/12\/Info-BT.txt\">here<\/a>.<\/p>\n\n\n\n<p>Download the\u00a0<a href=\"files\/nxtrc-2.3.tar.gz\">source of nxtrc<\/a>\u00a0and follow the instruction to build the program. The\u00a0<a href=\"https:\/\/www.scienzaludica.it\/wp-content\/uploads\/2025\/12\/Readme.txt\">Readme<\/a>\u00a0is available as well as a text file. An HTML version of the Man page is\u00a0<a href=\"https:\/\/www.scienzaludica.it\/wp-content\/uploads\/2025\/12\/man-nxtrc.html\">here<\/a>.<\/p>\n\n\n\n<p>With this and the excellent&nbsp;<a href=\"http:\/\/bricxcc.sourceforge.net\/nbc\">NXC<\/a>&nbsp;compiler by John Hansen I am having a lot of fun with Linux and the NXT<\/p>\n\n\n\n<p>If you want to contact me you can E-Mail to<br>gianpiero.puccioni AT isc.cnr.it<br>Please put NXT or NXTRC somewhere in the subject.<\/p>\n\n\n\n<p>Have Fun!<br>GianPiero Puccioni<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&nbsp;work on Linux and I found that there is very little around on how to use the NXT Mindstorm by LEGO with BlueTooth on Linux, so I started writing my own set of tools. I have finished a first version of a Program to interact with NXT and a group of functions to do various [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-137","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.scienzaludica.it\/index.php\/wp-json\/wp\/v2\/pages\/137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scienzaludica.it\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.scienzaludica.it\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.scienzaludica.it\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scienzaludica.it\/index.php\/wp-json\/wp\/v2\/comments?post=137"}],"version-history":[{"count":5,"href":"https:\/\/www.scienzaludica.it\/index.php\/wp-json\/wp\/v2\/pages\/137\/revisions"}],"predecessor-version":[{"id":490,"href":"https:\/\/www.scienzaludica.it\/index.php\/wp-json\/wp\/v2\/pages\/137\/revisions\/490"}],"wp:attachment":[{"href":"https:\/\/www.scienzaludica.it\/index.php\/wp-json\/wp\/v2\/media?parent=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}