this post was submitted on 04 Aug 2024
37 points (100.0% liked)

Technology

58135 readers
4821 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
 

I'm currently trying to set up a homebrew cassette tape storage format, but trying to use existing tech where possible. I was excited to see that minimodem already exists for converting an audio stream to a byte stream, and is even available in termux for android, so I could decode cassettes with my phone! However, I'd like some sort of higher-level tool to encode and decode "packets" or "slices" so that I can add error correction. I'm sure this sort of thing must exist for amature radio purposes.

I could write a script that cuts a file into slices, with checksums and redundancy for each slice, and then pads them with null bytes so I can isolate each frame when decoding. What I want is to find out if that's already been done. I've heard of AX.25 packets but I can't find a tool that does that with stdio.

you are viewing a single comment's thread
view the rest of the comments
[–] pc486@sh.itjust.works 6 points 1 month ago

You're probably decoding noise or in the middle of the bit stream.

What you're looking for is called "preamble." That's a sequence of bits used to synchronize the decoder (marks the start of data, useful in modulation schemes for clock recovery, and a few other things).

Looking at minimodem's manual, try using the sync-byte option. Prepend your tar stream with a string of bytes, like 0x01, before sending to minimodem for encoding. Then use the sync code option to mark the start of the tar bit stream. This is as simple as cat preamble.bin myfiles.tar | minimodem --tx ....

Other things to consider: start small with 300 baud BFSK before speeding up. Test with wav files before attempting physical tape or speakers and a microphone.