Add codes for peripheral(not tested yet, the function needs Nexus5)