Jump to content



Photo
- - - - -

Fx-9860sd Data Transfer Protocol


  • Please log in to reply
17 replies to this topic

#1 Manuel Naranjo

Manuel Naranjo

    Casio Addict

  • Members
  • PipPipPip
  • 65 posts
  • Gender:Male
  • Location:Rosario, Argentina

Posted 05 February 2007 - 12:44 AM

Hello everyone,
I'm a <{GNULINUX}> developer (I'm a kernel hacker also :D) I want to write an app to be able to transfer the files I write with the 9860 SDK to my calc without going to Windows to achieve it (I run the sdk under wine).
I think the USB driver this calc is using is a simple rs232/USB addapter, but to figure that out, I need the data transfer protocol. Does any one have it? If so please let me know, maybe I can write an app that can be ported to other OS (maybe using Java). If I'm not wrong adding USB support is much easier from what it seems I doubt Casio is using some strange USB protocol.
I had wrote USB drivers for <{GNULINUX}> Kernel before, so I have some experience in that field :D. If the USB is not an standard rs232 usb converter, I can create the driver for it.
Thanks,
Manuel

#2 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 05 February 2007 - 01:22 AM

Read this thread, it should help you out:
http://www.casiocalc...?showtopic=2806

In particular, read this post: http://www.casiocalc...c...ost&p=35848

I've meant to write my own Transfer program, but never found the time...

#3 Manuel Naranjo

Manuel Naranjo

    Casio Addict

  • Members
  • PipPipPip
  • 65 posts
  • Gender:Male
  • Location:Rosario, Argentina

Posted 05 February 2007 - 04:53 PM

Thanks, I had read that before posting, but didn't found the specs.
I know I can take the specs from the source, but I thought that maybe some one has written it down somewhere.
Thanks,
Manuel

#4 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 05 February 2007 - 08:54 PM

Well, I remeber a site where the specs where listed. When I come home from school, I'll look for it. Back to schoolwork now...

#5 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 06 February 2007 - 12:31 AM

Here's the site I was talking about: http://users.pandora.be/gp/casio/.

Once you get on to the site, on the left side, click on Information and then take a look at the Communication Protocol documents.

#6 Manuel Naranjo

Manuel Naranjo

    Casio Addict

  • Members
  • PipPipPip
  • 65 posts
  • Gender:Male
  • Location:Rosario, Argentina

Posted 06 February 2007 - 05:41 PM

Thanks, I will see what I can do.

#7 caspro

caspro

    Casio Freak

  • Members
  • PipPipPipPip
  • 216 posts

Posted 09 February 2007 - 12:56 PM

Here's another casio transfer program for <{GNULINUX}> which you may be interested in:

XI Interface

#8 Manuel Naranjo

Manuel Naranjo

    Casio Addict

  • Members
  • PipPipPip
  • 65 posts
  • Gender:Male
  • Location:Rosario, Argentina

Posted 09 February 2007 - 01:03 PM

Thnaks a lot, but I had confirmed that the 9860 protocol over USB has nothing to do with the old 9850 protocol.

I used an usb sniffer and captured all the transfers, I still have to analyze it (there are 3 logs and the most little is 1.5 MB). If anyone feels like helping let me know and I upload the logs somewhere.

Anyway old tools are usefull at least I don't have to start from the scratch :D

Thanks,
Manuel

#9 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 09 February 2007 - 01:37 PM

Hey Manuel Naranjo I would like to help you out. :D It would be nice if you could send me the logs. The serial communications should be the same as of the CFX-9850 and the Algebra FX because you can connect a CFX-9860 or a Algebra FX to the fx-9860. Maybe the USB protocol is actually different.

#10 Manuel Naranjo

Manuel Naranjo

    Casio Addict

  • Members
  • PipPipPip
  • 65 posts
  • Gender:Male
  • Location:Rosario, Argentina

Posted 14 February 2007 - 01:10 AM

Sorry I didn't saw your response, I will send you the logs, I could compress 75 MB into 170 kb :S.

#11 Manuel Naranjo

Manuel Naranjo

    Casio Addict

  • Members
  • PipPipPip
  • 65 posts
  • Gender:Male
  • Location:Rosario, Argentina

Posted 16 February 2007 - 02:59 PM

For those who are interested, I had started interpreting the protocol.

I have a C app for <{GNULINUX}> that can start communications and can emulate FA 124 behavior. It is not ended but at least I could get some data from the calc.

Here is the log of FA 124 in case you want to take a look: http://www.mendietab.../casio/log2.htm
And here is my interpretation of the code: http://www.mendietab...60_protocol.txt

There is a lot of junk :blink: on the log specially at the start of the transactions, that I have no idea what it does, but apparently it initiates the calc for usb transferring, don't worry about this :roflol: , I had a piece of code that can emulate this with out any problem :P .

If anyone has <{GNULINUX}> on his/her machine and want to give me a hand please let me know, I want to check if the initialization process is ok.

