beaglebone: previous approach was really naive