Implement set_device_data and get_device_data