add send event function
just open the device once