{"id":492,"date":"2015-01-03T19:03:43","date_gmt":"2015-01-04T00:03:43","guid":{"rendered":"http:\/\/www.virtualroadside.com\/blog\/?p=492"},"modified":"2015-01-03T19:05:06","modified_gmt":"2015-01-04T00:05:06","slug":"connect-to-roborio-usb-on-linux","status":"publish","type":"post","link":"https:\/\/www.virtualroadside.com\/blog\/index.php\/2015\/01\/03\/connect-to-roborio-usb-on-linux\/","title":{"rendered":"Connect to RoboRIO USB on Linux"},"content":{"rendered":"<p>We got our RoboRIO imaged today, and my first thought was whether I could use it on Linux without needing to plug it into a network. Turns out, this is a pretty simple thing to do!<\/p>\n<ol>\n<li>Plug the RoboRIO in to your computer<\/li>\n<li>Identify the network device, it should be something like\u00c2\u00a0<em>enp0s29u1u2<\/em><\/li>\n<li>Assign it an IP address like so:\n<pre>sudo ip addr add 172.22.11.1\/24 dev enp0s29u1u2<\/pre>\n<\/li>\n<\/ol>\n<p>Now you need to start an DHCP server to give it an address, because FIRST didn&#8217;t give it a static address for some reason. You could modify the configuration on the RoboRIO&#8230; but let&#8217;s assume you don&#8217;t want to do that. Instead:<\/p>\n<ol>\n<li>Download\u00c2\u00a0this <a href=\"https:\/\/raw.githubusercontent.com\/chilicuil\/learn\/master\/python\/simple-dhcpd\">python script that acts like a DHCP server<\/a><\/li>\n<li>Run this:\n<pre>sudo python simple-dhcpd -a 172.22.11.1 -i enp0s29u1u2 -f 172.22.11.2 -t 172.22.11.2<\/pre>\n<\/li>\n<\/ol>\n<p>And that&#8217;s it! When it works, you should get a message that says &#8220;Leased: 172.22.11.2&#8221;.<\/p>\n<p>If it&#8217;s not working, here are some things to watch out for:<\/p>\n<ul>\n<li>Make sure your firewall allows port 67 on UDP<\/li>\n<li>Make sure dnsmasq or some similar program isn&#8217;t listening on port 67 (use &#8220;netstat -ln | grep 67&#8221; to check)<\/li>\n<\/ul>\n<p>Things that would be nice to change:<\/p>\n<ul>\n<li>It&#8217;d be nice if FIRST changed the usb0 device to have a static address instead of depending on dhcp<\/li>\n<li>Probably should create a udev rule to make the network device something pretty<\/li>\n<li>When you disconnect the device, you have to run the scripts again. Probably should set something more permanent up, but this is good enough for now<\/li>\n<\/ul>\n<p>Hope this helps you out!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We got our RoboRIO imaged today, and my first thought was whether I could use it on Linux without needing to plug it into a network. Turns out, this is a pretty simple thing to do! Plug the RoboRIO in to your computer Identify the network device, it should be something like\u00c2\u00a0enp0s29u1u2 Assign it an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41,8,6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/492"}],"collection":[{"href":"https:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=492"}],"version-history":[{"count":5,"href":"https:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/492\/revisions"}],"predecessor-version":[{"id":497,"href":"https:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/492\/revisions\/497"}],"wp:attachment":[{"href":"https:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtualroadside.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}