This is just a holding place for the things I find out until they make up a proper document or separate docs. This is a working doc - but it might be helpful to someone. I'm also trying to approach any changes I make in a non-destructive manner, in that it's easy to reverse out if I make a mistake.
The script /etc/init.d/rcS
is kicked off. This boots up the wifi, and udev
for listening to mounting drives.
If you want to make successive changes that you can easily reverse out - like changing the wifi channel, I'd recommend appending a /root/boot.sh
script to /etc/init.d/rcS
. In that boot script you can include wifi channel, how the wifi works (connecting to existing network rather than letting machines connect to it, etc).
By default to /data/video/usb1
and then if it's free also to /data/video/usb
.
I played around for a while with udev
rules - but it ended up a waste of time. Partly because when the drone boots it reset the udev rules directory (by removing and recreating). However, something (unknown what) kicks off /bin/mount_usb.sh
when the drive is inserted and this does the actual mounting.
I've appended /data/video/usb1/mount.sh
, so that when a usb drive is inserted, if there's a script called mount.sh
on the root, it'll automatically execute.
This script can then be used to automatically change the channel or network the drone connects to. Maybe if you fancied something clever, it could write out a config file that's read by the /root/boot.sh
that I've suggested above.
Karl Westin posted this gist - make sure to change and to values that work for you!:
killall udhcpd; iwconfig ath0 mode managed essid <SSID>; ifconfig ath0 <THE DRONE IP> netmask 255.255.255.0 up;
I'm still trying to determine whether you really need wpa_suppliment to get the drone to connect to WPA/WPA2 networks - or if wireless-tools has the capability in there.
The main data store you'll probably play around in is /data/video
as that's the landing point when you FTP in. It's only 53.5Mb.
I've been dropping johnny-five on to my Drone, but the whole directory is around 40Mb. However, I found if you delete the docs
directory in johnny-five (and IIRC, I removed the Socket.IO activeX dependancy) it ends up around 31Mb - so it fits!
Also here's a dump of commands I was using on the drone - note that I was originally looking to hooking in to
udev
- but the drone deletes all the rules on boot, so this turned out to be a dead end (do not run these - it's just here for a record for me):