Reg: Command handling Via USB driver


Mahendravarman Rajarao (RBEI/EAA10) <Mahendravarman.Rajarao@...>
 

Hi

 

We are using Quark_C1000 controller in our project along with zephyr 1.6.

I could see zephyr 1.6 has support for USB.

 

I have a query.

 

We are currently having a requirement of send some commands via USB (from a PC)  and based on the commands received (in the device ) we will execute certain applications.

 

For this requirement I need clarifications regarding the USB driver.

 

I could see that the USB DFU handles command which is sent from a PC.

Do I need to expand this driver itself for my requirement or Should I use the USB UART driver for my requirement ?

 

Thanks

Mahendra


Andrei
 

Hi Mahendra,

On Thu, Mar 09, 2017 at 04:54:23AM +0000, Mahendravarman Rajarao (RBEI/EAA10) wrote:
Hi

We are using Quark_C1000 controller in our project along with zephyr 1.6.
I could see zephyr 1.6 has support for USB.

I have a query.

We are currently having a requirement of send some commands via USB (from
a PC)  and based on the commands received (in the device ) we will execute
certain applications.

For this requirement I need clarifications regarding the USB driver.

I could see that the USB DFU handles command which is sent from a PC.

Do I need to expand this driver itself for my requirement or Should I use
the USB UART driver for my requirement ?
It is easier to use cdc_acm sample in samples/usb/cdc_acm, then your PC
already has the driver for it and it appears on your PC as ttyACM or
ttyUSB, then you can communicate over serial.

If you want to implement certain USB class like Bluetooth in hci_usb
sample you should look here: samples/bluetooth/hci_usb/

For other samples you need AFAIK to have certain driver, like btusb for
hci_usb, etc.

Best regards
Andrei Emeltchenko


Mahendravarman Rajarao (RBEI/EAA10) <Mahendravarman.Rajarao@...>
 

Hi

Thanks for the reply
But as of now with the available zephyr, the USB can work either as DFU flashing or as UART over USB (CDC) and not both functionalities together.

We have a requirement at End of Line, we need to pass commands from a PC to test each interfaces. And finally we need to flash the functional software to the device via DFU flashing.

So only I have a doubt that can we use USB DFU class and expand the driver to handle some more custom commands other than DFU commands to satisfy my requirement.

Please suggest !!

Thanks
Mahendra

-----Original Message-----
From: Andrei Emeltchenko [mailto:andrei.emeltchenko.news@...]
Sent: Thursday, March 09, 2017 1:47 PM
To: Mahendravarman Rajarao (RBEI/EAA10) <Mahendravarman.Rajarao@...>
Cc: devel@...
Subject: Re: [Zephyr-devel] Reg: Command handling Via USB driver

Hi Mahendra,

On Thu, Mar 09, 2017 at 04:54:23AM +0000, Mahendravarman Rajarao (RBEI/EAA10) wrote:
Hi

We are using Quark_C1000 controller in our project along with zephyr 1.6.
I could see zephyr 1.6 has support for USB.

I have a query.

We are currently having a requirement of send some commands via USB (from
a PC)  and based on the commands received (in the device ) we will execute
certain applications.

For this requirement I need clarifications regarding the USB driver.

I could see that the USB DFU handles command which is sent from a PC.

Do I need to expand this driver itself for my requirement or Should I use
the USB UART driver for my requirement ?
It is easier to use cdc_acm sample in samples/usb/cdc_acm, then your PC already has the driver for it and it appears on your PC as ttyACM or ttyUSB, then you can communicate over serial.

If you want to implement certain USB class like Bluetooth in hci_usb sample you should look here: samples/bluetooth/hci_usb/

For other samples you need AFAIK to have certain driver, like btusb for hci_usb, etc.

Best regards
Andrei Emeltchenko


Andrei
 

Hi,

On Tue, Mar 14, 2017 at 09:02:55AM +0000, Mahendravarman Rajarao (RBEI/EAA10) wrote:
Hi

Thanks for the reply But as of now with the available zephyr, the USB
can work either as DFU flashing or as UART over USB (CDC) and not both
functionalities together.

We have a requirement at End of Line, we need to pass commands from a
PC to test each interfaces. And finally we need to flash the
functional software to the device via DFU flashing.

So only I have a doubt that can we use USB DFU class and expand the
driver to handle some more custom commands other than DFU commands to
satisfy my requirement.

