diff --git a/src/descriptor.c b/src/descriptor.c index f049d82..01dbd69 100644 --- a/src/descriptor.c +++ b/src/descriptor.c @@ -100,6 +100,7 @@ static const dc_descriptor_t g_descriptors[] = { /* Suunto EON Steel */ #ifdef USBHID {"Suunto", "EON Steel", DC_FAMILY_SUUNTO_EONSTEEL, 0}, // BLE + {"Suunto", "EON Core", DC_FAMILY_SUUNTO_EONSTEEL, 1}, // BLE #endif /* Uwatec Aladin */ {"Uwatec", "Aladin Air Twin", DC_FAMILY_UWATEC_ALADIN, 0x1C}, // FTDI diff --git a/src/device.c b/src/device.c index 35e0951..7980186 100644 --- a/src/device.c +++ b/src/device.c @@ -125,7 +125,7 @@ dc_device_open (dc_device_t **out, dc_context_t *context, dc_descriptor_t *descr rc = suunto_d9_device_open (&device, context, name, dc_descriptor_get_model (descriptor)); break; case DC_FAMILY_SUUNTO_EONSTEEL: - rc = suunto_eonsteel_device_open (&device, context, name); + rc = suunto_eonsteel_device_open (&device, context, name, dc_descriptor_get_model(descriptor)); break; case DC_FAMILY_UWATEC_ALADIN: rc = uwatec_aladin_device_open (&device, context, name); diff --git a/src/suunto_eonsteel.c b/src/suunto_eonsteel.c index 0c78359..0f656ad 100644 --- a/src/suunto_eonsteel.c +++ b/src/suunto_eonsteel.c @@ -727,7 +727,7 @@ static int initialize_eonsteel(suunto_eonsteel_device_t *eon) } dc_status_t -suunto_eonsteel_device_open(dc_device_t **out, dc_context_t *context, const char *name) +suunto_eonsteel_device_open(dc_device_t **out, dc_context_t *context, const char *name, unsigned int model) { dc_status_t status = DC_STATUS_SUCCESS; suunto_eonsteel_device_t *eon = NULL; @@ -748,8 +748,12 @@ suunto_eonsteel_device_open(dc_device_t **out, dc_context_t *context, const char dc_custom_io_t *io = _dc_context_custom_io(eon->base.context); if (io && io->packet_open) status = io->packet_open(io, context, name); - else - status = dc_usbhid_custom_io(context, 0x1493, 0x0030); + else { + /* We really need some way to specify USB ID's in the descriptor */ + unsigned int vendor_id = 0x1493; + unsigned int device_id = model ? 0x0033 : 0x0030; + status = dc_usbhid_custom_io(context, vendor_id, device_id); + } if (status != DC_STATUS_SUCCESS) { ERROR(context, "unable to open device"); diff --git a/src/suunto_eonsteel.h b/src/suunto_eonsteel.h index ad3d292..4d34478 100644 --- a/src/suunto_eonsteel.h +++ b/src/suunto_eonsteel.h @@ -31,7 +31,7 @@ extern "C" { #endif /* __cplusplus */ dc_status_t -suunto_eonsteel_device_open(dc_device_t **device, dc_context_t *context, const char *name); +suunto_eonsteel_device_open(dc_device_t **device, dc_context_t *context, const char *name, unsigned int model); dc_status_t suunto_eonsteel_parser_create(dc_parser_t **parser, dc_context_t *context, unsigned int model); diff --git a/src/usbhid.c b/src/usbhid.c index 2d1916d..06a6165 100644 --- a/src/usbhid.c +++ b/src/usbhid.c @@ -319,7 +319,7 @@ dc_usbhid_open (dc_usbhid_t **out, dc_context_t *context, unsigned int vid, unsi } if (device == NULL) { - ERROR (context, "No matching USB device found."); + ERROR (context, "No matching USB device (%04x:%04x) found.", vid, pid); status = DC_STATUS_NODEVICE; goto error_usb_free_list; }