diff -u libnxt.orig/main_jlibnxt.c libnxt/main_jlibnxt.c --- libnxt.orig/main_jlibnxt.c 2010-01-19 09:46:49.407637000 +0100 +++ libnxt/main_jlibnxt.c 2010-01-19 09:46:08.149928000 +0100 @@ -210,33 +210,6 @@ return usb_bulk_read((struct usb_dev_handle *)hdl, 0x82, buf, len, 20000); } -static char samba_serial_no[] = {4, 3, '1', 0}; - -static int -nxt_serial_no(long hdev, char *serno, int maxlen) -{ - struct usb_device *dev = (struct usb_device *)hdev; - struct usb_dev_handle *hdl; - - // If the device is in samba mode it will not have a serial number so we - // return "1" to be in line with the Lego Fantom driver. - if (dev->descriptor.idVendor == VENDOR_ATMEL && - dev->descriptor.idProduct == PRODUCT_SAMBA) { - memcpy(serno, samba_serial_no, sizeof(samba_serial_no)); - return sizeof(samba_serial_no); - } - - hdl = usb_open(dev); - if (!hdl) - return 0; - - int len = - usb_get_string(hdl, dev->descriptor.iSerialNumber, 0, serno, maxlen); - usb_close(hdl); - - return len; -} - JNIEXPORT jobjectArray JNICALL Java_lejos_pc_comm_NXTCommLibnxt_jlibnxt_1find(JNIEnv *env, jobject obj)