How to run samples/subsys/usb/console on windows with nrf52840_pac10056?


Aaron Xu
 

Hi,
I want to evaluate the samples/subsys/usb/console sample. It looks quite easy from the README file. But my PC(win10) cannot recognize the USB console(I suppose CDC device) correctly.

PS: I connect the J3 port on pca10056 to my PC and switch the SW9 to "USB".

usb.png

Do I miss something?
Thanks.


Carles Cufi
 

Hi Aaron,

 

This is because Windows needs an .inf file with matching VID/PID.

Marcin from Nordic is currently working on addressing that.

 

See: https://github.com/zephyrproject-rtos/zephyr/pull/14106

 

Carles

 

From: devel@... <devel@...> On Behalf Of Aaron Xu via Lists.Zephyrproject.Org
Sent: 16 March 2019 02:10
To: zephyr-devel <zephyr-devel@...>
Cc: devel@...
Subject: [Zephyr-devel] How to run samples/subsys/usb/console on windows with nrf52840_pac10056?

 

Hi,

I want to evaluate the samples/subsys/usb/console sample. It looks quite easy from the README file. But my PC(win10) cannot recognize the USB console(I suppose CDC device) correctly.

 

PS: I connect the J3 port on pca10056 to my PC and switch the SW9 to "USB".

 

usb.png

 

Do I miss something?

Thanks.


Lars Knudsen
 

Hi Carles,

If the right descriptors are added, it should be possible to get working without the *.inf file.  Windows is a mess - but it *is* possible.

There seem to be something wrong in the descriptors (at least in the WebUSB sample) preventing windows from picking up the device sans drivers - but I know it is possible because I made it in this project (mbed based... trying to find time to port it over ;)) ->


(it depends on this lib that has some of the webusb support -> https://os.mbed.com/users/larsgk/code/USBDevice_WebUSB/file/1d8a6665d607/WebUSBDevice/ )

Also... remember that windows remembers devices and their drivers.. and during development/test of the solution, the easiest might be to have a clean windows VM that can be deleted on every try ... that or bump the PID ;) ... windows is ..interesting

br
Lars


On Sat, Mar 16, 2019 at 12:42 PM Cufi, Carles <carles.cufi@...> wrote:

Hi Aaron,

 

This is because Windows needs an .inf file with matching VID/PID.

Marcin from Nordic is currently working on addressing that.

 

See: https://github.com/zephyrproject-rtos/zephyr/pull/14106

 

Carles

 

From: devel@... <devel@...> On Behalf Of Aaron Xu via Lists.Zephyrproject.Org
Sent: 16 March 2019 02:10
To: zephyr-devel <zephyr-devel@...>
Cc: devel@...
Subject: [Zephyr-devel] How to run samples/subsys/usb/console on windows with nrf52840_pac10056?

 

Hi,

I want to evaluate the samples/subsys/usb/console sample. It looks quite easy from the README file. But my PC(win10) cannot recognize the USB console(I suppose CDC device) correctly.

 

PS: I connect the J3 port on pca10056 to my PC and switch the SW9 to "USB".

 

usb.png

 

Do I miss something?

Thanks.


Lars Knudsen
 

I just found this awesome article by Reilly Grant covering all the quirks:


On Sat, Mar 16, 2019 at 12:58 PM Lars Knudsen via Lists.Zephyrproject.Org <larsgk=gmail.com@...> wrote:
Hi Carles,

If the right descriptors are added, it should be possible to get working without the *.inf file.  Windows is a mess - but it *is* possible.

There seem to be something wrong in the descriptors (at least in the WebUSB sample) preventing windows from picking up the device sans drivers - but I know it is possible because I made it in this project (mbed based... trying to find time to port it over ;)) ->


(it depends on this lib that has some of the webusb support -> https://os.mbed.com/users/larsgk/code/USBDevice_WebUSB/file/1d8a6665d607/WebUSBDevice/ )

Also... remember that windows remembers devices and their drivers.. and during development/test of the solution, the easiest might be to have a clean windows VM that can be deleted on every try ... that or bump the PID ;) ... windows is ..interesting

br
Lars

