since I find my indoors rather small to take full advantage of my CF, I bought a RPi and a 9000mAh battery Powerbank (with an 5v/1A output) and followed the wiki page to set things up. I used the RPi official Raspian image and set things by myself rather than downloading the preconfigured image. All works mostly as expected Still there are a few small things that could be fixed in Wiki (http://wiki.bitcraze.se/projects:crazyf ... rasberrypi). I put them here since I didn't find a way to register and do it myself:
- dev-headless branch has been merged to master, so there is no need to hg up dev-headless
- Apart from setting up the UDEV rule for, I think you have to make sure that your RPi user is in the input group (or games group Im not sure), otherwise it won't be able to reach the controller.
- On the part about configuring autostart of the headless client, The UDEV rule does not get triggered on remove. Not that it really matters (I think cfheadless dies anyway when removing the radio), but after playing a lot (udev is quite picky with that) I ended up with:
Code: Select all
ACTION=="add", SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="1915", ENV{ID_MODEL_ID}=="7777", MODE="0664", GROUP="plugdev", RUN+="/home/hector/bin/cfheadless-run"
ACTION=="remove", ENV{ID_VENDOR_ID}=="1915", ENV{ID_MODEL_ID}=="7777", RUN+="/home/hector/bin/cfheadless-run"
- There is no need to reboot to have the new udev rules loaded, you can just
Code: Select all
udevadm control --reload-rules
- I placed the cfheadless-run scripts in my home folder, I'd say there is no need to have these scripts in root's home. As a general rule, I try to use root access the least I can.
- I also change the logging of the cfheadless output to /var/log, which is "the place" for logs. I also log everything (not just a single run) and I don't want this file to be cleaned up on a reboot or something.
- Added a couple of udev rules to run a proper shutdown by RPi 1 minute after my controller is unplugged, which is handy if you are outside without screen or anything.
- The shutdown command (sudo shutdown -h now -r) is wrong, along with the explanation on -r and -h. It works but it's just not the way (see man shutdown). It should be:
Code: Select all
sudo shutdown -r now