updated

1.fixed a bug of SET_DEVICE_TYPE
2.Change CHANGE_PIN retries to 0xFF by default.
3.updated test.py