On Sat, Mar 16, 2019 at 12:42 PM Cufi, Carles <carles.cufi@...> wrote:

Hi Aaron,

 

This is because Windows needs an .inf file with matching VID/PID.

Marcin from Nordic is currently working on addressing that.

 

See: https://github.com/zephyrproject-rtos/zephyr/pull/14106

 

Carles

 

From: devel@... <devel@...> On Behalf Of Aaron Xu via Lists.Zephyrproject.Org
Sent: 16 March 2019 02:10
To: zephyr-devel <zephyr-devel@...>
Cc: devel@...
Subject: [Zephyr-devel] How to run samples/subsys/usb/console on windows with nrf52840_pac10056?

 

Hi,

I want to evaluate the samples/subsys/usb/console sample. It looks quite easy from the README file. But my PC(win10) cannot recognize the USB console(I suppose CDC device) correctly.

 

PS: I connect the J3 port on pca10056 to my PC and switch the SW9 to "USB".

 

usb.png

 

Do I miss something?

Thanks.


Andrei
 

Hi,

On Sat, Mar 16, 2019 at 11:42:17AM +0000, Cufi, Carles wrote:
Hi Aaron,

This is because Windows needs an .inf file with matching VID/PID.
The inf file is needed only for older versions of Windows, the latest
one (Win10) only needs this patch from the PR below:

https://github.com/zephyrproject-rtos/zephyr/pull/14106/commits/bfc3b563aff5025108f625240f24fff31fda38bf

Best regards
Andrei Emeltchenko


Marcin from Nordic is currently working on addressing that.

 

See: [1]https://github.com/zephyrproject-rtos/zephyr/pull/14106

 

Carles

 

From: devel@... <devel@...> On
Behalf Of Aaron Xu via Lists.Zephyrproject.Org
Sent: 16 March 2019 02:10
To: zephyr-devel <zephyr-devel@...>
Cc: devel@...
Subject: [Zephyr-devel] How to run samples/subsys/usb/console on windows
with nrf52840_pac10056?

 

Hi,

I want to evaluate the samples/subsys/usb/console sample. It looks quite
easy from the README file. But my PC(win10) cannot recognize the USB
console(I suppose CDC device) correctly.

 

PS: I connect the J3 port on pca10056 to my PC and switch the SW9 to
"USB".

 

[2]usb.png

 

Do I miss something?

Thanks.



References

Visible links
1. https://github.com/zephyrproject-rtos/zephyr/pull/14106
3. https://lists.zephyrproject.org/g/devel/message/5795
4. mailto:carles.cufi@...?subject=Private:%20Re:%20Re%3A%20%5BZephyr-devel%5D%20How%20to%20run%20samples%2Fsubsys%2Fusb%2Fconsole%20on%20windows%20with%20nrf52840_pac10056%3F
5. mailto:devel@...?subject=Re:%20Re%3A%20%5BZephyr-devel%5D%20How%20to%20run%20samples%2Fsubsys%2Fusb%2Fconsole%20on%20windows%20with%20nrf52840_pac10056%3F
6. https://lists.zephyrproject.org/mt/30449543/900599
7. https://lists.zephyrproject.org/g/devel/post
8. https://lists.zephyrproject.org/g/devel/editsub/900599
9. mailto:devel+owner@...
10. https://lists.zephyrproject.org/g/devel/unsub


Andrei
 

Hi Lars,

On Sat, Mar 16, 2019 at 12:57:52PM +0100, Lars Knudsen wrote:
Hi Carles,
If the right descriptors are added, it should be possible to get working
without the *.inf file.  Windows is a mess - but it *is* possible.
There seem to be something wrong in the descriptors (at least in the
WebUSB sample) preventing windows from picking up the device sans drivers
- but I know it is possible because I made it in this project (mbed
based... trying to find time to port it over ;)) ->
Do they use MS OS Descriptors to pick right driver? We have this
capability in Zephyr, it is used in RNDIS to pick RNDIS compatible
device driver.

You can also create issue for the sample.

Best regards
Andrei Emeltchenko

