Cool place like EEVBlog, but for software / programming? - Page 1
Forum section: electronics / general

author: mkiijam
author_rank: Regular Contributor
timestamp: October 12, 2022, 03:50:35 am
content: Title says it all. I have a CF card that I need to read and change code on, nothing illegal, just lost access codes. My thought was to copy the data and dig in, but I'm not a software guy.

author: eti
author_rank: Super Contributor
timestamp: October 12, 2022, 06:16:14 am
content: Try:https://www.eevblog.com/forum/programming/

author: pcprogrammer
author_rank: Super Contributor
timestamp: October 12, 2022, 06:40:40 am
content: Quote from: mkiijam on October 12, 2022, 03:50:35 amSorry, but the title does not help with your question.Provide specifications about the CF card. Do you have a card reader connected to your computer? What type of operating system are you using? How much data are you talking about? Is it readable text or is it encoded binary?Try to be more specific when asking a question.Like eti suggested, you can start a new thread in the programming section but use a title like "Need to retrieve data from a CF card" and word your question such that it provides the needed information.

author: rstofer
author_rank: Super Contributor
timestamp: October 12, 2022, 04:15:58 pm
content: If I wanted to dump a CF, I would probably use the Linux 'dd' command. There are places where Linux shines and this is one of them.The 'dd' command will allow you to copy, byte by byte, from the CF to your hard drive. It will also copy an image from hard drive to CF.

author: mkiijam
author_rank: Regular Contributor
timestamp: October 12, 2022, 07:20:18 pm
content: Title does say it all cause I didn't know there were cool software / programming dudes(ettes) here! Yay!Okay, I don't got nothing yet. A reader makes perfect sense. I looked on eBay and Amazon and haven't a clue of anything trust worthy. Recommendations on brand / model?1. Windows 10, but I have many computers I could load any OS on.2. It's a 32Mb card.3. At this point I have no idea how the data is stored.Here are some more details and then maybe I should start a new post in the programming section(?)a. This hardware is an automated industrial processor that no longer has any support.b. It has a touch screen GUI that is asking for a "access code" that is numerical 0-9. It looks like could any length up to 7 digits. i.e. 01 is just as valid as 001, 0001 as an attempt. Unlike some "PIN" numbers that require 4 digits as a minimum and maximum.c. Some digging into some available history reveals the previously written automation protocol, including the user password / access code is stored on a CF card. I opened it to indeed find a card.d. It does have a way, through dip switches, to erase any user loaded software and return to factory settings, but I need to run the unit AS IS before I do that, hence wanting to get pass its password block.

author: pcprogrammer
author_rank: Super Contributor
timestamp: October 12, 2022, 07:31:54 pm
content: See that clears thing up.32MB is not that big, but finding a max 7 digit passkey can be difficult, especially when it is encoded in some way.Since it is basically just reading the card I don't think the reader is such a problem. I believe UGREEN is not to bad a brand.Like rstofer wrote the dd command on a linux machine is the easiest to get the data from the card into an image. That can then be probed in all sorts of ways without possible harm to the original.I myself like Linux Mint but any flavor of linux will do. I would suggest to order a card reader and install linux on one of your computers. When that is set up come back here for a follow up.

author: mkiijam
author_rank: Regular Contributor
timestamp: October 12, 2022, 07:43:05 pm
content: Will do! Stay tuned!

author: AndyBeez
author_rank: Frequent Contributor
timestamp: October 12, 2022, 07:51:06 pm
content: Greetings.The first issue is what is the file system used on that Compact Flash card? One might expect it to be either FAT16 or similar but, given the industrial heritage of the device that it's come out of, I would not be 100% certain.As for CF readers, any generic USB 'multi card' reader with a CF port will suffice. Don't pay anything more than 20 bucks. There is nothing special about these readers, it's just finding one that works. You'll use it how many times after this? My CF reader was last used in...urm...2005?I too recommend a partition copy - that's copying the CF card at the binary level, regardless of the file system onto a new target for analysis. Copy onto a blank USB memory stick. Then place the USB memory stick in a drawer and lock it. This way you'll always have a hard recovery partition for that, "oh crap" moment.For Windows 10 you will need ( I THINK ) to download some partitioning software - I believe WIN10 Disk Management does not do partition to partition copying. Anyone else know a cheaper faster way in WIN10? If you have access to any Linux kernel machine just dd 'Disk Duplicate/Disk Destroy' the partition onto the USB targets. MacOS has Disc Utility.On data analysis, you might find the file contents are at best in some binary format or worse, encrypted. Or those passwords may be in clear text because no one thought that anyone would ever take that CF card out.Happy hunting

author: Benta
author_rank: Super Contributor
timestamp: October 12, 2022, 08:21:45 pm
content: GitHub or GitLab. Coolest places ever and super user-friendly.

author: james_s
author_rank: Super Contributor
timestamp: October 12, 2022, 08:41:19 pm
content: Quote from: mkiijam on October 12, 2022, 07:20:18 pmIt's hard to get very far in EE these days without some software knowledge. Virtually every modern device contains a microcontroller and firmware of some sort.

author: alm
author_rank: Super Contributor
timestamp: October 12, 2022, 09:11:26 pm
content: Quote from: Benta on October 12, 2022, 08:21:45 pmI'm glad you like those sites, but neither have forums where you would post a general question.For actual software questionsStackOverflowappears to be the most popular, but that requires you know enough to ask a specific question. This seems more a question of "can somebody solve this problem for me", similar to "can somebody design a PCB for me that does X", which requires either finding a volunteer or hiring a freelancer, but in the latter case you better describe very specifically what you want.

