sanjay900 / xfer9860

A linux app for sending and recieving data from a casio calculator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"libusb_open() returned NULL." on Arch Linux

elisaado opened this issue · comments

Hi, when I run xfer9860 I get the error:

sudo xfer9860 -i
--- xfer9860 v0.2.2  Copyright (C) 2007-2014 Andreas Bertheussen, Manuel Naranjo and Bruno L. Alata..
[>] Setting up USB connection.. 
ERR: libusb_open() returned NULL.

[E] A listening device could not be found.
    Make sure it is receiving; press [ON], [MENU], [sin], [F2]

Is this still a problem?

let me check

Hey @sanjay900 thank you for your reply. The libusb_open() call works (I think), but the program segfaults now (see image below).

image

I just made a change, it should now tell you a device was not detected, instead of seg faulting. Test your cables, it sounds like the calculator isn't being detected correctly. Could you post the output of dmesg when you plug the calculator in?

Will check soon!

Hey @sanjay900, when I plug the calculator in (fx cg 50) and put it in receiving mode, I get

eli@probook ~/xfer9860 (git)-[master] % ./xfer9860 -d a a
--- xfer9860 v0.2.2  Copyright (C) 2007-2014 Andreas Bertheussen, Manuel Naranjo and Bruno L. Alata..
[>] Setting up USB connection.. 
[E] A listening device could not be found.
    Make sure it is receiving; press [ON], [MENU], [sin], [F2]

so it does not segfault any more

Could you give me the output of dmesg when you plug in your calculator? The app just isn't detecting your calculator at all.

Also, which calculator do you have?

Hey @sanjay900, this is what dmesg outputs:


[37797.648367] usb 1-4: new high-speed USB device number 19 using xhci_hcd
[37797.793490] usb 1-4: New USB device found, idVendor=07cf, idProduct=6102, bcdDevice= 1.00
[37797.793499] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[37797.793505] usb 1-4: Product: CASIO MassStorage Device
[37797.793511] usb 1-4: Manufacturer: CASIO MassStorage Device
[37797.793516] usb 1-4: SerialNumber: 0000dfLbESAf
[37797.798402] usb-storage 1-4:1.0: USB Mass Storage device detected
[37797.802166] scsi host3: usb-storage 1-4:1.0
[37798.829184] scsi 3:0:0:0: Direct-Access     CASIO    ColorGraph       1.00 PQ: 0 ANSI: 0 CCS
[37798.829413] sd 3:0:0:0: Attached scsi generic sg2 type 0
[37798.830541] sd 3:0:0:0: [sdb] 32915 512-byte logical blocks: (16.9 MB/16.1 MiB)
[37798.830903] sd 3:0:0:0: [sdb] Write Protect is off
[37798.830905] sd 3:0:0:0: [sdb] Mode Sense: 07 00 00 08
[37798.831190] sd 3:0:0:0: [sdb] No Caching mode page found
[37798.831194] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[37798.838262]  sdb: sdb1
[37798.840712] sd 3:0:0:0: [sdb] Attached SCSI removable disk
[37798.878489] scsi_io_completion_action: 68 callbacks suppressed
[37798.878492] sd 3:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[37798.878494] sd 3:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 28 00 00 10 00
[37798.878495] print_req_error: 68 callbacks suppressed
[37798.878496] print_req_error: I/O error, dev sdb, sector 40
[37798.884858] sd 3:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[37798.884860] sd 3:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 48 00 00 30 00
[37798.884862] print_req_error: I/O error, dev sdb, sector 72
[37798.900843] sd 3:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[37798.900862] sd 3:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 88 00 00 78 00
[37798.900870] print_req_error: I/O error, dev sdb, sector 136
[37798.998896] sd 3:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[37798.998908] sd 3:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 01 10 00 00 f0 00
[37798.998916] print_req_error: I/O error, dev sdb, sector 272
[37799.154227] sd 3:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[37799.154239] sd 3:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 45 00 00 18 00
[37799.154246] print_req_error: I/O error, dev sdb, sector 69
[37799.184891] sd 3:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[37799.184913] sd 3:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 65 00 00 30 00
[37799.184923] print_req_error: I/O error, dev sdb, sector 101
[37799.214481] sd 3:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[37799.214497] sd 3:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 a5 00 00 78 00
[37799.214506] print_req_error: I/O error, dev sdb, sector 165
[37799.340401] sd 3:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[37799.340413] sd 3:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 01 2d 00 00 f0 00
[37799.340419] print_req_error: I/O error, dev sdb, sector 301
[37799.655429] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[37799.727754] sd 3:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[37799.727757] sd 3:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 4f f0 00 00 20 00
[37799.727759] print_req_error: I/O error, dev sdb, sector 20464
[37799.734536] sd 3:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[37799.734539] sd 3:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 63 c8 00 00 20 00
[37799.734542] print_req_error: I/O error, dev sdb, sector 25544

There are errors, but I can transmit and receive files just fine using Nautilus (from GNOME)

I have the Casio FX cg-50 (able to run all prizmSDK add-ons)
image

Oh, this software is not compatible with that calculator. Its only compatible with the FX-9860 / FX-9750

Ah, I see. Thank you anyway!

If you ever need help reverse engineering this device, just ping me :-)