WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: /dev/serial/by-id/ for TCL?  (Read 2882 times)

Offline gestein

  • Newbie
  • *
  • Posts: 16
/dev/serial/by-id/ for TCL?
« on: March 21, 2019, 06:51:50 PM »
Hi,

I am not an expert in linux and I came to TCL via piCorePlayer.
So I have a piCorePlayer running on a raspberry zero and it running quite fine.

But now I would need to use this raspberry for an additional usb device together with ser2net.
To use this correctly, I would need to have the corresponding "/dev/serial/by-id/".

Is there any tce to get this?
Or what do I need to install to get it?

Thanks a lot in advance for any help.
Best regards
Gerhard

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: /dev/serial/by-id/ for TCL?
« Reply #1 on: March 21, 2019, 08:12:20 PM »
Hi gestein
That appears to be handled by  udev.  The  udev  file that deals with that should be  /etc/udev/rules.d/60-persistent-serial.rules.
When you plug in your USB device,  udev  should detect it and create  /dev/serial/by-id/  automatically.

Offline gestein

  • Newbie
  • *
  • Posts: 16
Re: /dev/serial/by-id/ for TCL?
« Reply #2 on: March 22, 2019, 10:32:30 AM »
Dear Rich,

so I plugged in my stick and got the following dmesg entries:
Code: [Select]
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.20-piCore+ (root@beta.hasix.org) (gcc version 4.9.1 (crosstool-NG 1.20.0) ) #1 Thu Sep 8 09:31:10 CEST 2016
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine model: Raspberry Pi Zero Rev 1.3
[    0.000000] cma: Reserved 8 MiB at 0x1b000000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 114688
[    0.000000] free_area_init_node: node 0, pgdat c0894c64, node_mem_map dac10000
[    0.000000]   Normal zone: 1008 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 114688 pages, LIFO batch:31
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 113680
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x900093 bcm2708.serial=0x17268f01 smsc95xx.macaddr=B8:27:EB:26:8F:01 bcm2708_fb.fbswap=1 bcm2708.uart_clock=48000000 bcm2708.disk_led_gpio=47 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  tz=CET-1CEST,M3.5.0,M10.5.0/3 host=piCorePlayerTO dwc_otg.fiq_fsm_mask=0xF dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/ram0 elevator=deadline rootwait quiet nortc loglevel=3 noembed smsc95xx.turbo_mode=N noswap cron consoleblank=0 waitusb=2
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 432020K/458752K available (6116K kernel code, 439K rwdata, 1856K rodata, 376K init, 732K bss, 18540K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xdc800000 - 0xff800000   ( 560 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xdc000000   ( 448 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc07d11dc   (7973 kB)
[    0.000000]       .init : 0xc07d2000 - 0xc0830000   ( 376 kB)
[    0.000000]       .data : 0xc0830000 - 0xc089dd30   ( 440 kB)
[    0.000000]        .bss : 0xc089dd30 - 0xc0954ff0   ( 733 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000030] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
[    0.000073] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[    0.000175] bcm2835: system timer (irq = 27)
[    0.000484] Console: colour dummy device 80x30
[    0.000710] console [tty1] enabled
[    0.000739] Calibrating delay loop... 697.95 BogoMIPS (lpj=3489792)
[    0.060316] pid_max: default: 32768 minimum: 301
[    0.060703] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060733] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.061746] Disabling cpuset control group subsystem
[    0.061798] Initializing cgroup subsys io
[    0.061836] Initializing cgroup subsys memory
[    0.061897] Initializing cgroup subsys devices
[    0.061930] Initializing cgroup subsys freezer
[    0.061961] Initializing cgroup subsys net_cls
[    0.062050] CPU: Testing write buffer coherency: ok
[    0.062127] ftrace: allocating 20857 entries in 62 pages
[    0.175167] Setting up static identity map for 0x81c0 - 0x81f8
[    0.177025] devtmpfs: initialized
[    0.186743] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[    0.187272] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.189062] pinctrl core: initialized pinctrl subsystem
[    0.189934] NET: Registered protocol family 16
[    0.195799] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[    0.205519] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[    0.205550] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.205706] Serial: AMBA PL011 UART driver
[    0.206111] 20201000.uart: ttyAMA0 at MMIO 0x20201000 (irq = 81, base_baud = 0) is a PL011 rev2
[    0.206479] console [ttyAMA0] enabled
[    0.207223] bcm2835-mbox 2000b880.mailbox: mailbox enabled
[    0.252983] bcm2835-dma 20007000.dma: DMA legacy API manager at f2007000, dmachans=0x1
[    0.253882] SCSI subsystem initialized
[    0.254227] usbcore: registered new interface driver usbfs
[    0.254382] usbcore: registered new interface driver hub
[    0.254595] usbcore: registered new device driver usb
[    0.265134] raspberrypi-firmware soc:firmware: Attached to firmware from 2016-09-07 14:46
[    0.293135] clocksource: Switched to clocksource timer
[    0.345157] FS-Cache: Loaded
[    0.345580] CacheFiles: Loaded
[    0.365076] NET: Registered protocol family 2
[    0.366413] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.366517] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.366619] TCP: Hash tables configured (established 4096 bind 4096)
[    0.366720] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.366759] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.367113] NET: Registered protocol family 1
[    0.367726] RPC: Registered named UNIX socket transport module.
[    0.367753] RPC: Registered udp transport module.
[    0.367765] RPC: Registered tcp transport module.
[    0.367776] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.368234] Trying to unpack rootfs image as initramfs...
[    0.935704] Freeing initrd memory: 4428K (dbb9d000 - dbff0000)
[    0.954256] hw perfevents: enabled with armv6_1176 PMU driver, 3 counters available
[    0.955733] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.971082] zbud: loaded
[    0.972438] VFS: Disk quotas dquot_6.6.0
[    0.972870] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.975724] FS-Cache: Netfs 'nfs' registered for caching
[    0.977128] NFS: Registering the id_resolver key type
[    0.977220] Key type id_resolver registered
[    0.977238] Key type id_legacy registered
[    0.987096] jitterentropy: Initialization failed with host not compliant with requirements: 2
[    0.987307] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.987753] io scheduler noop registered
[    0.987797] io scheduler deadline registered (default)
[    0.988238] io scheduler cfq registered
[    0.991034] BCM2708FB: allocated DMA memory 5b400000
[    0.991110] BCM2708FB: allocated DMA channel 0 @ f2007000
[    0.999338] Console: switching to colour frame buffer device 82x26
[    1.906121] bcm2835-rng 20104000.rng: hwrng registered
[    1.906439] vc-cma: Videocore CMA driver
[    1.906462] vc-cma: vc_cma_base      = 0x00000000
[    1.906476] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    1.906487] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    1.906943] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)
[    1.932402] brd: module loaded
[    1.944685] loop: module loaded
[    1.945910] vchiq: vchiq_init_state: slot_zero = 0xdb480000, is_master = 0
[    1.948322] Loading iSCSI transport class v2.0-870.
[    1.949604] usbcore: registered new interface driver smsc95xx
[    1.949718] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    2.150471] Core Release: 2.80a
[    2.150506] Setting default values for core params
[    2.150554] Finished setting default values for core params
[    2.350940] Using Buffer DMA mode
[    2.350967] Periodic Transfer Interrupt Enhancement - disabled
[    2.350980] Multiprocessor Interrupt Enhancement - disabled
[    2.350993] OTG VER PARAM: 0, OTG VER FLAG: 0
[    2.351086] Dedicated Tx FIFOs mode
[    2.351594] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt = 0xdb414000 dma = 0x5b414000 len=9024
[    2.351632] FIQ FSM acceleration enabled for :
[    2.351632] Non-periodic Split Transactions
[    2.351632] Periodic Split Transactions
[    2.351632] High-Speed Isochronous Endpoints
[    2.351632] Interrupt/Control Split Transaction hack enabled
[    2.351666] dwc_otg: Microframe scheduler enabled
[    2.351745] WARN::hcd_init_fiq:413: FIQ on core 0 at 0xc04167ac
[    2.351765] WARN::hcd_init_fiq:414: FIQ ASM at 0xc0416a88 length 36
[    2.351796] WARN::hcd_init_fiq:439: MPHI regs_base at 0xdc898000
[    2.351868] dwc_otg 20980000.usb: DWC OTG Controller
[    2.351932] dwc_otg 20980000.usb: new USB bus registered, assigned bus number 1
[    2.352003] dwc_otg 20980000.usb: irq 56, io mem 0x00000000
[    2.352063] Init: Port Power? op_state=1
[    2.352075] Init: Power Port (0)
[    2.352437] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.352464] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.352483] usb usb1: Product: DWC OTG Controller
[    2.352499] usb usb1: Manufacturer: Linux 4.4.20-piCore+ dwc_otg_hcd
[    2.352516] usb usb1: SerialNumber: 20980000.usb
[    2.353819] hub 1-0:1.0: USB hub found
[    2.353924] hub 1-0:1.0: 1 port detected
[    2.354854] dwc_otg: FIQ enabled
[    2.354877] dwc_otg: NAK holdoff enabled
[    2.354889] dwc_otg: FIQ split-transaction FSM enabled
[    2.354944] Module dwc_common_port init
[    2.355532] usbcore: registered new interface driver usb-storage
[    2.356033] mousedev: PS/2 mouse device common for all mice
[    2.357308] bcm2835-cpufreq: min=700000 max=1000000
[    2.358439] sdhci: Secure Digital Host Controller Interface driver
[    2.358456] sdhci: Copyright(c) Pierre Ossman
[    2.358831] sdhost: log_buf @ db413000 (5b413000)
[    2.413195] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    2.433581] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.434226] ledtrig-cpu: registered to indicate activity on CPUs
[    2.434448] hidraw: raw HID events driver (C) Jiri Kosina
[    2.434698] usbcore: registered new interface driver usbhid
[    2.434711] usbhid: USB HID core driver
[    2.435286] Initializing XFRM netlink socket
[    2.435333] NET: Registered protocol family 17
[    2.435501] Key type dns_resolver registered
[    2.437172] registered taskstats version 1
[    2.437352] zswap: loaded using pool lzo/zbud
[    2.490749] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.492859] mmc0: new high speed SDHC card at address 1234
[    2.502780] mmcblk0: mmc0:1234 SA04G 3.71 GiB
[    2.503947] Key type encrypted registered
[    2.504073] vc-sm: Videocore shared memory driver
[    2.504093] [vc_sm_connected_init]: start
[    2.504603]  mmcblk0: p1 p2
[    2.506476] [vc_sm_connected_init]: end - returning 0
[    2.506804] of_cfs_init
[    2.506915] of_cfs_init: OK
[    2.508895] Freeing unused kernel memory: 376K (c07d2000 - c0830000)
[    2.553384] Indeed it is in host mode hprt0 = 00021501
[    2.813255] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.813660] Indeed it is in host mode hprt0 = 00001101
[    3.095158] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    3.095186] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    3.095197] usb 1-1: Product: USB2.0 Hub
[    3.096420] hub 1-1:1.0: USB hub found
[    3.096905] hub 1-1:1.0: 4 ports detected
[    3.373281] usb 1-1.2: new high-speed USB device number 3 using dwc_otg
[    3.491427] usb 1-1.2: New USB device found, idVendor=148f, idProduct=5370
[    3.491456] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.491469] usb 1-1.2: Product: 802.11 n WLAN
[    3.491480] usb 1-1.2: Manufacturer: Ralink
[    3.491491] usb 1-1.2: SerialNumber: 1.0
[    3.573267] usb 1-1.4: new full-speed USB device number 4 using dwc_otg
[    3.681845] usb 1-1.4: New USB device found, idVendor=1b1f, idProduct=c00f
[    3.681872] usb 1-1.4: New USB device strings: Mfr=4, Product=14, SerialNumber=36
[    3.681885] usb 1-1.4: Product: HM-CFG-USB
[    3.681898] usb 1-1.4: Manufacturer: eQ-3
[    3.681909] usb 1-1.4: SerialNumber: MEQ0232458
[    3.708240] hid-generic 0003:1B1F:C00F.0001: hiddev0,hidraw0: USB HID v1.10 Device [eQ-3 HM-CFG-USB] on usb-20980000.usb-1.4/input0
[    4.263518] gpiomem-bcm2835 20200000.gpiomem: Initialised: Registers at 0x20200000
[    4.296222] bcm2708_i2c 20804000.i2c: BSC1 Controller at 0x20804000 (irq 77) (baudrate 100000)
[    4.297007] bcm2835-wdt 20100000.watchdog: Broadcom BCM2835 watchdog timer
[    4.813186] usb 1-1.1: new full-speed USB device number 5 using dwc_otg
[    4.935938] usb 1-1.1: New USB device found, idVendor=0403, idProduct=6001
[    4.935961] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.935974] usb 1-1.1: Product: FT232R USB UART
[    4.935985] usb 1-1.1: Manufacturer: FTDI
[    4.935997] usb 1-1.1: SerialNumber: A96EMFKS
[    5.855194] zram: Added device: zram0
[    5.892065] zram0: detected capacity change from 0 to 106045440
[    5.902835] random: mkswap: uninitialized urandom read (16 bytes read, 95 bits of entropy available)
[    5.914276] Adding 103556k swap on /dev/zram0.  Priority:-1 extents:1 across:103556k SSFS
[    6.346520] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    8.184597] EXT4-fs (mmcblk0p2): recovery complete
[    8.187943] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    8.312909] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[   15.882247] random: nonblocking pool is initialized
[   44.571226] snd-hifiberry-amp soc:sound: ASoC: CODEC DAI tas5713-hifi not registered
[   44.571258] snd-hifiberry-amp soc:sound: snd_soc_register_card() failed: -517
[   45.563252] usb 1-1.2: reset high-speed USB device number 3 using dwc_otg
[   45.665538] snd-hifiberry-amp soc:sound: tas5713-hifi <-> 20203000.i2s mapping ok
[   45.693587] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[   45.864474] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected
[   46.103348] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   46.113441] usbcore: registered new interface driver rt2800usb
[   48.361760] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   48.362106] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.29
[   53.105806] wlan0: authenticate with f4:06:8d:7d:6c:e9
[   53.172137] wlan0: send auth to f4:06:8d:7d:6c:e9 (try 1/3)
[   53.177733] wlan0: authenticated
[   53.183192] wlan0: associate with f4:06:8d:7d:6c:e9 (try 1/3)
[   53.187324] wlan0: RX AssocResp from f4:06:8d:7d:6c:e9 (capab=0x431 status=0 aid=1)
[   53.195336] wlan0: associated
[   60.588082] NET: Registered protocol family 10

