add HSM state transmission, not tested, DO NOT USE NOW