ubuntuusers.de

linux-source-5.15.0: modversions.h

Status: Ungelöst | Ubuntu-Version: Ubuntu 22.04 (Jammy Jellyfish)
Antworten |

BlackMage

Anmeldungsdatum:
29. April 2010

Beiträge: 45

Wohnort: Hannover

es funktioniert bei mir nicht die Kompilierung des Kernels 5.15.0. Eigentlich brauche ich ja nur eine modversions.h, aber der Konfigurationsprozess will bei mir nicht anspringen.

beim Buildversuch kommt nur:

  HOSTCC  scripts/sign-file
scripts/sign-file.c: In function ‘main’:
scripts/sign-file.c:232:9: warning: implicit declaration of function ‘OpenSSL_add_all_algorithms’ [-Wimplicit-function-declaration]
  232 |         OpenSSL_add_all_algorithms();
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:233:9: warning: implicit declaration of function ‘ERR_load_crypto_strings’; did you mean ‘ERR_load_CRYPTO_strings’? [-Wimplicit-function-declaration]
  233 |         ERR_load_crypto_strings();
      |         ^~~~~~~~~~~~~~~~~~~~~~~
      |         ERR_load_CRYPTO_strings
scripts/sign-file.c:301:17: warning: implicit declaration of function ‘OpenSSL_add_all_digests’ [-Wimplicit-function-declaration]
  301 |                 OpenSSL_add_all_digests();
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccpDfOXj.o: in function `main':
sign-file.c:(.text.startup+0x5c): undefined reference to `OpenSSL_add_all_algorithms'
/usr/bin/ld: sign-file.c:(.text.startup+0x63): undefined reference to `ERR_load_crypto_strings'
/usr/bin/ld: sign-file.c:(.text.startup+0x67e): undefined reference to `OpenSSL_add_all_digests'
collect2: error: ld returned 1 exit status
make[1]: *** [scripts/Makefile.host:95: scripts/sign-file] Error 1
make: *** [Makefile:1209: scripts] Error 2

die modversions.h brauche ich für den ftdi_sio Driver, der standardmäßig installierte funktioniert nicht richtig, obwohl alle permissions korrekt gesetzt sind

unter Windows funktioniert der Adapter einwandfrei

ChickenLipsRfun2eat Team-Icon

Anmeldungsdatum:
6. Dezember 2009

Beiträge: 12067

Scheint, als ob dir die openssl-Bibliothek fehlt. Versuch es mal mit libssl-dev

BlackMage

(Themenstarter)

Anmeldungsdatum:
29. April 2010

Beiträge: 45

Wohnort: Hannover

nein, selbstverständlich bereits installiert, das wäre ja zu einfach

ChickenLipsRfun2eat Team-Icon

Anmeldungsdatum:
6. Dezember 2009

Beiträge: 12067

Laut openssl-Manpage sind die Funktionen deprecated. Hast du da ggf. eine Direktive gesetzt?

BlackMage

(Themenstarter)

Anmeldungsdatum:
29. April 2010

Beiträge: 45

Wohnort: Hannover

nicht das ich wüsste, wo soll ich denn das gemacht haben?

ChickenLipsRfun2eat Team-Icon

Anmeldungsdatum:
6. Dezember 2009

Beiträge: 12067

Mit gcc -Wdeprecated-… -Wno-deprecated…. Imho konntest du das bei makeconfig auswählen. Lange her mit den Kernelspielen 😉

BlackMage

(Themenstarter)

Anmeldungsdatum:
29. April 2010

Beiträge: 45

Wohnort: Hannover

ich habe den Kernel ja nicht kompiliert, ich brauche nur die modversions.h zum kompilieren eines Treibers

ich kann den kernel ja auch gar nicht kompilieren weil das sign-file tool nicht kompiliert

aber die modversions.h kann ich auch nicht generieren

der USB Serial Converter hat unter Windows die ID USB\VID_0403&PID_6001&REV_0600 und es wird daraus der COM4 Port gemacht, und da funktioniert er auch anstandslos

dmesg sagt folgendes wenn ich den usb adapter einstecke:

[446092.606163] usb 3-2: new full-speed USB device number 28 using xhci_hcd
[446092.764761] usb 3-2: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[446092.764766] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[446092.764768] usb 3-2: Product: FT232R USB UART
[446092.764769] usb 3-2: Manufacturer: FTDI
[446092.764770] usb 3-2: SerialNumber: A50285BI
[446092.767825] ftdi_sio 3-2:1.0: FTDI USB Serial Device converter detected
[446092.767855] usb 3-2: Detected FT232RL
[446092.768560] usb 3-2: FTDI USB Serial Device converter now attached to ttyUSB0