[1]https://github.com/empirikit/empirikit-controller
(it depends on this lib that has some of the webusb support
-> [2]https://os.mbed.com/users/larsgk/code/USBDevice_WebUSB/file/1d8a6665d607/WebUSBDevice/
)
Also... remember that windows remembers devices and their drivers.. and
during development/test of the solution, the easiest might be to have a
clean windows VM that can be deleted on every try ... that or bump the PID
;) ... windows is ..interesting
br
Lars
On Sat, Mar 16, 2019 at 12:42 PM Cufi, Carles
<[3]carles.cufi@...> wrote:

Hi Aaron,

 

This is because Windows needs an .inf file with matching VID/PID.

Marcin from Nordic is currently working on addressing that.

 

See: [4]https://github.com/zephyrproject-rtos/zephyr/pull/14106

 

Carles

 

From: [5]devel@...
<[6]devel@...> On Behalf Of Aaron Xu via
[7]Lists.Zephyrproject.Org
Sent: 16 March 2019 02:10
To: zephyr-devel <[8]zephyr-devel@...>
Cc: [9]devel@...
Subject: [Zephyr-devel] How to run samples/subsys/usb/console on windows
with nrf52840_pac10056?

 

Hi,

I want to evaluate the samples/subsys/usb/console sample. It looks quite
easy from the README file. But my PC(win10) cannot recognize the USB
console(I suppose CDC device) correctly.

 

PS: I connect the J3 port on pca10056 to my PC and switch the SW9 to
"USB".

 

[10]usb.png

 

Do I miss something?

Thanks.



References

Visible links
1. https://github.com/empirikit/empirikit-controller
2. https://os.mbed.com/users/larsgk/code/USBDevice_WebUSB/file/1d8a6665d607/WebUSBDevice/
3. mailto:carles.cufi@...
4. https://github.com/zephyrproject-rtos/zephyr/pull/14106
5. mailto:devel@...
6. mailto:devel@...
7. http://lists.zephyrproject.org/
8. mailto:zephyr-devel@...
9. mailto:devel@...
11. https://lists.zephyrproject.org/g/devel/message/5796
12. mailto:larsgk@...?subject=Private:%20Re:%20Re%3A%20%5BZephyr-devel%5D%20How%20to%20run%20samples%2Fsubsys%2Fusb%2Fconsole%20on%20windows%20with%20nrf52840_pac10056%3F
13. mailto:devel@...?subject=Re:%20Re%3A%20%5BZephyr-devel%5D%20How%20to%20run%20samples%2Fsubsys%2Fusb%2Fconsole%20on%20windows%20with%20nrf52840_pac10056%3F
14. https://lists.zephyrproject.org/mt/30449543/900599
15. https://lists.zephyrproject.org/g/devel/post
16. https://lists.zephyrproject.org/g/devel/editsub/900599
17. mailto:devel+owner@...
18. https://lists.zephyrproject.org/g/devel/unsub


Aaron Xu
 

Hi,

After updating my zephyr code to latest, I found some patch already done both on USB driver and sample. Good job!
And the result of console sample on my win10 PC is changed, there is one more Zephyr port, looks the USB device already be recognized, but still not works.

Any patch pending not merged?

2.png


On Mon, Mar 18, 2019 at 3:36 PM Andrei Emeltchenko <andrei.emeltchenko.news@...> wrote:
Hi Lars,

On Sat, Mar 16, 2019 at 12:57:52PM +0100, Lars Knudsen wrote:
>    Hi Carles,
>    If the right descriptors are added, it should be possible to get working
>    without the *.inf file.  Windows is a mess - but it *is* possible.
>    There seem to be something wrong in the descriptors (at least in the
>    WebUSB sample) preventing windows from picking up the device sans drivers
>    - but I know it is possible because I made it in this project (mbed
>    based... trying to find time to port it over ;)) ->

Do they use MS OS Descriptors to pick right driver? We have this
capability in Zephyr, it is used in RNDIS to pick RNDIS compatible
device driver.

You can also create issue for the sample.

Best regards
Andrei Emeltchenko

