12 #include <hidapi/hidapi.h>
22 #include <sys/utsname.h>
26 static const u8 tone[] =
"\x0\x0F\x00\0\0\x80\x00\x00\x94\x01\x81\x02\x82\xE8\x03\x82\xE8\x03";
43 if (strcmp(arg,
"serial") == 0)
52 if (strcmp(arg,
"ip") == 0)
69 errmsg =
"\nAttempting beep..";
73 struct utsname utsname;
75 int isOld = strcmp(utsname.release,
"2.6.24") < 0;
77 printf(
"SUBSYSTEM==\"%s\", ATTRS{idVendor}==\"0694\", ATTRS{idProduct}==\"0005\a, MODE=\"0666\"\n", isOld ?
"usb_device" :
"usb");
80 printf(
"Manufacturer String: %ls\n", wstr);
82 printf(
"Product String: %ls\n", wstr);
84 printf(
"Serial Number String: %ls\n", wstr);
Error enumerations and decriptions.
EXTERN void(* ev3_close)(void *)
int info(const char *arg)
cause a beep and print HID information if applicable
packed structs for the packets.
void tcp_close(void *sock)
releases the socket file descriptor opened by tcp_open()
EXTERN const char * errmsg
global variable for last error message
BSD sockets/Winsock2 Input/Output wrappers.
contains declarations for ev3 commands
EXTERN int(* ev3_write)(void *, const u8 *, size_t)