aber das ist wieder ein anderes Thema, jedenfalls funktioniert der Treiber nicht, es kommt keine Kommunikation zustande. /dev/ttyUSB0 gehört root und der gruppe dialout

BlackMage

(Themenstarter)

Anmeldungsdatum:
29. April 2010

Beiträge: 45

Wohnort: Hannover

bzw. jetzt steht im Log

UDEV  [10534.239120] add      /devices/pci0000:00/0000:00:14.0/usb3/3-2 (usb)
UDEV  [10534.241726] change   /devices/pci0000:00/0000:00:14.0/usb3/3-2 (usb)
UDEV  [10534.243758] add      /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0 (usb)
UDEV  [10534.247817] add      /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/gpiochip0 (gpio)
UDEV  [10534.249435] add      /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/ttyUSB0 (usb-serial)
UDEV  [10534.250374] add      /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/gpio/gpiochip1020 (gpio)
UDEV  [10534.274983] add      /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/ttyUSB0/tty/ttyUSB0 (tty)
UDEV  [10534.279121] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/ttyUSB0 (usb-serial)
UDEV  [10534.279503] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0 (usb)
UDEV  [10534.284563] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-2 (usb)

aber eine Kommunikation ist nie möglich, weder über putty noch über minicom

Ich benutze /dev/ttyUSB0, die Permissions sind auch korrekt gesetzt.

$ ls -l /dev/ttyUSB0 
crw-rw-rw- 1 root dialout 188, 0 Apr 27 19:33 /dev/ttyUSB0

ChickenLipsRfun2eat Team-Icon

Anmeldungsdatum:
6. Dezember 2009

Beiträge: 12067

Also versuchst du eigentlich „nur“ ein Kernelmodul zu kompilieren? Außer der .h-Datei brauchst du ja auch noch die Quellen. .h bringt dir nur was bei Bibliotheken. Ich kann dir mal ein Beispiel hier posten, Kernelmodule kompilieren ist so ne Sache bei der ich auch immer aussteige 😉

linux-header müssen für den aktuell geladenen Kernel installiert sein → Pfade prüfen! Für Ubuntu natürlich die -dev-Pakete.

Datei: clang_complete.in

-nostdinc
-I/lib/modules/`uname -r`/build
-I/lib/modules/`uname -r`/build/include
-I/lib/modules/`uname -r`/build/include/uapi
-I/lib/modules/`uname -r`/build/arch/x86/include
-I/lib/modules/`uname -r`/build/arch/x86/include/asm
-I/lib/modules/`uname -r`/build/arch/x86/include/generated
-I/lib/modules/`uname -r`/build/arch/x86/include/uapi
-I/lib/modules/`uname -r`/build/arch/x86/include/generated/uapi
-I.
-D__KERNEL__
-DCONFIG_AS_CFI=1
-DCONFIG_AS_CFI_SIGNAL_FRAME=1
-DCONFIG_AS_CFI_SECTIONS=1
-DCONFIG_AS_FXSAVEQ=1
-DCONFIG_AS_AVX=1
-DCONFIG_AS_AVX2=1
-DKBUILD_MODNAME=ubuntuusers
-DMODULE
-D"KBUILD_STR(s)=#s"
-include /lib/modules/`uname -r`/build/include/linux/kconfig.h

Datei: Kbuild

EXTRA_CFLAGS = -Wall -g

obj-m        = ubuntuusers.o

Datei: ubuntuusers.c

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>

MODULE_DESCRIPTION("UU NIX MOD");
MODULE_AUTHOR("UbuntuUsers");
MODULE_LICENSE("GPL");

static int dummy_init(void) {
        pr_notice("Hi\n");
        return 0;
}

static void dummy_exit(void)
{
        pr_notice("Bye\n");
}

module_init(dummy_init);
module_exit(dummy_exit);

Datei: Makefile

KDIR = /lib/modules/`uname -r`/build

.clang_complete: clang_complete.in
        while read line; do line=$$(echo echo $$line | sh); echo $$line >> .clang_complete; done < $^

kbuild:
                make -C $(KDIR) M=`pwd`

clean:
                make -C $(KDIR) M=`pwd` clean

Das spuckt dir dann einige Dateien aus. Laden mit sudo insmod /pfad/zu/ubuntuusers.kojournalctl -xe sagt "Hi", entladen mit rmmod ubuntuusers, journal sagt "Bye"