>    [1]https://github.com/empirikit/empirikit-controller
>    (it depends on this lib that has some of the webusb support
>    -> [2]https://os.mbed.com/users/larsgk/code/USBDevice_WebUSB/file/1d8a6665d607/WebUSBDevice/
>    )
>    Also... remember that windows remembers devices and their drivers.. and
>    during development/test of the solution, the easiest might be to have a
>    clean windows VM that can be deleted on every try ... that or bump the PID
>    ;) ... windows is ..interesting
>    br
>    Lars
>    On Sat, Mar 16, 2019 at 12:42 PM Cufi, Carles
>    <[3]carles.cufi@...> wrote:
>
>      Hi Aaron,
>
>       
>
>      This is because Windows needs an .inf file with matching VID/PID.
>
>      Marcin from Nordic is currently working on addressing that.
>
>       
>
>      See: [4]https://github.com/zephyrproject-rtos/zephyr/pull/14106
>
>       
>
>      Carles
>
>       
>
>      From: [5]devel@...
>      <[6]devel@...> On Behalf Of Aaron Xu via
>      [7]Lists.Zephyrproject.Org
>      Sent: 16 March 2019 02:10
>      To: zephyr-devel <[8]zephyr-devel@...>
>      Cc: [9]devel@...
>      Subject: [Zephyr-devel] How to run samples/subsys/usb/console on windows
>      with nrf52840_pac10056?
>
>       
>
>      Hi,
>
>      I want to evaluate the samples/subsys/usb/console sample. It looks quite
>      easy from the README file. But my PC(win10) cannot recognize the USB
>      console(I suppose CDC device) correctly.
>
>       
>
>      PS: I connect the J3 port on pca10056 to my PC and switch the SW9 to
>      "USB".
>
>       
>
>      [10]usb.png
>
>       
>
>      Do I miss something?
>
>      Thanks.
> >
> References
>
>    Visible links
>    1. https://github.com/empirikit/empirikit-controller
>    2. https://os.mbed.com/users/larsgk/code/USBDevice_WebUSB/file/1d8a6665d607/WebUSBDevice/
>    3. mailto:carles.cufi@...
>    4. https://github.com/zephyrproject-rtos/zephyr/pull/14106
>    5. mailto:devel@...
>    6. mailto:devel@...
>    7. http://lists.zephyrproject.org/
>    8. mailto:zephyr-devel@...
>    9. mailto:devel@...
>   11. https://lists.zephyrproject.org/g/devel/message/5796
>   12. mailto:larsgk@...?subject=Private:%20Re:%20Re%3A%20%5BZephyr-devel%5D%20How%20to%20run%20samples%2Fsubsys%2Fusb%2Fconsole%20on%20windows%20with%20nrf52840_pac10056%3F
>   13. mailto:devel@...?subject=Re:%20Re%3A%20%5BZephyr-devel%5D%20How%20to%20run%20samples%2Fsubsys%2Fusb%2Fconsole%20on%20windows%20with%20nrf52840_pac10056%3F
>   14. https://lists.zephyrproject.org/mt/30449543/900599
>   15. https://lists.zephyrproject.org/g/devel/post
>   16. https://lists.zephyrproject.org/g/devel/editsub/900599
>   17. mailto:devel+owner@...
>   18. https://lists.zephyrproject.org/g/devel/unsub



Carles Cufi
 

Hi Aaron,

 

There is a Pull Request to fix this, but it is not merged yet:

https://github.com/zephyrproject-rtos/zephyr/pull/14106

 

Regards,

 

Carles

 

From: Aaron Xu <overheat1984@...>
Sent: 28 March 2019 12:30
To: Andrei Emeltchenko <andrei.emeltchenko.news@...>
Cc: Lars Knudsen <larsgk@...>; Cufi, Carles <Carles.Cufi@...>; zephyr-devel <zephyr-devel@...>; Szymczyk, Marcin <Marcin.Szymczyk@...>; devel@...
Subject: Re: [Zephyr-devel] How to run samples/subsys/usb/console on windows with nrf52840_pac10056?

 

Hi,

 

After updating my zephyr code to latest, I found some patch already done both on USB driver and sample. Good job!
And the result of console sample on my win10 PC is changed, there is one more Zephyr port, looks the USB device already be recognized, but still not works.

Any patch pending not merged?

 

2.png

 

 

