Option COMPOSITE_VENDORSTR should be described as composite vendor
string, not vendor id. This is consistent with other USB devices.
Also fixes a typo in USBDEV_EPBUFFER_ALIGNMENT.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
To be compatible with the previous method, add a buf between cdcacm
and serial. Because when using usbreqbuf directly as the buf of serial,
the amount of data sent may be insufficient due to the limit of the
number of reqs. For example, when the number of reqs is 4, the number
of data send through cdcacm is 5, and each data is a separate USB
packet, if the host does not read in time, resulting in blocking send.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
To be compatible with the previous method, add a buf between cdcacm
and serial. Because when using usbreqbuf directly as the buf of serial,
the amount of data received may be insufficient due to the limit of the
number of reqs. For example, when the number of reqs is 4, the number
of data received through cdcacm is 5, and each data is a separate USB
packet, which should require 5 reqs, resulting in the last number not
being received. If the application always waits for 5 numbers before
performing an operation, this will cause problems.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
In cdcacm, USB req buf is directly used as serial buf, so the getting
buf status operation in ioctl is different from the original serial.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
Use the CDCACM as a SYSLOG output device, send message to remote proc.
If there are more than one CDCACM devices, then a device minor number
may also need to be provided. Default: 0
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
Data form serial framework will be written to usb reqbuf directly,
and data form cdcacm will be read form reqbuf directly.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
Make sure that the cdcacm is disconnected before the usbdev gets unregistered.
Also, check if the device is connected or not in cdcuart_txempty (uart_txempty). Otherwise there may be a crash during uart_tcdrain, called in tty close path, if the usbdev unregistration happens during the loop.
This issue can be triggered by monitoring the cable connection status in one thread, sending BOARDIOC_USBDEV_DISCONNECT if the usb cable is detached. In another thread close the ttyACM.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This patch fixed userspace headers conflict. Architecture-related definition and API should not be exposed to users.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
The request length may not exceed CONFIG_CDCACM_BULKIN_ lenghts, otherwise buffer overflow will occur
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
Some USB controllers can receive or send multiple data packets then
generate one interrupt. This mechanism can reduce the number of data
copies. Extend req buf to accommodate this.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
./build.sh sim:usbdev -j12
sudo gdb nuttx/nuttx -ex "source nuttx/tools/gdb/__init__.py"
below command to create mbim NIC on host
nsh> conn 3
NuttX's MBIM device implementation adds an additional MBIM network
card to the NuttX system, which can debug the data communication with
the host, but this network card is unnecessary and needs to be removed
when the business actually uses this driver, And the cdcncm_receive
method needs to be re-implemented.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
1. increase CDCECM_MXDESCLEN to avoid memory overrun when sending
configuration description(mkcfmdesc) information
2. correct the request structure used in the notify phase
3. disable unused configuration options
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
optimize the interaction flow associated with network drivers to reduce
the amount of code and improve compatibility
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>