Esdr: fixed bug with get_device_by_serial_number