# [solved] cdc_acm no device /dev/ttyACM0 created.

## musv

Hi, 

I'm trying to connect to my new Lenovo TAB2 10-70 via SP Flash Tool. 

http://forum.xda-developers.com/general/rooting-roms/tutorial-how-to-setup-spflashtoollinux-t3160802

According to this page, dmesg should print something like this:

```
[  779.497226] usb 1-4: USB disconnect, device number 4

[  781.504605] usb 1-4: new high-speed USB device number 5 using ehci-pci

[  781.619451] usb 1-4: New USB device found, idVendor=0bb4, idProduct=0c01

[  781.619455] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[  781.619458] usb 1-4: Product: Android

[  781.619461] usb 1-4: Manufacturer: MediaTek

[  781.619463] usb 1-4: SerialNumber: PJUGCEJV79DEWS8S

[  781.619463] usbcore: registered new interface driver cdc_acm
```

I get instead:

```

Nov 19 15:47:21 hexe kernel: usb 1-4: USB disconnect, device number 4

Nov 19 15:47:23 hexe kernel: usb 1-4: new high-speed USB device number 5 using ehci-pci

Nov 19 15:47:23 hexe kernel: usb 1-4: New USB device found, idVendor=0bb4, idProduct=0c01

Nov 19 15:47:23 hexe kernel: usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3

Nov 19 15:47:23 hexe kernel: usb 1-4: Product: Android

Nov 19 15:47:23 hexe kernel: usb 1-4: Manufacturer: MediaTek

Nov 19 15:47:23 hexe kernel: usb 1-4: SerialNumber: PJUGCEJV79DEWS8S

Nov 19 15:47:23 hexe mtp-probe[1845]: checking bus 1, device 5: "/sys/devices/pci0000:00/0000:00:1a.7/usb1/1-4"

Nov 19 15:47:23 hexe mtp-probe[1845]: bus: 1, device: 5 was not an MTP device
```

```
Bus 001 Device 010: ID 17ef:789b Lenovo 

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               2.00

  bDeviceClass            0 

  bDeviceSubClass         0 

  bDeviceProtocol         0 

  bMaxPacketSize0        64

  idVendor           0x17ef Lenovo

  idProduct          0x789b 

  bcdDevice           ff.ff

  iManufacturer           2 MediaTek

  iProduct                3 Lenovo

  iSerial                 4 PJUGCEJV79DEWS8S

  bNumConfigurations      1
```

The module is installed:

```

CONFIG_USB_ACM=m
```

But there's no /dev/ttyACM0 device. Even If I load the module (modprobe cdc_acm), I don't get the device created.

What am I doing wrong? What's missing?Last edited by musv on Tue Nov 22, 2016 1:03 am; edited 1 time in total

----------

## NeddySeagoon

musv,

Your PC is trying to talk Picture Transfer Protocol  (PTP) and failing.  That may actually be a good sign.

CONFIG_USB_ACM=m says that you have that option configured as a module in your kernel but is is loading?

Does it appear is lsmod?

If not, can you modprobe it?

If modprobe fails, what errors are reported? 

Look at the end of dmesg too

----------

## musv

 *NeddySeagoon wrote:*   

> Your PC is trying to talk Picture Transfer Protocol  (PTP) and failing.  That may actually be a good sign.

 

Yes, I can choose the different protocols. But even if I boot the tablet into the fast mode, there's no connection possible. 

 *NeddySeagoon wrote:*   

> but is is loading?
> 
> Does it appear is lsmod?
> 
> If not, can you modprobe it?

 

It is not loading automatically when I plug the USB cable. 

If I load it via modprobe, it loads fine, appears in lsmod. But it doesn't create the /dev/ttyACM0 device. 

So I guess the hotplug process does not request the module for some reason. The cdc_acm module isn't in use simply.

----------

## NeddySeagoon

musv,

It may be created with a different name.  /dev/ttyUSBx is popular.

Do you get any new /dev/tty entries?

----------

## musv

No, nothing. There's only:

