Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Hardware
    4. USB Port 's resetten. Zigbee Stick neustarten. Ohne Neustart

    NEWS

    • Neues Video über Aliase, virtuelle Geräte und Kategorien

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    USB Port 's resetten. Zigbee Stick neustarten. Ohne Neustart

    This topic has been deleted. Only users with topic management privileges can see it.
    • Elzershark
      Elzershark last edited by

      Zigbee Port funzt nicht. USB Port's Resetten ohne Raspi/PC neustart:

      in Putty (nicht unter /opt/iobroker. Einfach im Home Verzeichniss von z.B. Pi)

      sudo nano usbreset.c
      

      Das hier dann einfügen:

      /* usbreset -- send a USB port reset to a USB device */
      #include <stdio.h>
      #include <unistd.h>
      #include <fcntl.h>
      #include <errno.h>
      #include <sys/ioctl.h>
      #include <linux/usbdevice_fs.h>
      int main(int argc, char **argv)
      {
          const char *filename;
          int fd;
          int rc;
          if (argc != 2) {
              fprintf(stderr, "Usage: usbreset device-filename\n");
              return 1;
          }
          filename = argv[1];
          fd = open(filename, O_WRONLY);
          if (fd < 0) {
              perror("Error opening output file");
              return 1;
          }
          printf("Resetting USB device %s\n", filename);
          rc = ioctl(fd, USBDEVFS_RESET, 0);
          if (rc < 0) {
              perror("Error in ioctl");
              return 1;
          }
          printf("Reset successful\n");
          close(fd);
          return 0;
      }
      

      Dann weiter in Putty:

      sudo gcc usbreset.c -o usbreset
      sudo mv usbreset /usr/local/sbin/
      

      Adapter muss laufen (Rot/Gelb --> egal)

      Zigbee Adapter in Einstellung gehen.

      Den COM-Anschlussname löschen und den Adapter neu starten. (Darf nichts drin stehen)

      im Log gucken.

      Auf Fehler warten und den Adapter stoppen.

      Jetzt USB Daten anzeigen lassen:

      lsusb
      

      dort sieht man z.b.:

      Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
      
      Bus 001 Device 003: ID 0451:16a8 Texas Instruments, Inc. CC2531 ZigBee
      
      Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
      

      also lautet es:

      sudo usbreset /dev/bus/usb/001/003
      

      Adapter starten und dann den Port wieder auswählen, der vorher drin stand.
      Dann im log gucken. Jetzt sollte alles wieder laufen.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      Support us

      ioBroker
      Community Adapters
      Donate

      599
      Online

      32.0k
      Users

      80.5k
      Topics

      1.3m
      Posts

      1
      1
      565
      Loading More Posts
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      Community
      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
      The ioBroker Community 2014-2023
      logo