{"id":627,"date":"2016-01-06T15:54:10","date_gmt":"2016-01-06T15:54:10","guid":{"rendered":"http:\/\/www.redrobe.com\/mike\/?p=627"},"modified":"2016-01-06T15:54:10","modified_gmt":"2016-01-06T15:54:10","slug":"cluster-of-raspberry-pi-zeroes","status":"publish","type":"post","link":"https:\/\/redrobe.com\/mike\/cluster-of-raspberry-pi-zeroes\/","title":{"rendered":"Cluster of Raspberry Pi Zeroes"},"content":{"rendered":"<p>No ethernet required &#8211; each pi zero is both powered and networked by a single usb lead !<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.redrobe.com\/mike\/wp-content\/uploads\/2016\/01\/CXjsR6yWwAAyAQa-300x240.jpg\" alt=\"PiCluster\" width=\"300\" height=\"240\" class=\"aligncenter size-medium wp-image-628\" \/><\/p>\n<p>The magic happens in the &#8220;gadget mode&#8221; firmware of the PI Zero. Since it doesn&#8217;t have the USB HUB chip in the way like other models (B \/ B+\/pi2) it can be configured in device mode.<\/p>\n<p>This makes it appear to any PC (or pi B+ \/ pi-2)  as a virtual usb network adaptor &#8211; so you can immediately access it as though it were ethernet connected.<br \/>\nIt also possible to set it up to appear as mass storage device, keyboard, mouse or any other usb peripheral!<br \/>\n(More discussion on the  <a href=\"https:\/\/www.raspberrypi.org\/forums\/viewtopic.php?f=29&#038;t=129653\">pi forums<\/a> by DaveB and others)<\/p>\n<p>Power isn&#8217;t a problem as each Pi Zero only uses around 150mA<br \/>\n<strong><\/p>\n<ul>\n<p>Convert a Pi Zero to gadget mode:<\/ul>\n<p><\/strong><\/p>\n<p>1. Start with an fresh image of Raspbian Jessie <a href=\"https:\/\/www.raspberrypi.org\/downloads\/raspbian\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.raspberrypi.org\/downloads\/raspbian\/<\/a><\/p>\n<p>2. copy this file to the boot partition: <a href=\"https:\/\/dl.dropboxusercontent.com\/u\/1122948\/temp\/PiOTG-Test\/PiZeroEthernet.tar.gz\" target=\"_blank\" rel=\"noopener\">https:\/\/dl.dropboxusercontent.com\/u\/1122948\/temp\/PiOTG-Test\/PiZeroEthernet.tar.gz<\/a> (thanks to gbaman1 \/ Andrew Mulholland) <\/p>\n<p>or download it on the pi itself:<\/p>\n<p><code>wget https:\/\/dl.dropboxusercontent.com\/u\/1122948\/temp\/PiOTG-Test\/PiZeroEthernet.tar.gz<\/code><\/p>\n<p>2. <code>sudo tar xvzfC \/boot\/PiZeroEthernet.tar.gz \/tmp\/<\/code><\/p>\n<p>3. <code>sudo cp -R \/tmp\/PiZeroEthernet\/fat32\/* \/boot\/<\/code><\/p>\n<p>4. <code>sudo cp -R \/tmp\/PiZeroEthernet\/ext4\/lib\/* \/lib\/<\/code><\/p>\n<p>5. Now give it a static ip address by editing <code>\/boot\/cmdline.txt<\/code> and adding this on the end: <code>ip=169.254.64.64:::255.255.0.0<\/code><\/p>\n<p>(for the lazy all the above has been done on this downloadable image:<br \/>\n<a href=\"http:\/\/sourceforge.net\/projects\/pizero-usbhost\/\" target=\"_blank\" rel=\"noopener\">http:\/\/sourceforge.net\/projects\/pizero-usbhost\/<\/a> [768MB])<\/p>\n<p>Now the pi Zero can be plugged into a pi2 \/ B+ (or a PC !) and you can SSH directly to it on the ip you set above ( 169.254.64.64)<\/p>\n<p>[more to follow]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>No ethernet required &#8211; each pi zero is both powered and networked by a single usb lead ! The magic [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-627","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/posts\/627","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/comments?post=627"}],"version-history":[{"count":0,"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/posts\/627\/revisions"}],"wp:attachment":[{"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/media?parent=627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/categories?post=627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/tags?post=627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}