author: tggzzz
author_rank: Super Contributor
timestamp: October 12, 2022, 09:39:36 pm
content: Quote from: alm on October 12, 2022, 09:11:26 pmStackoverflow is deliberately targeted at and limited to questions such as "which button do I press to flogify the quomblat?". Even then the quality of the responses is, ahem, difficult to assess.Stackexchange is absolutely useless for interesting questions that require subtle points and arguments, such as "when should I use an RTOS and when a naked FSM?"

author: magic
author_rank: Super Contributor
timestamp: October 13, 2022, 05:05:50 am
content: Don't bother with Stack, they don't even have a way to ask questions and wait for new data from the OP, which is going to be needed a lot.I honestly don't know. You are not even looking strictly at a programming problem, but reverse engineering some old-ass configuration files (or firmware) of some old-ass, obscure machine.Also, software developers these days are so uncool that they would make even an average non-software nerd cringe, but that's another rant...

author: Berni
author_rank: Super Contributor
timestamp: October 13, 2022, 05:36:34 am
content: This is more along the lines of software hacking. So you are probably instead looking for hacker forums.There are plenty of tools in windows that can create a image from the card. Once you have the image you can write it back to a new card for experimenting or just browse trough it by mounting it as a virtual drive.If you are lucky the card might have a valid FAT16 filesystem on it and some plain text configuration file. If you are slightly more unlucky it might have a weird filesystem that is readable under linux. If you are unlucky it might have a proprietary filesystem clustered with binary junk that is possibly purposely obfuscated that holds the password somewhere in hashed form. If the last one is the case then you will probably have to also dump and decompile the firmware of the controller to understand how to read the card correctly (possibly weeks of digging trough megabytes of assembly code).

author: peter-h
author_rank: Super Contributor
timestamp: October 13, 2022, 02:14:37 pm
content: I posted about this herehttps://www.eevblog.com/forum/chat/freelancer-com-can-one-post-here-instead-if-looking-for-someone-to-write-code/msg4433713/#msg4433713but didn't get far

author: rstofer
author_rank: Super Contributor
timestamp: October 13, 2022, 03:18:56 pm
content: After I used 'dd' to copy the contents of the CF to disk, I would probably try to make a copy using another actual CF or possibly a USB thumb drive. Then I would try to mount it. There may be a recognizable file system in use. That helps because you can look at the directory listing. Of course, it could be totally unrecognizable and simply a binary image that only the device understands. That's going to make the project a lot less feasible.There would be every reason to believe there is a file system simply because there are so many variants of code for FAT16https://simba-os.readthedocs.io/en/latest/library-reference/filesystems/fat16.html

author: DavidAlfa
author_rank: Super Contributor
timestamp: October 13, 2022, 07:41:49 pm
content: Make a dump using some image tool either dd or a simple utility likeUSB Image Toolwhich is great.Try uploading the file here, probably sooner than later someone will find out

author: mkiijam
author_rank: Regular Contributor
timestamp: October 13, 2022, 09:55:28 pm
content: Okay All,I have acquired my CF card reader/writer.Do you think I should get the 32Mb size that the original card is? Would it make a difference? Most cards I can find are much larger...

author: Ed.Kloonk
author_rank: Super Contributor
timestamp: October 14, 2022, 04:53:09 am
content: Quote from: mkiijam on October 13, 2022, 09:55:28 pmCan the target device read a card greater than 32Mb?

author: pcprogrammer
author_rank: Super Contributor
timestamp: October 14, 2022, 06:09:02 am
content: Quote from: DavidAlfa on October 13, 2022, 07:41:49 pmThe OP will have to compress the file and then still the question if it shrinks enoughQuote from: mkiijam on October 13, 2022, 09:55:28 pmLike Ed.Kloonk wrote, the question is if the target can handle bigger cards. But as long as you make an image of the original and store it in a safe place there is no need (yet) to get another card. With the image you can always restore the original.Let us know if you need help with the linux commands to make the image.

author: Berni
author_rank: Super Contributor
timestamp: October 14, 2022, 06:44:49 am
content: Quote from: mkiijam on October 13, 2022, 09:55:28 pmDisks can have partitions that don't cover the whole drive, so there is no problem making a 32MB FAT16 partition on a 1GB card. This is exactly what happens if you raw copy a smaller card onto a bigger one. To use the extra space you need to fix the partition table to include the rest of the card space.There might be limitations however in how the cards handle addressing. So it is possible an old device might not be able to read a 32GB card because something overflows. With SD cards one of those limits is 2GB

author: DavidAlfa
author_rank: Super Contributor
timestamp: October 14, 2022, 01:06:53 pm
content: Quote from: pcprogrammer on October 14, 2022, 06:09:02 amWhat? 32MB was a issue in 2003!But better don't fill the forum with crap, instead use any online cloud storage like mediafire, Google drive, mega, anonfiles...

author: pcprogrammer
author_rank: Super Contributor
timestamp: October 14, 2022, 01:13:10 pm
content: Quote from: DavidAlfa on October 14, 2022, 01:06:53 pmIndividual files bigger then 4MB can't be attached here, and the max for a single post is 10 files and 5MB total

author: Ed.Kloonk
author_rank: Super Contributor
timestamp: October 14, 2022, 01:15:22 pm
content: Long live the file stitcher!

author: eti
author_rank: Super Contributor
timestamp: October 14, 2022, 03:57:07 pm
content: One thing the thread may have overlooked:What's the make and model of the machine in which this CF card is being used?Post the make and model please. Thanks.