My code is using libusb (http://libusb.sourceforge.net/) it is fully compatible with <{GNULINUX}>, FreeBSD, NetBSD, OpenBSD, Darwin and MacOS X, there is a Windows Port (http://libusb-win32.sourceforge.net) but it is a bit off date, I don't know if win is compatible with my code. But maybe someone can try it out.

Cheers,
Manuel

#12 Guest_Guest_Robert_*_*

Guest_Guest_Robert_*_*
  • Guests

Posted 08 March 2007 - 12:08 PM

Hello, I would love to help! I am not a programmer [yet] but i can compile install etc and consider myself an Intermediate <{GNULINUX}> user. :)
And i would love to help out with testing etc.

PS- I got the FA-124 program running [with wine] but it did not detect my 9860. any tips?

-Thanks, Robert

#13 Manuel Naranjo

Manuel Naranjo

    Casio Addict

  • Members
  • PipPipPip
  • 65 posts
  • Gender:Male
  • Location:Rosario, Argentina

Posted 08 March 2007 - 02:24 PM

Hello, I would love to help! I am not a programmer [yet] but i can compile install etc and consider myself an Intermediate <{GNULINUX}> user. :)

What about helping with understanding the protocol? I have some dumps from transmitting and I could really use a hand here.

PS- I got the FA-124 program running [with wine] but it did not detect my 9860. any tips?

It will never work under wine. So far wine doesn't allow access to the usb layer so it will never see your device. I had been able to use it under vmware with a win98 image I created.

#14 Guest_Guest_Robert_*_*

Guest_Guest_Robert_*_*
  • Guests

Posted 08 March 2007 - 02:45 PM

Sorry :( I really can't be of any use there.
Hmmm, I didn't know wine didn't do USB.

-Robert

#15 Manuel Naranjo

Manuel Naranjo

    Casio Addict

  • Members
  • PipPipPip
  • 65 posts
  • Gender:Male
  • Location:Rosario, Argentina

Posted 09 March 2007 - 12:48 AM

Sorry :( I really can't be of any use there.

You sure? You don't need to know lots about programming. You just need to take a look at the logs and see if you can find patterns. Anyway beta testers can be really useful.

Hmmm, I didn't know wine didn't do USB.

Nope it can't do USB, Serial Ports or Parallel Ports, it's an emulator not a hole system. Maybe in the future it will, but not by now.

#16 Andreas B

Andreas B

    Casio Freak

  • Members
  • PipPipPipPip
  • 160 posts
  • Gender:Male
  • Location:Norway

  • Calculators:
    fx-9860G SD

Posted 09 March 2007 - 04:29 PM

Hi, I just got my fx-9860G SD, and I'm interested in this..
If you upload the data somewhere with some info, then those who like can take a look.

I'm a <{GNULINUX}> user too, but with limited programming-experience (can do some basic stuff with C/C++, or others if I have docs).

#17 Manuel Naranjo

Manuel Naranjo

    Casio Addict

  • Members
  • PipPipPip
  • 65 posts
  • Gender:Male
  • Location:Rosario, Argentina

Posted 10 March 2007 - 06:45 PM

I opened a project to host my code and deductions. Everyone can see it evolves at http://code.google.com/p/9860transfer/

In the downloads section you can find two different logs from FA-124, while in the wiki section you can find my deductions on the protocol.

Anyone is welcomed to collaborate, there's no need to be a coder or hacker (while it's better) firstly we need to decode the protocol from the logs. You just need to be smart to get this out. All the logs are in hexa base and have the ASCII equivalent next to it. EJ:

000027: Bulk or Interrupt Transfer (UP), 15.02.2007 17:47:56.1875000 +0.2500000Pipe Handle: 0x81e963d4 (Endpoint Address: 0x82)Get 0x29 bytes from the device: 01 33 32 31 30 30 31 46 30 30 38 30 30 30 30 30  .321001F00800000 30 30 30 30 30 35 30 32 30 30 30 30 30 30 30 30  0000050200000000 41 6E 67 6C 65 30 31 42 43                                   Angle01BC

The initialization part is done, I will make a binary so someone can test it with his/her calc.

Thanks,
Manuel

#18 Manuel Naranjo

Manuel Naranjo

    Casio Addict

  • Members
  • PipPipPip
  • 65 posts
  • Gender:Male
  • Location:Rosario, Argentina

Posted 14 March 2007 - 02:18 AM

Start testing:
Please all those who are using <{GNULINUX}>, or mac and would like to collaborate, please grab the sources from the project. And follow the instructions on how to build
Once you have it built, connect the calc and run the app 9860trasnfer(it will be allocated in the same folder than the sources).
You will see a huge output, that is the data transfer between the pc and the calc. Check in the log, you will see something like this:
Proccesor: RENESAS SH733701
Firmware Version: 01.03.0000
User Name: MANUEL
Please let me know if something goes wrong, or if it works all right. In any case please report which distro are you using.
Cheers,
Manuel




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users