How XDK workbench recognizes a XDK device?
응답
15. 10. 19 오전 11:28
Dear all,

How does the XDK workbench recognizes, that the connected device is a XDK and no other device?

Thanks and regards
Frank
0 (0 투표)
How XDK workbench recognizes a XDK device?
응답
15. 10. 27 오후 12:47 as a reply to Frank Slomian.
Hi Frank,

I don't have the source code of the XDK Workbench here to confirm my suspicion, but I would say that connecting the XDK through USB will mark the device as an XDK through it's standard identifiers to the system and later on through it's custom identifiers to the XDK Workbench.
You could verify that with the 'lsusb' command on linux or Mac.

If you were asking about this to do a manual check if the device you connect is a XDK, you could write Udev rules that clearly recongnize the device and mount it to a custom mountpoint.

Let me know if this helps

- Florian
0 (0 투표)
How XDK workbench recognizes a XDK device?
응답
15. 10. 28 오전 8:59 as a reply to Florian Harr.
Hi Florian,

Thanks, that was helpful!
The 'lsusb' command is quite useful.

If I connect the XDK with the XDK workbench the output is: 'Extracting CoreID from bootloader...'
Is the CoreID the same like the Chip ID(sending an 'i' to the XDK in bootloader mode)?
Is a part of the Chip ID identically in each XDK?

Regards
Frank
0 (0 투표)
How XDK workbench recognizes a XDK device?
응답
15. 11. 11 오후 12:43 as a reply to Frank Slomian.
Hi!

Your suspicion is partly correct.

You can tell if an XDK has been connected by looking at the USB vendor and product ID. You can furthermore tell, if the XDK is in bootloader by looking at iProduct (part of the USB Descriptor). It will either be "XDK Application" or "XDK Bootloader".

The CoreID is used to match XDKs detected via JTAG/SWD and via USB. The CoreID (extracted via JTAG) is the same as the value that is returned when sending i to the bootloader.

Does this help?


Bastian
0 (0 투표)
How XDK workbench recognizes a XDK device?
응답
15. 11. 17 오전 8:47 as a reply to Wolf-Bastian Pöttner.
Hi Bastian,

That helps a lot! Thank you very much!

Frank
0 (0 투표)
How XDK workbench recognizes a XDK device?
응답
16. 3. 1 오전 8:19 as a reply to Frank Slomian.
Hi!

Is it possible to get the source code (Java) to detect the XDK and the CoreID without sending the i to XDK?

Frank
0 (0 투표)
How XDK workbench recognizes a XDK device?
응답
16. 3. 22 오후 2:29 as a reply to Frank Slomian.
Hi Frank,

sorry for letting you waiting so long, I needed to contact the development team because of this issue.
To detect the XDK, you necessary need to send the "i" to the device via a serial command for example like this:
 
SerialPort result =  new SerialPort(portName);
result.openPort();
result.setParams(SerialPort. BAUDRATE_115200, SerialPort. DATABITS_8, SerialPort. STOPBITS_1, SerialPort. PARITY_NONE);
….
ISerialDevice device =  new JsscSerialDevice(port);
device.write("i");
String bootloaderAndChipId =  new String(device.readBytes(54, 200));
return bootloaderAndChipId.substring(38, bootloaderAndChipId.length())
Please tell me if this helps.

Kind regards,
Manuel
0 (0 투표)