BlackMage

(Themenstarter)

Anmeldungsdatum:
29. April 2010

Beiträge: 45

Wohnort: Hannover

puh nee, es sind eher RS232 Module bei mir unter Ubuntu das Problem, ich kriege keins zum Laufen sowohl FT232 als auch CP2102 wollen bei mir unter Ubuntu nicht funktionieren, Es ist immer überhaupt keine Kommunikation möglich! habe nun schon mehrere Module und mehrere Ubuntu Versionen ausprobiert. Unter Windows läuft es immer ganz ohne Probleme, Treiber installieren und läuft, läuft und läuft.

unter Ubuntu ist es eig. fast genau dasselbe nur da funktionieren die eingerichteten serial devices nicht!

/dev/ttyUSB0 sollte da doch korrekt sein, oder?

das andere Modul sagt:

KERNEL[257510.462325] add      /devices/pci0000:00/0000:00:14.0/usb3/3-2 (usb)
KERNEL[257510.470483] add      /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0 (usb)
KERNEL[257510.471286] add      /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/ttyUSB0 (usb-serial)
KERNEL[257510.471487] add      /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/ttyUSB0/tty/ttyUSB0 (tty)
KERNEL[257510.471512] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/ttyUSB0 (usb-serial)
KERNEL[257510.471541] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0 (usb)
KERNEL[257510.471577] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-2 (usb)
UDEV  [257510.477948] add      /devices/pci0000:00/0000:00:14.0/usb3/3-2 (usb)
UDEV  [257510.481364] add      /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0 (usb)
UDEV  [257510.486555] add      /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/ttyUSB0 (usb-serial)
UDEV  [257510.516352] add      /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/ttyUSB0/tty/ttyUSB0 (tty)
UDEV  [257510.521806] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/ttyUSB0 (usb-serial)
UDEV  [257510.523251] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0 (usb)
UDEV  [257510.527895] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-2 (usb)

also eigentlich genau dasselbe

irgendwie funktioniert bei mir unter Ubuntu die Kommunikation mit den seriellen Geräten nicht mehr, obwohl ich das vor Jahren genau so gemacht habe, nur da hat es funktioniert

ChickenLipsRfun2eat Team-Icon

Anmeldungsdatum:
6. Dezember 2009

Beiträge: 12067

Solche Module hab ich an sich nicht. Bisher nur Arduino micro für ein Bastelprojekt. Zeig mal bitte

udevadm info -q all -a /dev/ttyUSB0
# und ggf.
grep serial /proc/ioports

vielleicht findet sich da was.

kB Team-Icon

Supporter, Wikiteam
Avatar von kB

Anmeldungsdatum:
4. Oktober 2007

Beiträge: 9723

Wohnort: Münster

BlackMage schrieb:

[…] alle permissions korrekt gesetzt

Überzeuge uns mal, dass dies auch wirklich stimmt!

Lade den Standard-Treiber/Modul für Dein USB-Adapter-Ding und zeige dann:

ls -l /dev/ttyUSB*
groups

BlackMage

(Themenstarter)

Anmeldungsdatum:
29. April 2010

Beiträge: 45

Wohnort: Hannover

hier:

$ id
uid=1000(user) gid=1000(user) groups=1000(user),4(adm),20(dialout),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),132(lxd),133(sambashare)
$ ls -l /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Mai  1 16:30 /dev/ttyUSB0
$ groups
user adm dialout cdrom sudo dip plugdev lpadmin lxd sambashare

und:

