Omicron
Omicron

Reputation: 375

Raspberry Pi Pico doesn't create tty file

I've been using Raspberry Pi Pico for some time already and I'm using minicom for serial communication. But one day Pico stopped generating tty/ATCM0 when connected to USB port. Before this everything worked perfectly fine.

I can still upload software and it's executing, but there's no serial communication because of it.

I've tried switching USB ports, uploading software that worked fine before and I even bought new Pico, as I suspected a hardware issue, but it still didn't help. My best guess is that there's something wrong with USB drivers, though I don't remember doing anything to them.

I've checked /dev for new tty files when connecting Pico, but nothing appears.

dmesg output after connecting Pico:

[ 2418.974093] usb 3-2: new full-speed USB device number 28 using xhci_hcd
[ 2434.570047] usb 3-2: device descriptor read/64, error -110   // <-- Warning

dmesg output after connecting in BOOTLOADER mode and uploading file

[ 2901.230259] usb 3-2: new full-speed USB device number 30 using xhci_hcd  // <-- connected as BOOTLOADER
[ 2901.397715] usb 3-2: New USB device found, idVendor=2e8a, idProduct=0003, bcdDevice= 1.00
[ 2901.397726] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2901.397729] usb 3-2: Product: RP2 Boot
[ 2901.397732] usb 3-2: Manufacturer: Raspberry Pi
[ 2901.397735] usb 3-2: SerialNumber: E0C912D24340
[ 2901.399735] usb-storage 3-2:1.0: USB Mass Storage device detected
[ 2901.399885] scsi host2: usb-storage 3-2:1.0
[ 2902.412571] scsi 2:0:0:0: Direct-Access     RPI      RP2              1    PQ: 0 ANSI: 2
[ 2902.413038] sd 2:0:0:0: Attached scsi generic sg1 type 0
[ 2902.413315] sd 2:0:0:0: [sdb] 262144 512-byte logical blocks: (134 MB/128 MiB)
[ 2902.413731] sd 2:0:0:0: [sdb] Write Protect is off
[ 2902.413734] sd 2:0:0:0: [sdb] Mode Sense: 03 00 00 00
[ 2902.415755] sd 2:0:0:0: [sdb] No Caching mode page found           // <-- Warning
[ 2902.415761] sd 2:0:0:0: [sdb] Assuming drive cache: write through  // <-- Warning
[ 2902.424350]  sdb: sdb1
[ 2902.427764] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[ 2907.724687] usb 3-2: USB disconnect, device number 30       // <-- uploaded uf2 file
[ 2907.725456] blk_update_request: I/O error, dev sdb, sector 260 op 0x1:(WRITE) flags 0x100000 phys_seg 1 prio class 0 // <-- Warning
[ 2907.725471] Buffer I/O error on dev sdb1, logical block 259, lost async page write // <-- Warning
[ 2907.733492] FAT-fs (sdb1): unable to read boot sector to mark fs as dirty          // <-- Warning
[ 2908.102068] usb 3-2: new full-speed USB device number 31 using xhci_hcd
[ 2923.530076] usb 3-2: device descriptor read/64, error -110         // <-- Warning

lsusb -tv lists these two entries only when Pico is in BOOTLOADER mode:

...
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 2: Dev 35, If 0, Class=Mass Storage, Driver=usb-storage, 12M
        ID 2e8a:0003  
    |__ Port 2: Dev 35, If 1, Class=Vendor Specific Class, Driver=, 12M
        ID 2e8a:0003 
...

Upvotes: 2

Views: 356

Answers (1)

Mike
Mike

Reputation: 802

First of all, it isn't tty/ATCM0, it's /dev/ttyACM0. Second, the Pico doesn't create it. The computer acting as the USB host that the Pico is connected to is what creates the device.

So check that you are looking for the correct thing in the correct place. If you're still not getting anything then reflash the Pico, you can use the flash_nuke uf2 found online. You also need to make sure you have the USB serial enabled in your CMakeLists file. And any changes to that file require a full rebuild of the project.

Upvotes: 0

Related Questions