In fact I do have 3 stick plugged in now.
1) Wifi stick
2) HM-CFG-USB from eQ-3
3) FT232R USB UART from FTDI

So all three sticks are recognized.
But there is still no "/dev/serials".

The file "" exists and it contains:
Code: [Select]
# do not edit this file, it will be overwritten on update

ACTION=="remove", GOTO="persistent_serial_end"
SUBSYSTEM!="tty", GOTO="persistent_serial_end"
KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="persistent_serial_end"

SUBSYSTEMS=="usb-serial", ENV{.ID_PORT}="$attr{port_number}"

IMPORT{builtin}="path_id"
ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="", SYMLINK+="serial/by-path/$env{ID_PATH}"
ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="?*", SYMLINK+="serial/by-path/$env{ID_PATH}-port$env{.ID_PORT}"

IMPORT{builtin}="usb_id"
ENV{ID_SERIAL}=="", GOTO="persistent_serial_end"
SUBSYSTEMS=="usb", ENV{ID_USB_INTERFACE_NUM}="$attr{bInterfaceNumber}"
ENV{ID_USB_INTERFACE_NUM}=="", GOTO="persistent_serial_end"
ENV{.ID_PORT}=="", SYMLINK+="serial/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$env{ID_USB_INTERFACE_NUM}"
ENV{.ID_PORT}=="?*", SYMLINK+="serial/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$env{ID_USB_INTERFACE_NUM}-port$env{.ID_PORT}"

