However the EV3 has USB and Bluetooth built in. The problem is that they only supports the proprietary protocol used by the Lego Software. A couple of people have built tools to work with it, buts what's needed is a generic, and simple command line tool that lets you transfer files to the EV3. Well here it is and its called ev3dude!
Firstly you need to pair your computer to the EV3 over Bluetooth. As my only bluetooth machine is a Mac, I've built and tested on that, and when you pair it creates a file called /dev/cu.EV3-SerialPort. The name will change if you've renamed your brick to something other than EV3, but it'll be something like that.
Now get the source to ev3dude, and compile it by typing:
make ev3dude
now test it by running
ev3dude /dev/cu.EV3-SerialPort
(or whatever your device is called).
Now you can get a directory listing of your SD card by typing:
ev3dude /dev/cu.EV3-SerialPort -l /media/card
The formatting is a bit funny, as the EV3 sends md5 hashes of the files, along with their size and name, but the info is pretty clear.
To write a file
ev3dude /dev/cu.EV3-SerialPort -w myLocalFile /media/card/filenameOnBrick
and if you change your mind you can delete it again:
ev3dude /dev/cu.EV3-SerialPort -d /media/card/filenameOnBrick
Combined with the Sniff menu system described in the last post we've got a mechanism for installing and running Sniff code on the Brick without WiFi. It'll be fully integrated into Sniff in the next release, but for now you can use ev3-sniff to generate the binary, and transfer it manually with ev3dude.
You can download ev3dude.c here.
No comments:
Post a Comment