```
/dev/tty    /dev/tty19  /dev/tty3   /dev/tty40  /dev/tty51  /dev/tty62

/dev/tty0   /dev/tty2   /dev/tty30  /dev/tty41  /dev/tty52  /dev/tty63

/dev/tty1   /dev/tty20  /dev/tty31  /dev/tty42  /dev/tty53  /dev/tty7

/dev/tty10  /dev/tty21  /dev/tty32  /dev/tty43  /dev/tty54  /dev/tty8

/dev/tty11  /dev/tty22  /dev/tty33  /dev/tty44  /dev/tty55  /dev/tty9

/dev/tty12  /dev/tty23  /dev/tty34  /dev/tty45  /dev/tty56  /dev/ttyS0

/dev/tty13  /dev/tty24  /dev/tty35  /dev/tty46  /dev/tty57  /dev/ttyS1

/dev/tty14  /dev/tty25  /dev/tty36  /dev/tty47  /dev/tty58  /dev/ttyS2

/dev/tty15  /dev/tty26  /dev/tty37  /dev/tty48  /dev/tty59  /dev/ttyS3

/dev/tty16  /dev/tty27  /dev/tty38  /dev/tty49  /dev/tty6

/dev/tty17  /dev/tty28  /dev/tty39  /dev/tty5   /dev/tty60

/dev/tty18  /dev/tty29  /dev/tty4   /dev/tty50  /dev/tty61
```

Also in the log there's no message about creating a device.

----------

## NeddySeagoon

musv,

Put your kernel .config onto a pastebin please.

----------

## musv

Here you are: 

https://paste.pound-python.org/show/e8M7DD0hcbrMeRXLYHqa/

Btw. thanks a lot for your help.

----------

## NeddySeagoon

musv,

Dating back to my experiences with connecting to a iPaq, a long time ago now,  I suspect you need something under the  CONFIG_USB_GADGET menu.

Your kernel has that off.

```
< >     Serial Gadget (with CDC ACM and CDC OBEX support) (NEW)
```

That looks promising as it mentions ACM

There are a few other ACM things there as well.

----------

## musv

Added the following options:

```
+CONFIG_USB_GADGET=m

+CONFIG_USB_GADGET_VBUS_DRAW=2

+CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2

+CONFIG_USB_LIBCOMPOSITE=m

+CONFIG_USB_F_ACM=m

+CONFIG_USB_F_SS_LB=m

+CONFIG_USB_U_SERIAL=m

+CONFIG_USB_U_ETHER=m

+CONFIG_USB_F_SERIAL=m

+CONFIG_USB_F_OBEX=m

+CONFIG_USB_F_ECM=m

+CONFIG_USB_F_SUBSET=m

+CONFIG_USB_F_RNDIS=m

+CONFIG_USB_F_MASS_STORAGE=m

+CONFIG_USB_ZERO=m

+CONFIG_USB_ETH=m

+CONFIG_USB_ETH_RNDIS=y

+CONFIG_USB_GADGETFS=m

+CONFIG_USB_G_SERIAL=m

+CONFIG_USB_CDC_COMPOSITE=m

+CONFIG_USB_G_ACM_MS=m

+CONFIG_CONFIGFS_FS=m
```

But didn't get any success:

```
Nov 21 19:38:01 hexe kernel: usbcore: registered new interface driver cdc_acm

Nov 21 19:38:01 hexe kernel: cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
```

```
Nov 21 19:45:38 hexe kernel: udc-core: couldn't find an available UDC - added [g_serial] to list of pending drivers
```

But there's still no device. I'm still thinking, an udev rule is missing to catch the device [17ef:789b].

----------

## NeddySeagoon

musv,

If that's true and you know the device major and minor number, you can mknod it by hand and it will just work, since the kernel support will be there.

Its worth a try.  Hint: See /usr/src/linux/Documentation/devices.txt

However, udev only tidies up after devtmpfs in the kernel has made the device node.

udev fixes permissions, adds symlinks and the like.

----------

## musv

Figured out something new. When I plug-in the tablet and then restart the tablet, the ttyACM0 device appears for a very short time. 

