Benutzerinformationen überspringen
User
Registrierungsdatum: 04.01.2017
Derivat: Ubuntu
Architektur: 64-Bit PC
Desktop: GNOME 3.0
Andere Betriebssysteme: Windows 10
Benutzerinformationen überspringen
Ubuntu-Forum-Team
Registrierungsdatum: 04.03.2008
Derivat: Kein Ubuntu-Derivat
Architektur: 64-Bit PC
Desktop: KDE4
Andere Betriebssysteme: Fedora 27
Benutzerinformationen überspringen
User
Registrierungsdatum: 04.01.2017
Derivat: Ubuntu
Architektur: 64-Bit PC
Desktop: GNOME 3.0
Andere Betriebssysteme: Windows 10
Benutzerinformationen überspringen
Ubuntu-Forum-Team
Registrierungsdatum: 04.03.2008
Derivat: Kein Ubuntu-Derivat
Architektur: 64-Bit PC
Desktop: KDE4
Andere Betriebssysteme: Fedora 27
Quellcode |
|
1 |
sudo apt-get install build-essential |
Benutzerinformationen überspringen
User
Registrierungsdatum: 04.01.2017
Derivat: Ubuntu
Architektur: 64-Bit PC
Desktop: GNOME 3.0
Andere Betriebssysteme: Windows 10
Leider weiß ich nicht was ein code tac ist.
Benutzerinformationen überspringen
User
Registrierungsdatum: 04.01.2017
Derivat: Ubuntu
Architektur: 64-Bit PC
Desktop: GNOME 3.0
Andere Betriebssysteme: Windows 10
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
#include <libusb-1.0/libusb.h> #include <stdio.h> #include <stdint.h> int main(void) { unsigned char data[64]; int received_length; int r = 1; libusb_context* ctx = NULL; libusb_device_handle* dev_handle = NULL; libusb_init(&ctx); dev_handle = libusb_open_device_with_vid_pid(ctx, 0x0955, 0x7820); if(dev_handle) { r = libusb_bulk_transfer(dev_handle, 0x81, data, sizeof(data), &received_length, 10000); if (r == 0) { if(received_length == 8) { printf("uid: %#016lx\n", *(uint64_t*)data); } else { r = 1; printf("Error: We got %d bytes of data insetad of the 8 bytes we expected...\n", received_length); } } else { printf("Error: USB read failed!\n"); } libusb_release_interface(dev_handle, 0); } else { printf("Error: Failed to open device!\n"); } libusb_exit(ctx); return r; } |
Dieser Beitrag wurde bereits 4 mal editiert, zuletzt von »sinus65« (05.01.2017, 17:56)
Benutzerinformationen überspringen
User
Registrierungsdatum: 04.01.2017
Derivat: Ubuntu
Architektur: 64-Bit PC
Desktop: GNOME 3.0
Andere Betriebssysteme: Windows 10
Sponsorenwerbung: |
Hardware, Computer, PCs, Notebooks & Laptops mit Linux |
Forensoftware: Burning Board®, entwickelt von WoltLab® GmbH
Individuelle Notebooks Laptops - Individuelle Computer PCs - Linux Notebooks & Computers
Lastminute - Ubuntu Linux - Abmahnung - Geek und Nerd Shirt Shop
T-Shirts - sanierung wien