LABEL="persistent_serial_end"

What should I do to solve this?
Thanks and best regards
Gerhard

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: /dev/serial/by-id/ for TCL?
« Reply #3 on: March 22, 2019, 05:00:46 PM »
Hi gestein
Based on this it looks like it's detected:
Code: [Select]
[    4.813186] usb 1-1.1: new full-speed USB device number 5 using dwc_otg
[    4.935938] usb 1-1.1: New USB device found, idVendor=0403, idProduct=6001
[    4.935961] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.935974] usb 1-1.1: Product: FT232R USB UART
[    4.935985] usb 1-1.1: Manufacturer: FTDI
[    4.935997] usb 1-1.1: SerialNumber: A96EMFKS
But it doesn't appear to do anything with it. Maybe you need a driver? Possibly from the  modules  file found here:
http://tinycorelinux.net/9.x/armv6/releases/RPi/src/kernel/
Adjust the  9.x  and  armv6  in the URL to match the release you are running.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: /dev/serial/by-id/ for TCL?
« Reply #4 on: March 23, 2019, 12:23:01 AM »
Hi gestein
Try installing the  usb-serial  extension. It contains the  ftdi_sio  driver for your device.

Offline gestein

  • Newbie
  • *
  • Posts: 16
Re: /dev/serial/by-id/ for TCL?
« Reply #5 on: March 23, 2019, 05:16:17 PM »
Dear Rich,

thanks for this hint. That's it! Now the "/dev/servial/by-id" has been created and it lists the FTDI-stick.

Thanks a lot for your support.
Without you I would not have been able to solve this.
Gerhard

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: /dev/serial/by-id/ for TCL?
« Reply #6 on: March 23, 2019, 07:15:19 PM »
Hi gestein
You are quite welcome. Glad to hear it's working now.