WTF... I'm a idiot... I was totally wrong about how to use threading
now I believe I've corrected them.. er.. embarrassing
add a retry mechanism
sometimes my device may get stucked without any reason, and I don't know how to avoid it, so I use a retry mechanism to make sure the command is sent to the device.