I did some work at the weekend on my Java sound codec. (
http://jdigi.net)
It can now convert ASCII text to sound and back again.
Here is a sound file and screenshot of the text "xb:1KAcxZPRc495U8ZQxnY1ZnhRE46HvA6nUc?a=4.025&l=Bitcoin Booksy1234z" being transmitted and received with a carrier frequency of 1000Hz. (I'll explain the text in a moment).
Sound file:
http://multibit.org/jdigi/sample.auScreenshot:
http://multibit.org/jdigi/screenShot1.pngTime taken to transmit text: 5.75 seconds.
Format of transmitted textFor the text, it is based on a bitcoin URI but I have abbreviated the usual 'bitcoin:', "amount", "label" to shorten the length.
I am thinking:
1) Start the text with an ASCII 0x02 STX - start of text - shown as the letter "x" above.
2) Separate the end of the main URI text from the checksum with ASCII 0x03 - end of text - shown as letter 'y'.
3) Add a 4 character checksum for error detection (or something more sophisticated to give some error correction) - shown as text '1234'
4) Finish the message with ASCII 0x04 - end of transmission - shown as letter 'z'
BandwidthIf you look on the screenshot at the spectrum at the bottom (called a waterfall because it scrolls downwards) you can see that the signal is using about 500 Hz of bandwidth. It is PSK125.
Looking on the Android market place I see there is an existing PSK codec available as
https://market.android.com/details?id=com.wolphi.psk31&hl=en. The top frequency on its waterfall is 2000 Hz so let us limit ourselves to that.
With bandwidth of 100Hz - 2000Hz you could:
1) Frequency multiplex the transmit signal two fold to half the transmit time - 2 x 500Hz = 1000Hz. Transmit time < 3 seconds.
2) Have a 'back channel' (perhaps PSK63 = 200Hz bandwidth)
The back channel would be used to acknowledge the message has been received ok.
UsageI am thinking it would be practical to:
1) Have a standalone wallet, "the wallet", that has a microphone and speaker and a USB connection.
2) You use it to literally talk with a networked device, "the host", as follows:
2.1) Host squawks bitcoin URI to wallet to ask for some bitcoin.
2.2) Wallet acknowledges bitcoin URI, asks user if they would like to pay
2.3) User agrees to pay, wallet signs a transaction and squawks it to the host
2.4) Host acknowledges transaction and forwards it to the bitcoin network (it will always do this as it wants the money!).
2.5) Wallet keeps track of the transactions and perhaps you sync it at home via USB so that it checks the blockchain for the transactions and so that you can put some more cash on it.
A little standalone wallet with a microphone, little speaker, small keypad and display would not cost very much. You could also have it as an Android app.
p.s. I also wanted to add that the jdigi code is based on the znuradio code :
Copyright (c) 2004 Leigh L. Klotz, Jr. <
[email protected]>
This is MIT licence.