On Mon, Mar 18, 2019 at 3:36 PM Andrei Emeltchenko <andrei.emeltchenko.news@...> wrote:

Hi Lars,

On Sat, Mar 16, 2019 at 12:57:52PM +0100, Lars Knudsen wrote:
>    Hi Carles,
>    If the right descriptors are added, it should be possible to get working
>    without the *.inf file.  Windows is a mess - but it *is* possible.
>    There seem to be something wrong in the descriptors (at least in the
>    WebUSB sample) preventing windows from picking up the device sans drivers
>    - but I know it is possible because I made it in this project (mbed
>    based... trying to find time to port it over ;)) ->

Do they use MS OS Descriptors to pick right driver? We have this
capability in Zephyr, it is used in RNDIS to pick RNDIS compatible
device driver.

You can also create issue for the sample.

Best regards
Andrei Emeltchenko

>    [1]https://github.com/empirikit/empirikit-controller
>    (it depends on this lib that has some of the webusb support
>    -> [2]https://os.mbed.com/users/larsgk/code/USBDevice_WebUSB/file/1d8a6665d607/WebUSBDevice/
>    )
>    Also... remember that windows remembers devices and their drivers.. and
>    during development/test of the solution, the easiest might be to have a
>    clean windows VM that can be deleted on every try ... that or bump the PID
>    ;) ... windows is ..interesting
>    br
>    Lars
>    On Sat, Mar 16, 2019 at 12:42 PM Cufi, Carles
>    <[3]carles.cufi@...> wrote:
>
>      Hi Aaron,
>
>       
>
>      This is because Windows needs an .inf file with matching VID/PID.
>
>      Marcin from Nordic is currently working on addressing that.
>
>       
>
>      See: [4]https://github.com/zephyrproject-rtos/zephyr/pull/14106
>
>       
>
>      Carles
>
>       
>
>      From: [5]devel@...
>      <[6]devel@...> On Behalf Of Aaron Xu via
>      [7]Lists.Zephyrproject.Org
>      Sent: 16 March 2019 02:10
>      To: zephyr-devel <[8]zephyr-devel@...>
>      Cc: [9]devel@...
>      Subject: [Zephyr-devel] How to run samples/subsys/usb/console on windows
>      with nrf52840_pac10056?
>
>       
>
>      Hi,
>
>      I want to evaluate the samples/subsys/usb/console sample. It looks quite
>      easy from the README file. But my PC(win10) cannot recognize the USB
>      console(I suppose CDC device) correctly.
>
>       
>
>      PS: I connect the J3 port on pca10056 to my PC and switch the SW9 to
>      "USB".
>
>       
>
>      [10]usb.png
>
>       
>
>      Do I miss something?
>
>      Thanks.
> >
> References
>
>    Visible links
>    1. https://github.com/empirikit/empirikit-controller
>    2. https://os.mbed.com/users/larsgk/code/USBDevice_WebUSB/file/1d8a6665d607/WebUSBDevice/
>    3. mailto:carles.cufi@...
>    4. https://github.com/zephyrproject-rtos/zephyr/pull/14106
>    5. mailto:devel@...
>    6. mailto:devel@...
>    7. http://lists.zephyrproject.org/
>    8. mailto:zephyr-devel@...
>    9. mailto:devel@...
>   11. https://lists.zephyrproject.org/g/devel/message/5796
>   12. mailto:larsgk@...?subject=Private:%20Re:%20Re%3A%20%5BZephyr-devel%5D%20How%20to%20run%20samples%2Fsubsys%2Fusb%2Fconsole%20on%20windows%20with%20nrf52840_pac10056%3F
>   13. mailto:devel@...?subject=Re:%20Re%3A%20%5BZephyr-devel%5D%20How%20to%20run%20samples%2Fsubsys%2Fusb%2Fconsole%20on%20windows%20with%20nrf52840_pac10056%3F
>   14. https://lists.zephyrproject.org/mt/30449543/900599
>   15. https://lists.zephyrproject.org/g/devel/post
>   16. https://lists.zephyrproject.org/g/devel/editsub/900599
>   17. mailto:devel+owner@...
>   18. https://lists.zephyrproject.org/g/devel/unsub