```
Nov 21 23:52:38 hexe kernel: usb 1-3: USB disconnect, device number 13

Nov 21 23:52:40 hexe kernel: usb 1-3: new high-speed USB device number 14 using ehci-pci

Nov 21 23:52:40 hexe kernel: usb 1-3: New USB device found, idVendor=0e8d, idProduct=2000

Nov 21 23:52:40 hexe kernel: usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0

Nov 21 23:52:40 hexe kernel: usb 1-3: Product: MT65xx Preloader

Nov 21 23:52:40 hexe kernel: usb 1-3: Manufacturer: MediaTek

Nov 21 23:52:40 hexe kernel: cdc_acm 1-3:1.1: ttyACM0: USB ACM device

Nov 21 23:52:40 hexe mtp-probe[2887]: checking bus 1, device 14: "/sys/devices/pci0000:00/0000:00:1a.7/usb1/1-3"

Nov 21 23:52:40 hexe mtp-probe[2887]: bus: 1, device: 14 was not an MTP device

Nov 21 23:52:42 hexe kernel: usb 1-3: USB disconnect, device number 14

Nov 21 23:52:50 hexe kernel: usb 1-3: new high-speed USB device number 15 using ehci-pci

Nov 21 23:52:50 hexe kernel: usb 1-3: New USB device found, idVendor=17ef, idProduct=789a

Nov 21 23:52:50 hexe kernel: usb 1-3: New USB device strings: Mfr=2, Product=3, SerialNumber=4

Nov 21 23:52:50 hexe kernel: usb 1-3: Product: Lenovo

Nov 21 23:52:50 hexe kernel: usb 1-3: Manufacturer: MediaTek

Nov 21 23:52:50 hexe kernel: usb 1-3: SerialNumber: PJUGCEJV79DEWS8S
```

This happens too, if I go only into the boot menu of the tablet (fastboot, recovery, normal).

For some reason I think, we have the same problem.

----------

## NeddySeagoon

musv,

The tablet has changed USB device IDs.

```
Nov 21 23:52:40 hexe kernel: usb 1-3: New USB device found, idVendor=0e8d, idProduct=2000

Nov 21 23:52:40 hexe kernel: usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0

Nov 21 23:52:40 hexe kernel: usb 1-3: Product: MT65xx Preloader 

...

Nov 21 23:52:50 hexe kernel: usb 1-3: New USB device found, idVendor=17ef, idProduct=789a

Nov 21 23:52:50 hexe kernel: usb 1-3: New USB device strings: Mfr=2, Product=3, SerialNumber=4

Nov 21 23:52:50 hexe kernel: usb 1-3: Product: Lenovo 
```

Notice its all usb 1-3.

Its not offering a ACM link any more.

----------

## musv

 *NeddySeagoon wrote:*   

> musv,
> 
> The tablet has changed USB device IDs.

 

Yes, have seen this now. Here there's a guy from russia, who describes the problem:

http://andrew.bogdanovs.com/post/flashing_mt65xx_phones.html

Unfortunately I understand only the half with Google translator. 

Inserted these udev-rules without any success:

```
ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="2000", ENV{ID_MM_DEVICE_IGNORE}="1"

ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="2000", ENV{MTP_NO_PROBE}="1"
```

----------

## NeddySeagoon

musv,

Once the tablet gets out of the boot loader, or preboot or whatever, it won't be a ACM device, unless you can force it somehow.

Try connecting the tablet to the PC, then powering it on with the volume down key (does it have one?) held down.

There is a limited set of inputs to get Android devices to do something other than a normal boot. 

What controls do you have that you don't normally use during boot?

----------

## musv

It could be so easy. 

In every stupid tutorial they describe, how to install the SP Flash Tool. The problem is, the ttyACM device disappears after 2 seconds. This seems to be a feature - planned by design. In the Windows tutorials, the try to install the VCOM driver within this 2 seconds, start the Flash process in the SP Tool and hope not to unbrick the device. 

The easier and better solution:

Install android-tools

Boot the Lenovo TAB2 into the fastboot mode

Connect the device via USB cable to the computer

```
fastboot devices

fastboot flash recovery recovery_twrp300_for_LenovoTab2A10-70F_Android5.img

fastboot reboot-boot
```

Go into the recovery mode and be happy about the twrp screen. That's it. 

Wasted a lot of hours with the SP Flash Tool.

----------

