forked from https://bitbucket.org/glennrub/nrf51_dfu_linux/src