$ udevadm info -q all -a /dev/ttyUSB0

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/ttyUSB0/tty/ttyUSB0':
    KERNEL=="ttyUSB0"
    SUBSYSTEM=="tty"
    DRIVER==""
    ATTR{power/async}=="disabled"
    ATTR{power/control}=="auto"
    ATTR{power/runtime_active_kids}=="0"
    ATTR{power/runtime_active_time}=="0"
    ATTR{power/runtime_enabled}=="disabled"
    ATTR{power/runtime_status}=="unsupported"
    ATTR{power/runtime_suspended_time}=="0"
    ATTR{power/runtime_usage}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/ttyUSB0':
    KERNELS=="ttyUSB0"
    SUBSYSTEMS=="usb-serial"
    DRIVERS=="ftdi_sio"
    ATTRS{latency_timer}=="16"
    ATTRS{port_number}=="0"
    ATTRS{power/async}=="enabled"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_kids}=="0"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_enabled}=="disabled"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0':
    KERNELS=="3-2:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="ftdi_sio"
    ATTRS{authorized}=="1"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bInterfaceClass}=="ff"
    ATTRS{bInterfaceNumber}=="00"
    ATTRS{bInterfaceProtocol}=="ff"
    ATTRS{bInterfaceSubClass}=="ff"
    ATTRS{bNumEndpoints}=="02"
    ATTRS{interface}=="FT232R USB UART"
    ATTRS{power/async}=="enabled"
    ATTRS{power/runtime_active_kids}=="0"
    ATTRS{power/runtime_enabled}=="enabled"
    ATTRS{power/runtime_status}=="suspended"
    ATTRS{power/runtime_usage}=="0"
    ATTRS{supports_autosuspend}=="1"

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb3/3-2':
    KERNELS=="3-2"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="00"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="8"
    ATTRS{bMaxPower}=="90mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="0600"
    ATTRS{bmAttributes}=="a0"
    ATTRS{busnum}=="3"
    ATTRS{configuration}==""
    ATTRS{devnum}=="3"
    ATTRS{devpath}=="2"
    ATTRS{idProduct}=="6001"
    ATTRS{idVendor}=="0403"
    ATTRS{ltm_capable}=="no"
    ATTRS{manufacturer}=="FTDI"
    ATTRS{maxchild}=="0"
    ATTRS{power/active_duration}=="667412"
    ATTRS{power/async}=="enabled"
    ATTRS{power/autosuspend}=="2"
    ATTRS{power/autosuspend_delay_ms}=="2000"
    ATTRS{power/connected_duration}=="667408"
    ATTRS{power/control}=="on"
    ATTRS{power/level}=="on"
    ATTRS{power/persist}=="1"
    ATTRS{power/runtime_active_kids}=="0"
    ATTRS{power/runtime_active_time}=="667134"
    ATTRS{power/runtime_enabled}=="forbidden"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="1"
    ATTRS{power/wakeup}=="disabled"
    ATTRS{power/wakeup_abort_count}==""
    ATTRS{power/wakeup_active}==""
    ATTRS{power/wakeup_active_count}==""
    ATTRS{power/wakeup_count}==""
    ATTRS{power/wakeup_expire_count}==""
    ATTRS{power/wakeup_last_time_ms}==""
    ATTRS{power/wakeup_max_time_ms}==""
    ATTRS{power/wakeup_total_time_ms}==""
    ATTRS{product}=="FT232R USB UART"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{rx_lanes}=="1"
    ATTRS{serial}=="A50285BI"
    ATTRS{speed}=="12"
    ATTRS{tx_lanes}=="1"
    ATTRS{urbnum}=="16"
    ATTRS{version}==" 2.00"

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb3':
    KERNELS=="usb3"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{authorized_default}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bMaxPower}=="0mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="0515"
    ATTRS{bmAttributes}=="e0"
    ATTRS{busnum}=="3"
    ATTRS{configuration}==""
    ATTRS{devnum}=="1"
    ATTRS{devpath}=="0"
    ATTRS{idProduct}=="0002"
    ATTRS{idVendor}=="1d6b"
    ATTRS{interface_authorized_default}=="1"
    ATTRS{ltm_capable}=="no"
    ATTRS{manufacturer}=="Linux 5.15.0-27-generic xhci-hcd"
    ATTRS{maxchild}=="4"
    ATTRS{power/active_duration}=="20779208"
    ATTRS{power/async}=="enabled"
    ATTRS{power/autosuspend}=="0"
    ATTRS{power/autosuspend_delay_ms}=="0"
    ATTRS{power/connected_duration}=="20779208"
    ATTRS{power/control}=="auto"
    ATTRS{power/level}=="auto"
    ATTRS{power/runtime_active_kids}=="2"
    ATTRS{power/runtime_active_time}=="20779205"
    ATTRS{power/runtime_enabled}=="enabled"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="0"
    ATTRS{power/wakeup}=="disabled"
    ATTRS{power/wakeup_abort_count}==""
    ATTRS{power/wakeup_active}==""
    ATTRS{power/wakeup_active_count}==""
    ATTRS{power/wakeup_count}==""
    ATTRS{power/wakeup_expire_count}==""
    ATTRS{power/wakeup_last_time_ms}==""
    ATTRS{power/wakeup_max_time_ms}==""
    ATTRS{power/wakeup_total_time_ms}==""
    ATTRS{product}=="xHCI Host Controller"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{rx_lanes}=="1"
    ATTRS{serial}=="0000:00:14.0"
    ATTRS{speed}=="480"
    ATTRS{tx_lanes}=="1"
    ATTRS{urbnum}=="42"
    ATTRS{version}==" 2.00"

  looking at parent device '/devices/pci0000:00/0000:00:14.0':
    KERNELS=="0000:00:14.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="xhci_hcd"
    ATTRS{ari_enabled}=="0"
    ATTRS{broken_parity_status}=="0"
    ATTRS{class}=="0x0c0330"
    ATTRS{consistent_dma_mask_bits}=="64"
    ATTRS{d3cold_allowed}=="1"
    ATTRS{device}=="0x1e31"
    ATTRS{dma_mask_bits}=="64"
    ATTRS{driver_override}=="(null)"
    ATTRS{enable}=="1"
    ATTRS{irq}=="29"
    ATTRS{local_cpulist}=="0-3"
    ATTRS{local_cpus}=="f"
    ATTRS{msi_bus}=="1"
    ATTRS{msi_irqs/29}=="msi"
    ATTRS{numa_node}=="-1"
    ATTRS{power/async}=="enabled"
    ATTRS{power/control}=="on"
    ATTRS{power/runtime_active_kids}=="1"
    ATTRS{power/runtime_active_time}=="20780018"
    ATTRS{power/runtime_enabled}=="forbidden"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="1"
    ATTRS{power/wakeup}=="enabled"
    ATTRS{power/wakeup_abort_count}=="0"
    ATTRS{power/wakeup_active}=="0"
    ATTRS{power/wakeup_active_count}=="0"
    ATTRS{power/wakeup_count}=="0"
    ATTRS{power/wakeup_expire_count}=="0"
    ATTRS{power/wakeup_last_time_ms}=="0"
    ATTRS{power/wakeup_max_time_ms}=="0"
    ATTRS{power/wakeup_total_time_ms}=="0"
    ATTRS{power_state}=="D0"
    ATTRS{revision}=="0x04"
    ATTRS{subsystem_device}=="0x7270"
    ATTRS{subsystem_vendor}=="0x8086"
    ATTRS{vendor}=="0x8086"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{power/async}=="enabled"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_kids}=="13"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_enabled}=="disabled"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="0"
    ATTRS{waiting_for_supplier}=="0"

