cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 USB VCP extra symbols

markkonnov
Associate II
Posted on November 28, 2016 at 23:46

Configuration:

STM32F107, Linux PC, VCP library provided by STM.

Received data is buffered from interrupt and reading within RTOS task context. When resetting device, it's start to be visible as /dev/ttyACM0. Ok. But before the text listed below is received, I can't connect to device. The text is following:

AT

AT

AT

\000\360~~\000x\360~

Is smbd familiar with it ? Obviously, it's a commands that Linux driver sending to device. But I can't open the device (minicom, cutecom, cat command) before all of this commands is received.

So there's my questions:

1. Is there's a way to connect to device immediately when it appears ?

2. How can I filter this symbols from receiving symbol stream ? I'm dealing not only with plain text info from PC so I can't just filter it as direct comparison with 'AT', \000, etc.

3. Is there's a way to detect on STM32 side that device is opened within OS ?

4. Is there's any documentation for STM32 USB software stack ?

Thanks.

#usb #linux #f107 #stm32-vcp-usb #cdc #linux
1 REPLY 1
tsuneo
Senior
Posted on November 29, 2016 at 16:35

> 1. Is there's a way to connect to device immediately when it appears ?

 

> 2. How can I filter this symbols from receiving symbol stream ? I'm dealing not only with plain text info from PC so I can't just filter it as direct comparison with 'AT', \000, etc.

The Modem manager on the Linux probes your CDC(-ACM) device at plug in, by sending a couple of AT commands over the bulk OUT endpoint.

If this would be your case, you may add a udev rule, so that the Modem manager should ignore your device.

As of the udev rule, for example,

http://ubuntuforums.org/showthread.php?t=2056285&p=12581391#post12581391

For the ST's CDC example, VID/PID = 0x0483 / 0x5740 (1155 / 22336 in decimal)

ATTRS{idVendor}==''0483'', ATTRS{idProduct}==''5740'', ENV{ID_MM_DEVICE_IGNORE}=''1''

Tsuneo