AnsweredAssumed Answered

Python HSDK problem in Linux

Question asked by Gabor Szabo on Jun 28, 2017
Latest reply on Jul 5, 2017 by Gabor Szabo

I have some problems with the Python HSDK (MKW41Z_ConnSw_1.0.2) in Ubuntu 17.04:

 

1./ the Python DeviceManager seems to me get wrong device list from the C lib:

In [2]: from com.nxp.wireless_connectivity.hsdk.device.device_manager import DeviceManager

In [3]: dm = DeviceManager()

In [4]: dm.initDeviceList(True)
[Command 0] /dev/ttyUSB0: Sniffer_DetectRequest -> { }
No response for the previous command <com.nxp.wireless_connectivity.commands.thread.frames.Sniffer_DetectRequest object at 0x7f7dc8194e90>
[Command 1] /dev/ttyACM0: Sniffer_DetectRequest -> { }
No response for the previous command <com.nxp.wireless_connectivity.commands.thread.frames.Sniffer_DetectRequest object at 0x7f7dc8194e90>
[Command 2] /dev/ttyACM1: Sniffer_DetectRequest -> { }
No response for the previous command <com.nxp.wireless_connectivity.commands.thread.frames.Sniffer_DetectRequest object at 0x7f7dc8194e90>

In [5]: dm.getDevices()
Out[5]:
[True /dev/ttyUSB0 /dev/ttyUSB0 True 067b 2303Sniffer: False,
True /dev/ttyACM0 /dev/ttyACM0 True 1366 1015Sniffer: False,
True /dev/ttyACM1 /dev/ttyACM1 True 15a2 0300Sniffer: False]

 

2./ the Sniffer detection is not working

In the above example the ttyACM1 was a USB-KW41Z sniffer which is working under Windows with the Wireshark adapter

 

3./ something wrong with the C library because with GetKinetisDevices demo app I also get wrong result:

sz@pc:~/REPOS/MKW41Z_ConnSw_1.0.2/tools/wireless/host_sdk/hsdk/demo/bin$ ./GetKinetisDevices
Device name /dev/ttyUSB0
VID 067b
PID 2303
Friendly name /dev/ttyUSB0
Availability 1
KinetisDev 1
NXP Kinetis-W device on /dev/ttyUSB0. <-- PL2303 RS232 USB 
Device name /dev/ttyACM0
VID 1366
PID 1015
Friendly name /dev/ttyACM0
Availability 1
KinetisDev 1
NXP Kinetis-W device on /dev/ttyACM0.
Device name /dev/ttyACM1
VID 15a2
PID 0300
Friendly name /dev/ttyACM1
Availability 1
KinetisDev 1
NXP Kinetis-W device on /dev/ttyACM1

 

I added some debug prints to the code to see what is wrong and if I understand well the VID/PID lookup form the whitelist is not working.   

 

Is there any fix for the problems?

 

Regards,

Gabor

Outcomes