Please suggest !!
You can combine those descriptors together to have multifunction device.
http://www.beyondlogic.org/usbnutshell/usb5.shtml
(I have not tried it myself)

Best regards
Andrei Emeltchenko


Thanks
Mahendra

-----Original Message-----
From: Andrei Emeltchenko [mailto:andrei.emeltchenko.news@...]
Sent: Thursday, March 09, 2017 1:47 PM
To: Mahendravarman Rajarao (RBEI/EAA10) <Mahendravarman.Rajarao@...>
Cc: devel@...
Subject: Re: [Zephyr-devel] Reg: Command handling Via USB driver

Hi Mahendra,

On Thu, Mar 09, 2017 at 04:54:23AM +0000, Mahendravarman Rajarao (RBEI/EAA10) wrote:
Hi

We are using Quark_C1000 controller in our project along with zephyr 1.6.
I could see zephyr 1.6 has support for USB.

I have a query.

We are currently having a requirement of send some commands via USB (from
a PC)  and based on the commands received (in the device ) we will execute
certain applications.

For this requirement I need clarifications regarding the USB driver.

I could see that the USB DFU handles command which is sent from a PC.

Do I need to expand this driver itself for my requirement or Should I use
the USB UART driver for my requirement ?
It is easier to use cdc_acm sample in samples/usb/cdc_acm, then your PC already has the driver for it and it appears on your PC as ttyACM or ttyUSB, then you can communicate over serial.

If you want to implement certain USB class like Bluetooth in hci_usb sample you should look here: samples/bluetooth/hci_usb/

For other samples you need AFAIK to have certain driver, like btusb for hci_usb, etc.

Best regards
Andrei Emeltchenko


Marti Bolivar <marti.bolivar@...>
 

On 15 March 2017 at 04:52, Andrei Emeltchenko
<andrei.emeltchenko.news@...> wrote:
Hi,

On Tue, Mar 14, 2017 at 09:02:55AM +0000, Mahendravarman Rajarao (RBEI/EAA10) wrote:
Hi

Thanks for the reply But as of now with the available zephyr, the USB
can work either as DFU flashing or as UART over USB (CDC) and not both
functionalities together.

We have a requirement at End of Line, we need to pass commands from a
PC to test each interfaces. And finally we need to flash the
functional software to the device via DFU flashing.

So only I have a doubt that can we use USB DFU class and expand the
driver to handle some more custom commands other than DFU commands to
satisfy my requirement.

Please suggest !!
You can combine those descriptors together to have multifunction device.
http://www.beyondlogic.org/usbnutshell/usb5.shtml
(I have not tried it myself)
IIRC, last time I tried this (5 or so years ago), composite devices
required custom drivers on Windows. That may not work for a factory
line test environment; these tend to involve very locked down PCs that
don't even allow custom unprivileged executables, much less device
drivers. The situation may have gotten better since then.

Marti


Best regards
Andrei Emeltchenko


Thanks
Mahendra

-----Original Message-----
From: Andrei Emeltchenko [mailto:andrei.emeltchenko.news@...]
Sent: Thursday, March 09, 2017 1:47 PM
To: Mahendravarman Rajarao (RBEI/EAA10) <Mahendravarman.Rajarao@...>
Cc: devel@...
Subject: Re: [Zephyr-devel] Reg: Command handling Via USB driver

Hi Mahendra,

On Thu, Mar 09, 2017 at 04:54:23AM +0000, Mahendravarman Rajarao (RBEI/EAA10) wrote:
Hi

We are using Quark_C1000 controller in our project along with zephyr 1.6.
I could see zephyr 1.6 has support for USB.

I have a query.

We are currently having a requirement of send some commands via USB (from
a PC) and based on the commands received (in the device ) we will execute
certain applications.

For this requirement I need clarifications regarding the USB driver.

I could see that the USB DFU handles command which is sent from a PC.

Do I need to expand this driver itself for my requirement or Should I use
the USB UART driver for my requirement ?
It is easier to use cdc_acm sample in samples/usb/cdc_acm, then your PC already has the driver for it and it appears on your PC as ttyACM or ttyUSB, then you can communicate over serial.

If you want to implement certain USB class like Bluetooth in hci_usb sample you should look here: samples/bluetooth/hci_usb/

For other samples you need AFAIK to have certain driver, like btusb for hci_usb, etc.

Best regards
Andrei Emeltchenko
_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@...
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel