Bitcoin Forum
May 05, 2024, 09:23:21 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: MultiBitShell + HP50G hack  (Read 3854 times)
jim618 (OP)
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



View Profile WWW
April 09, 2012, 10:23:51 AM
Last edit: April 15, 2012, 04:25:20 PM by jim618
#1

I thought I would start a topic dedicated to the MultiBit command line interface.

Current status

Code:
MultiBitShell: print and manipulate the MultiBit object model

Usage (Implemented):
  help                                            Show this help text.
  exit                                            Exit this MultiBitShell session.
  create  -wallet -filename=<>                    Makes a new wallet in the file specified.
  delete  -wallet -filename=<>                    Delete the wallet with the file specified.
  show    -wallet                                 Show the details of the last picked (active) wallet.
  list    -wallet                                 Lists all open wallets in a format suitable for picking.
  pick     $<item number> or @<search term>       Pick from the last list either by item number or match by search term (for wallets)


(Not Implemented Yet):
  create  -sendingAddress -address=<> -label=<>   Makes a new sending address with the given address and label.
          -receivingAddress -label=<>             Makes a new receiving address with the given label.

  edit    -preferences                            Edit the MultiBit preferences.
          -sendingAddress -address=<> -label=<>   Edit the sending address matching the given address or label.
          -receivingAddress -address=<> -label=<> Edit the receiving address matching the given address or label.

  list    -sendingAddress                         Lists all sending addresses in a format suitable for picking.
          -receivingAddress                       Lists all receiving addresses in a format suitable for picking.
          -transaction                            Lists all transactions for the active wallet for picking.

  delete  -sendingAddress -address=<> -label=<>   Delete the sending address with the given address or label.
          -receivingAddress -address -label=<>    Delete the receiving address with the given address or label.

  send    -address=<> -amount=<>                  Send the specified amount of BTC to the address specified.

  reset   -date=<>                                Remove all transactions on or after the date, or all if no date specified.
  replay  -date=<>                                Replay the blockchain from the date specified.

  import  -filename=<> -password=<>               Import private keys from the filename specified, using the password.
  export  -filename=<> -password=<>               Export private keys from the filename specified, using the password.

  waitFor -online or -replayComplete              Wait for MultiBit to come online or for the blockchain replay to complete.

  show    -online                                 Show whether MultiBit is onine or not.
          -version                                Show the MultiBit version number.
          -ticker                                 Show the most recent ticker details.
          -message max=<number>                   Show the most recent <number> of messages.
          -transaction                            Show the details of the last picked transaction.

I will update this top post as I work my way through it.


Getting started
There is a wiki with a link to how to get started at:

https://github.com/jim618/multibit/wiki/MultiBitShell


Please feedback
As I want the command line interface to also be usable as a machine-machine interface I am interested in what *consumers* of this interface think too. (For instance comments like : "if I could exec out and run a native OS grep with the results of the last list I could ..." would help me rework it to be more powerful).

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
1714944201
Hero Member
*
Offline Offline

Posts: 1714944201

View Profile Personal Message (Offline)

Ignore
1714944201
Reply with quote  #2

1714944201
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714944201
Hero Member
*
Offline Offline

Posts: 1714944201

View Profile Personal Message (Offline)

Ignore
1714944201
Reply with quote  #2

1714944201
Report to moderator
1714944201
Hero Member
*
Offline Offline

Posts: 1714944201

View Profile Personal Message (Offline)

Ignore
1714944201
Reply with quote  #2

1714944201
Report to moderator
jim618 (OP)
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



View Profile WWW
April 09, 2012, 01:32:12 PM
Last edit: April 09, 2012, 09:01:49 PM by jim618
#2

I have got MultiBitShell so that you can do the basic operation of:
1) List the wallets
2) Pick an active wallet
3) Display the picked/now active wallet

Code:
MB> list -wallet
MB:[8] Start list.
$Item | @Description            | Filename           
----- | ------------            | --------           
<1>   | blockchain plus wallet  | /Users/jim/real money/blockChain.wallet
2     | real petty cash         | /Users/jim/real money/pettyCash.wallet
3     | multibit.org donations  | /Users/jim/real money/multibitDonate/donations.wallet
4     | My test wallet          | /users/jim/test/test1.wallet
5     | Your wallet description | /users/jim/test/sunday1.wallet
6     | Your wallet description | /users/jim/test/sundayNight1.wallet
MB:[9] End list.
MB> pick $4
MB:[7] Picked wallet "My test wallet".
MB> list -wallet
MB:[8] Start list.
$Item | @Description            | Filename           
----- | ------------            | --------           
1     | blockchain plus wallet  | /Users/jim/real money/blockChain.wallet
2     | real petty cash         | /Users/jim/real money/pettyCash.wallet
3     | multibit.org donations  | /Users/jim/real money/multibitDonate/donations.wallet
<4>   | My test wallet          | /users/jim/test/test1.wallet
5     | Your wallet description | /users/jim/test/sunday1.wallet
6     | Your wallet description | /users/jim/test/sundayNight1.wallet
MB:[9] End list.
MB> pick @blockchain
MB:[7] Picked wallet "blockchain plus wallet".
MB> list -wallet
MB:[8] Start list.
$Item | @Description            | Filename           
----- | ------------            | --------           
<1>   | blockchain plus wallet  | /Users/jim/real money/blockChain.wallet
2     | real petty cash         | /Users/jim/real money/pettyCash.wallet
3     | multibit.org donations  | /Users/jim/real money/multibitDonate/donations.wallet
4     | My test wallet          | /users/jim/test/test1.wallet
5     | Your wallet description | /users/jim/test/sunday1.wallet
6     | Your wallet description | /users/jim/test/sundayNight1.wallet
MB:[9] End list.
MB> exit
MB:[1] MultiBitShell has stopped.

The currently picked item has an item number (just a count in the first column)  surrounded by a left bracket + right bracket.

You can pick from the list by either specifying an item number by using:
MB> pick $3
(to pick the third item in the list)

Or by entering a search term which searches the 'Description' column i.e.
MB> pick @My
will pick the wallet with description "My test wallet"

I have put in the column headers the $ and @ as a mnemonic to remind you which column is being selected by which symbol.

I propose using the same "list" -> "pick" metaphor for all the things that are collections (sending addreses, receiving addresses etc).

Edit: I have put in some message codes (the numbers in square brackets) to help machine readability.  You would probably filter out most of these for use by a real person.

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
jim618 (OP)
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



View Profile WWW
April 09, 2012, 10:59:44 PM
Last edit: April 10, 2012, 07:43:22 AM by jim618
#3

At the moment there is no network awareness to it.
It is just 'seeing' the local MultiBit installation files and wallets etc and reporting about those.

The simplicity of a command line interface means it would be relatively easy to talk machine to machine via SSH or similar.

As it is using the MultiBit format wallets and files etc it cannot talk to the Satoshi client (nor would I ever expect it to due to the differences in how practically everything is stored). When it is complete it will be to the MultiBit GUI what pywallet is to the Satoshi client.

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
jim618 (OP)
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



View Profile WWW
April 15, 2012, 04:38:57 PM
Last edit: April 16, 2012, 07:50:08 AM by jim618
#4

I have been thinking about a demonstrator for MultiBitShell.
Something hopefully not too difficult but shows what you could use it for.

The most interesting hack I can think of is:

1) Buy a HP50G graphing calculator (on order from Amazon : HP50G)
2) Get a terminal emulator running on the calculator (This: http://www.hpcalc.org/details.php?id=3316 looks like it will fit the bill and has source code)
3) Beef up the MultiBitShell jar so that it can run a terminal emulator over a serial line (I have not looked at this yet).

That would give me the ability to:
1) Connect up a HP50G calculator to my Mac via a USB or RS232 cable.
2) Run MultiBitShell via terminal emulation from the calculator to my Mac, accessing all the wallets/ BTC on my Mac from the calculator.

You could then send BTC and see BTC totals etc from the calculator. (The spends would be done by MultiBitShell on the Mac).

:-)

That would be "Phase 1".
"Phase 2" is highly speculative, but it would be great if you could have a private key on the *calculator* and use it to sign transactions *on the calculator*. You would then want to send them to the Mac via the terminal emulator for transmission to the bitcoin network.   The HP50G is a pretty sophisticated math calculator so it might be possible.

In a similar way to the miners repurposing graphics cards for mining, I am going to have a go at repurposing HP50G calculators as "hard wallets".

Good fun.   Any help on this undoubtedly zany idea is positively welcome!

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
jim618 (OP)
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



View Profile WWW
April 19, 2012, 08:44:40 AM
Last edit: April 19, 2012, 10:37:03 AM by jim618
#5

I got delivery of my HP50G yesterday.
It is pretty impressive how much math HP have packed into a graphing calc.  It is like having a baby Mathematica in your pocket.

For the multibit hack it looks promising. It has both kermit and xmodem servers built in and has a micro USB connection to talk to a PC.

Also, it can do unlimited precision integer arithmetic and there are a whole chunk of modulo arithmetic commands for signing. Also a random number generator for private key generation.

You have programmability for the screen and soft keys under it. I can probably create a reasonable UI but non touch obviously.

It feels doable.

That would (when complete) give a reference implementation for the creation of custom silicon bitcoin signing devices/ wallets. All of the communications protocol, signing inputs, outputs and algorithm would be specifed down to the byte level, which is what hardware engineers need.

It uses an ARM chip clocked at 75MHz so it sips power.

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
jim618 (OP)
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



View Profile WWW
April 19, 2012, 10:00:52 PM
#6

Using the Java serial library RXTX (http://rxtx.qbang.org/) I have managed to send a message from my Eclipse IDE on my Mac to the HP50g and received a message back.

I do not have a terminal program on the HP50g yet so I just talked to the built in XModem server.
Here is a log:

Code:
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
   log:  |found the following ports:|
   log:  |   /dev/ttyUSB0|

the following serial ports have been detected:
    1:  /dev/ttyUSB0
enter the id (1,2,...) of the connection to connect to:
1
   log:  |connection on /dev/ttyUSB0 established|

do you want this tool to send back all the received messages?
'y' for yes or 'n' for no:
n
type 'q' to end the example

enter a string to be sent ('q' to exit):
help
sent 104 over the serial port as [I@6ca1c
sent 101 over the serial port as [I@1bf216a
sent 108 over the serial port as [I@12ac982
sent 112 over the serial port as [I@1389e4
received the following message: 1, , , X, , &,
received the following message: 32, , , , M, B, –, *, , , , ;, Z, , d, t, e, r, m, , -, , , p, y, 
received the following message: 5, I, O, P, A, R, t, *, 8
received the following message: 128, 8, , , P, Y, T, H, A, G, –, *, Œ
received the following message: 79, , , B, 3, ), 
received the following message: 240, , }, , C, 3, ), 
received the following message: 240, c, , , E, Q, , *, 2
received the following message: 190, W
received the following message: 4, T, P, A, R, t, *, @
received the following message: 163, , , Z, P, A, R, t, *,
received the following message: 16, , , , Y, 1, , -, u
received the following message: 64, ~, -, , P, P, A, R, t, *, •
received the following message: 112, , Ÿ, , P, T, p, a, r, ˆ, +, N
received the following message: 32, , , , C, A, S, D, I, R, –, *, ˜, , `, D, , , P, R, I, M, I, T, , *,
received the following message: 241, e, , C, A, S, I, N, F, O, , +, , 
received the following message: 7, , , M, O, D, U, L, O, , &,
received the following message: 48, , ,
, R, E, A, L, A, S, S, U, M, E, t, *, 7
received the following message: 176, , , , P, E, R, I, O, D, , *, 
received the following message: 48, S, &, , V, X, H, .,
received the following message: 158, >, , E, P, S, 3, ), 
received the following message: 240, ,

enter a string to be sent ('q' to exit):
received the following message: 238, , , , X, , &,
received the following message: 32, , , , M, B, –, *, , , , ;, Z, , d, t, e, r, m, , -, , , p, y, 
received the following message: 5, I, O, P, A, R, t, *, 8
received the following message: 128, 8, , , P, Y, T, H, A, G, –, *, Œ
received the following message: 79, , , B, 3, ), 
received the following message: 240, , }, , C, 3, ), 
received the following message: 240, c, , , E, Q, , *, 2
received the following message: 190, W
received the following message: 4, T, P, A, R, t, *, @
received the following message: 163, , , Z, P, A, R, t, *,
received the following message: 16, , , , Y, 1, , -, u
received the following message: 64, ~, -, , P, P, A, R, t, *, •
received the following message: 112, , Ÿ, , P, T, p, a, r, ˆ, +, N
received the following message: 32, , , , C, A, S, D, I, R, –, *, ˜, , `, D, , , P, R, I, M, I, T, , *,
received the following message: 241, e, , C, A, S, I, N, F, O, , +, , 
received the following message: 7, , , M, O, D, U, L, O, , &,
received the following message: 48, , ,
, R, E, A, L, A, S, S, U, M, E, t, *, 7
received the following message: 176, , , , P, E, R, I, O, D, , *, 
received the following message: 48, S, &, , V, X, H, .,
received the following message: 158, >, , E, P, S, 3, ), 
received the following message: 240, ,
received the following message: 238, , , , X, , &,
received the following message: 32, , , , M, B, –, *, , , , ;, Z, , d, t, e, r, m, , -, , , p, y, 
received the following message: 5, I, O, P, A, R, t, *, 8
received the following message: 128, 8, , , P, Y, T, H, A, G, –, *, Œ
received the following message: 79, , , B, 3, ), 
received the following message: 240, , }, , C, 3, ), 
received the following message: 240, c, , , E, Q, , *, 2
received the following message: 190, W
received the following message: 4, T, P, A, R, t, *, @
received the following message: 163, , , Z, P, A, R, t, *,
received the following message: 16, , , , Y, 1, , -, u
received the following message: 64, ~, -, , P, P, A, R, t, *, •
received the following message: 112, , Ÿ, , P, T, p, a, r, ˆ, +, N
received the following message: 32, , , , C, A, S, D, I, R, –, *, ˜, , `, D, , , P, R, I, M, I, T, , *,
received the following message: 241, e, , C, A, S, I, N, F, O, , +, , 
received the following message: 7, , , M, O, D, U, L, O, , &,
received the following message: 48, , ,
, R, E, A, L, A, S, S, U, M, E, t, *, 7
received the following message: 176, , , , P, E, R, I, O, D, , *, 
received the following message: 48, S, &, , V, X, H, .,
received the following message: 158, >, , E, P, S, 3, ), 
received the following message: 240, ,
received the following message: 238, , , , X, , &,
received the following message: 32, , , , M, B, –, *, , , , ;, Z, , d, t, e, r, m, , -, , , p, y, 
received the following message: 5, I, O, P, A, R, t, *, 8
received the following message: 128, 8, , , P, Y, T, H, A, G, –, *, Œ
received the following message: 79, , , B, 3, ), 
received the following message: 240, , }, , C, 3, ), 
received the following message: 240, c, , , E, Q, , *, 2
received the following message: 190, W
received the following message: 4, T, P, A, R, t, *, @
received the following message: 163, , , Z, P, A, R, t, *,
received the following message: 16, , , , Y, 1, , -, u
received the following message: 64, ~, -, , P, P, A, R, t, *, •
received the following message: 112, , Ÿ, , P, T, p, a, r, ˆ, +, N
received the following message: 32, , , , C, A, S, D, I, R, –, *, ˜, , `, D, , , P, R, I, M, I, T, , *,
received the following message: 241, e, , C, A, S, I, N, F, O, , +, , 
received the following message: 7, , , M, O, D, U, L, O, , &,
received the following message: 48, , ,
, R, E, A, L, A, S, S, U, M, E, t, *, 7
received the following message: 176, , , , P, E, R, I, O, D, , *, 
received the following message: 48, S, &, , V, X, H, .,
received the following message: 158, >, , E, P, S, 3, ), 
received the following message: 240, ,
received the following message: 238, , , , X, , &,
received the following message: 32, , , , M, B, –, *, , , , ;, Z, , d, t, e, r, m, , -, , , p, y, 
received the following message: 5, I, O, P, A, R, t, *, 8
received the following message: 128, 8, , , P, Y, T, H, A, G, –, *, Œ
received the following message: 79, , , B, 3, ), 
received the following message: 240, , }, , C, 3, ), 
received the following message: 240, c, , , E, Q, , *, 2
received the following message: 190, W
received the following message: 4, T, P, A, R, t, *, @
received the following message: 163, , , Z, P, A, R, t, *,
received the following message: 16, , , , Y, 1, , -, u
received the following message: 64, ~, -, , P, P, A, R, t, *, •
received the following message: 112, , Ÿ, , P, T, p, a, r, ˆ, +, N
received the following message: 32, , , , C, A, S, D, I, R, –, *, ˜, , `, D, , , P, R, I, M, I, T, , *,
received the following message: 241, e, , C, A, S, I, N, F, O, , +, , 
received the following message: 7, , , M, O, D, U, L, O, , &,
received the following message: 48, , ,
, R, E, A, L, A, S, S, U, M, E, t, *, 7
received the following message: 176, , , , P, E, R, I, O, D, , *, 
received the following message: 48, S, &, , V, X, H, .,
received the following message: 158, >, , E, P, S, 3, ), 
received the following message: 240, ,
received the following message: 238, , , , X, , &,
received the following message: 32, , , , M, B, –, *, , , , ;, Z, , d, t, e, r, m, , -, , , p, y, 
received the following message: 5, I, O, P, A, R, t, *, 8
received the following message: 128, 8, , , P, Y, T, H, A, G, –, *, Œ
received the following message: 79, , , B, 3, ), 
received the following message: 240, , }, , C, 3, ), 
received the following message: 240, c, , , E, Q, , *, 2
received the following message: 190, W
received the following message: 4, T, P, A, R, t, *, @
received the following message: 163, , , Z, P, A, R, t, *,
received the following message: 16, , , , Y, 1, , -, u
received the following message: 64, ~, -, , P, P, A, R, t, *, •
received the following message: 112, , Ÿ, , P, T, p, a, r, ˆ, +, N
received the following message: 32, , , , C, A, S, D, I, R, –, *, ˜, , `, D, , , P, R, I, M, I, T, , *,
received the following message: 241, e, , C, A, S, I, N, F, O, , +, , 
received the following message: 7, , , M, O, D, U, L, O, , &,
received the following message: 48, , ,
, R, E, A, L, A, S, S, U, M, E, t, *, 7
received the following message: 176, , , , P, E, R, I, O, D, , *, 
received the following message: 48, S, &, , V, X, H, .,
received the following message: 158, >, , E, P, S, 3, ), 
received the following message: 240, ,
received the following message: 238, , , , X, , &,
received the following message: 32, , , , M, B, –, *, , , , ;, Z, , d, t, e, r, m, , -, , , p, y, 
received the following message: 5, I, O, P, A, R, t, *, 8
received the following message: 128, 8, , , P, Y, T, H, A, G, –, *, Œ
received the following message: 79, , , B, 3, ), 
received the following message: 240, , }, , C, 3, ), 
received the following message: 240, c, , , E, Q, , *, 2
received the following message: 190, W
received the following message: 4, T, P, A, R, t, *, @
received the following message: 163, , , Z, P, A, R, t, *,
received the following message: 16, , , , Y, 1, , -, u
received the following message: 64, ~, -, , P, P, A, R, t, *, •
received the following message: 112, , Ÿ, , P, T, p, a, r, ˆ, +, N
received the following message: 32, , , , C, A, S, D, I, R, –, *, ˜, , `, D, , , P, R, I, M, I, T, , *,
received the following message: 241, e, , C, A, S, I, N, F, O, , +, , 
received the following message: 7, , , M, O, D, U, L, O, , &,
received the following message: 48, , ,
, R, E, A, L, A, S, S, U, M, E, t, *, 7
received the following message: 176, , , , P, E, R, I, O, D, , *, 
received the following message: 48, S, &, , V, X, H, .,
received the following message: 158, >, , E, P, S, 3, ), 
received the following message: 240, ,
received the following message: 238, , , , X, , &,
received the following message: 32, , , , M, B, –, *, , , , ;, Z, , d, t, e, r, m, , -, , , p, y, 
received the following message: 5, I, O, P, A, R, t, *, 8
received the following message: 128, 8, , , P, Y, T, H, A, G, –, *, Œ
received the following message: 79, , , B, 3, ), 
received the following message: 240, , }, , C, 3, ), 
received the following message: 240, c, , , E, Q, , *, 2
received the following message: 190, W
received the following message: 4, T, P, A, R, t, *, @
received the following message: 163, , , Z, P, A, R, t, *,
received the following message: 16, , , , Y, 1, , -, u
received the following message: 64, ~, -, , P, P, A, R, t, *, •
received the following message: 112, , Ÿ, , P, T, p, a, r, ˆ, +, N
received the following message: 32, , , , C, A, S, D, I, R, –, *, ˜, , `, D, , , P, R, I, M, I, T, , *,
received the following message: 241, e, , C, A, S, I, N, F, O, , +, , 
received the following message: 7, , , M, O, D, U, L, O, , &,
received the following message: 48, , ,
, R, E, A, L, A, S, S, U, M, E, t, *, 7
received the following message: 176, , , , P, E, R, I, O, D, , *, 
received the following message: 48, S, &, , V, X, H, .,
received the following message: 158, >, , E, P, S, 3, ), 
received the following message: 240, ,
received the following message: 238, , , , X, , &,
received the following message: 32, , , , M, B, –, *, , , , ;, Z, , d, t, e, r, m, , -, , , p, y, 
received the following message: 5, I, O, P, A, R, t, *, 8
received the following message: 128, 8, , , P, Y, T, H, A, G, –, *, Œ
received the following message: 79, , , B, 3, ), 
received the following message: 240, , }, , C, 3, ), 
received the following message: 240, c, , , E, Q, , *, 2
received the following message: 190, W
received the following message: 4, T, P, A, R, t, *, @
received the following message: 163, , , Z, P, A, R, t, *,
received the following message: 16, , , , Y, 1, , -, u
received the following message: 64, ~, -, , P, P, A, R, t, *, •
received the following message: 112, , Ÿ, , P, T, p, a, r, ˆ, +, N
received the following message: 32, , , , C, A, S, D, I, R, –, *, ˜, , `, D, , , P, R, I, M, I, T, , *,
received the following message: 241, e, , C, A, S, I, N, F, O, , +, , 
received the following message: 7, , , M, O, D, U, L, O, , &,
received the following message: 48, , ,
, R, E, A, L, A, S, S, U, M, E, t, *, 7
received the following message: 176, , , , P, E, R, I, O, D, , *, 
received the following message: 48, S, &, , V, X, H, .,
received the following message: 158, >, , E, P, S, 3, ), 
received the following message: 240, ,
received the following message: 238, , , , X, , &,
received the following message: 32, , , , M, B, –, *, , , , ;, Z, , d, t, e, r, m, , -, , , p, y, 
received the following message: 5, I, O, P, A, R, t, *, 8
received the following message: 128, 8, , , P, Y, T, H, A, G, –, *, Œ
received the following message: 79, , , B, 3, ), 
received the following message: 240, , }, , C, 3, ), 
received the following message: 240, c, , , E, Q, , *, 2
received the following message: 190, W
received the following message: 4, T, P, A, R, t, *, @
received the following message: 163, , , Z, P, A, R, t, *,
received the following message: 16, , , , Y, 1, , -, u
received the following message: 64, ~, -, , P, P, A, R, t, *, •
received the following message: 112, , Ÿ, , P, T, p, a, r, ˆ, +, N
received the following message: 32, , , , C, A, S, D, I, R, –, *, ˜, , `, D, , , P, R, I, M, I, T, , *,
received the following message: 241, e, , C, A, S, I, N, F, O, , +, , 
received the following message: 7, , , M, O, D, U, L, O, , &,
received the following message: 48, , ,
, R, E, A, L, A, S, S, U, M, E, t, *, 7
received the following message: 176, , , , P, E, R, I, O, D, , *, 
received the following message: 48, S, &, , V, X, H, .,
received the following message: 158, >, , E, P, S, 3, ), 
received the following message: 240, ,
q
example terminated

Experimental:  JNI_OnLoad called.

It is actually a listing of the directory contents of the device but that is unimportant. The fact that they are talking is the thing.

I think I will do all my dev on an Ubuntu VM as the serial port access is much simpler than on a Mac.
Credit: I have used as a starting point code written by a Raphael Blatter (raphael@blatter.sg) Thanks !

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
jim618 (OP)
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



View Profile WWW
April 23, 2012, 06:38:08 PM
Last edit: April 23, 2012, 09:09:26 PM by jim618
#7

A bit of progress on the terminal program (PC and calculator communications).
They can now talk.

On the PC I typed: "hello calculator"
and on the calculator I typed: "hello computer"

Here is a log from the PC:

Code:
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
   log:  |found the following ports:|
   log:  |   /dev/ttyUSB0|

Using the following port:  /dev/ttyUSB0
   log:  |connection on /dev/ttyUSB0 established|

Type 'q' to quit.

Enter a string to be sent ('q' to quit):
hello calculator
Sent 104 over the serial port.
Sent 101 over the serial port.
Sent 108 over the serial port.
Sent 108 over the serial port.
Sent 111 over the serial port.
Sent 32 over the serial port.
Sent 99 over the serial port.
Sent 97 over the serial port.
Sent 108 over the serial port.
Sent 99 over the serial port.
Sent 117 over the serial port.
Sent 108 over the serial port.
Sent 97 over the serial port.
Sent 116 over the serial port.
Sent 111 over the serial port.
Sent 114 over the serial port.

