Register

Casio fx-9860G SD- How to read files in the sd card?

Discuss anything related to calculators. For specific help on certain games/programs check the Released Projects subforum.
Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby AmazoNKA » Sat Sep 10, 2016 1:57 pm

Soldering done now - will see if I can do some tests soon

Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby AmazoNKA » Sat Sep 10, 2016 3:04 pm

Thanks again for the openlog version of your insight add-in

I was able to connect 32gb version of micro sd and so far was only able to use some write functions from your add-in which I believe created 2 logfiles (which I can view on pc along with config file but not from the addin yet) - it seemed most other functions were producing a small text box at the bottom of the screen with 0 and 1 written in it - so I just wonder if this is OK or if it indicates some problem with my setup like soldering or the card or config file please. Just checking if you think I have some problem or if it is nothing major to worry about.

I suspect I should change config file to switch to command mode for other commands in your addin to work (or perhaps there is a way to send the escape sequence three times to achieve the same or you have something else for that) but thought I ask you here in meantime in case some other changes are needed like speed setting etc as well or anything else you would suggest.

Also let me know if there are some particular tests you want me to run regarding firmware etc

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby SimonLothar » Sat Sep 10, 2016 5:43 pm

AmazoNKA wrote: - it seemed most other functions were producing a small text box at the bottom of the screen with 0 and 1 written in it - so I just wonder if this is OK or if it indicates some problem with my setup like soldering or the card or config file please. Just checking if you think I have some problem or if it is nothing major to worry about.
No, there is nothing wrong. It is a regular feature of the text-viewer, which displays the results of the tests.
AmazoNKA wrote:I suspect I should change config file to switch to command mode for other commands in your addin to work (or perhaps there is a way to send the escape sequence three times to achieve the same or you have something else for that) but thought I ask you here in meantime in case some other changes are needed like speed setting etc as well or anything else you would suggest.
The addin runs at 115200 baud. You have to change the config-file accordingly. And you should set the flag for "command-mode on startup" in the config-file. Though, there is an escape-option, indeed.
AmazoNKA wrote:Also let me know if there are some particular tests you want me to run regarding firmware etc
First try the commands "ls", "?" and "disk". It is possible, that immediately after startup, you have to repeat the "ls"-command once.
If "?" does not show "OpenLog v3.3" but "OpenLog v4.0", there might be a problem with the escape sequence, which is not stored to the logfile with version 4.0 (according to the documentation).

If these three commands work well, try "test write". This function should create a file "neu.txt" of exactly the size 205603 (205600 with version 4.0) on the SD-card. The file should contain 400 blocks of 512 0xAA with a two byte checksum 0x5400 each. Check the size with "ls" or "size file". If it is OK, run "check write". Have a look at the results for "retries". If the function has read 205600 (it omits the finalizing escape sequence) you can EXIT it.
I'll be back!

Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby AmazoNKA » Sat Sep 10, 2016 10:08 pm

Great, changed config file as you suggested and the other functions work - thank you.

Version prints as 4.0

Ls needed rerunning as you suspected

I'm lost slightly with your retries paragraph. There was first 2 printed next to tries and other values you specified but pressing exit started some new loop with tries going up and up and the other things stopped making sense, read size appeared smaller than you wrote and menu button or exit does not stop the add-in - let me know what to do please

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby SimonLothar » Sun Sep 11, 2016 7:01 am

Did the option "test write" create a file "neu.txt" of exactly the size 205600 on the SD-card?
Does the file contain 400 blocks of 514 bytes each?
Each block 512 \xAA and a two byte checksum 0x5400.
I'll be back!

Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby AmazoNKA » Sun Sep 11, 2016 6:51 pm

Will check when back at the computer - had to restart the calculator as I could not get out of the addin even after unpowering the openlog and unpluging the 3 pin cable.

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby SimonLothar » Sun Sep 11, 2016 9:28 pm

AmazoNKA wrote:Will check when back at the computer - had to restart the calculator as I could not get out of the addin even after unpowering the openlog and unpluging the 3 pin cable.
The "check test" option loops without check of the keyboard (performance considerations). Hence the MENU-key is not heeded for. There seem to be too much errors, which I did not experience with my system. In the next version I will limit the retries. Though it would be good, if you'd get the sparkfun.cpp, which I included, running with your development environment. I separated the interacive part, which was only one function. The class with the serial part should do. You could do your experiments independently of me. During the week, I am a bit short of time.
I'll be back!

Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby AmazoNKA » Sun Sep 11, 2016 10:12 pm

Thank you. Regarding checking all the bytes in neu.txt - I'm not sure how to do it - would it be enough if i send the checksum or anything else HxD can produce please? The file size itself is exactly correct already

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby SimonLothar » Mon Sep 12, 2016 4:51 am

AmazoNKA wrote:Thank you. Regarding checking all the bytes in neu.txt - I'm not sure how to do it - would it be enough if i send the checksum or anything else HxD can produce please? The file size itself is exactly correct already
The use of a hex-viewer/editor like HxD would do. It is promising, that the filesize is OK.
I'll be back!

Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby AmazoNKA » Mon Sep 12, 2016 10:30 am

Visually it is also ok
HxD's checksum-32 is 0213c340 and crc-32 is 6ae68bc4 - do they match what you expected please?
Does it also mean I needed to create the file hundreds of times and see if they are all good - or how did you discover that there was a problem with openlog sometimes please?
Thanks again

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 49 guests