und

$ grep serial /proc/ioports

gibt nichts aus

kB Team-Icon

Supporter, Wikiteam
Avatar von kB

Anmeldungsdatum:
4. Oktober 2007

Beiträge: 9723

Wohnort: Münster

BlackMage schrieb:

[…]

$ ls -l /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Mai  1 16:30 /dev/ttyUSB0
$ groups
user adm dialout cdrom sudo dip plugdev lpadmin lxd sambashare

Demnach solltest Du problemlos auf /dev/ttyUSB0 zugreifen können, weil Du ja Mitglied in der Gruppe dialout bist.

Was zeigen:

sudo stty -F /dev/ttyUSB
stty -F /dev/ttyUSB

Und wenn Du mit einem anderen (welchem?) Programm /dev/ttyUSB0 benutzt, wie lautet die exakte Fehlermeldung?

Verbinde TxD mit RxD über eine Büroklammer. Sende einen beliebigen Text:

echo the quick brown fox jumps ober the lazy dog >> /dev/ttyUSB0 ; cat /dev/ttyUSB0 

Was geschieht?

BlackMage

(Themenstarter)

Anmeldungsdatum:
29. April 2010

Beiträge: 45

Wohnort: Hannover

$ stty -F /dev/ttyUSB0
speed 38400 baud; line = 0;
min = 1; time = 0;
-brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -echo -echoe
$ sudo stty -F /dev/ttyUSB0
speed 38400 baud; line = 0;
min = 1; time = 0;
-brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -echo -echoe

und

$ echo the quick brown fox jumps ober the lazy dog >> /dev/ttyUSB0 ; cat /dev/ttyUSB0

hängt nur

rx(d) ind tx(d) sind mit einem Brückenkabel verbunden

das merkwürdige ist der adapter reagiert auf die Eingabe(LEDs blinken kurz auf) aber eine Ausgabe erfolgt nicht ich habe jetzt wieder den ft232 adapter in verwendung, aber kein Adapter funktioniert

ich bin auf "Linux version 5.15.0-27-generic (buildd@ubuntu) (gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #28-Ubuntu SMP Thu Apr 14 04:55:28 UTC 2022"

Antworten |