Enter a string to be sent ('q' to quit):
hello computer

Edit: improved layout

And here is a screen shot of the calculator:


MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
Nachtwind
Hero Member
*****
Offline Offline

Activity: 700
Merit: 507



View Profile
April 23, 2012, 07:05:45 PM
#8

I really love MultiBit although i liked its older GUI more.. anyway.. is there a simple way of importing a Bitcoin (060) wallet (unencrypted) into Multibit?

*edit* One stupid question i didnt find an answer for: If i used the linux version - can i talk to it via RPC as with the normal client?
jim618 (OP)
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



View Profile WWW
April 23, 2012, 07:16:05 PM
#9

Hi Nachtwind,

RE: importing Satoshi wallets.
To my knowledge noone has done it yet.  It would be a matter of getting the private keys out and in a file with the format specified here:
https://github.com/jim618/multibit/wiki/Export%20and%20limited%20import%20of%20private%20keys

You only really need the a list of the keys (in sipa wallet import format) one per line.
(If you do not have the key creation dates it would have to do a full replay of the blocks - that takes about 2 hours on a wifi connection.)

I imagine it could be done with something like pywallet.

RE: your edit.   There is no RPC in the client no. That is one of the reasons I started the MultiBitShell work, to open up the access a bit.

Cheers,

Jim

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
Nachtwind
Hero Member
*****
Offline Offline

Activity: 700
Merit: 507



View Profile
April 23, 2012, 07:25:07 PM
#10

ok, thanks for the answers
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!