Bitcoin Forum
September 24, 2016, 08:49:00 PM *
News: Latest stable version of Bitcoin Core: 0.13.0 (New!) [Torrent]. Make sure you verify it.
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 »  All
  Print  
Author Topic: bitcoind running on the N900 smartphone  (Read 9925 times)
doublec
Legendary
*
Offline Offline

Activity: 1078


View Profile
December 07, 2010, 05:47:53 AM
 #1

I got bitcoind running on the N900. It wasn't too hard. I had to build the right versions of libdb and libboost and make one minor change to util.cpp. The ParseHex function in util.cpp has code like:

Code:
if (c == -1)


'c' is a 'char' type which is unsigned so this comparison never does what's expected. Changing both instances of this to the following gets a working bitcoind:

Code:
if (c == (char)-1)

Where 'working' means it's currently downloading the block chain. I  haven't extensively tested it yet. Binary here if anyone wants to risk it:

http://bluishcoder.co.nz/bitcoin-pool/bitcoind.gz

gunzip it and run it from the terminal. The standard RPC commands will work with it running.

Update: 2010-02-04: The changes to ParseHex are no longer needed as they're part of the bitcoin source now. An updated build for the N900 is available here:

http://www.bluishcoder.co.nz/bitcoin-pool/bitcoind-b1a657.gz

This is built from github commit b1a657.
1474750140
Hero Member
*
Offline Offline

Posts: 1474750140

View Profile Personal Message (Offline)

Ignore
1474750140
Reply with quote  #2

1474750140
Report to moderator
1474750140
Hero Member
*
Offline Offline

Posts: 1474750140

View Profile Personal Message (Offline)

Ignore
1474750140
Reply with quote  #2

1474750140
Report to moderator
1474750140
Hero Member
*
Offline Offline

Posts: 1474750140

View Profile Personal Message (Offline)

Ignore
1474750140
Reply with quote  #2

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

Posts: 1474750140

View Profile Personal Message (Offline)

Ignore
1474750140
Reply with quote  #2

1474750140
Report to moderator
1474750140
Hero Member
*
Offline Offline

Posts: 1474750140

View Profile Personal Message (Offline)

Ignore
1474750140
Reply with quote  #2

1474750140
Report to moderator
1474750140
Hero Member
*
Offline Offline

Posts: 1474750140

View Profile Personal Message (Offline)

Ignore
1474750140
Reply with quote  #2

1474750140
Report to moderator
Anonymous
Guest

December 07, 2010, 05:57:20 AM
 #2

I got bitcoind running on the N900. It wasn't too hard. I had to build the right versions of libdb and libboost and make one minor change to util.cpp. The ParseHex function in util.cpp has code like:

Code:
if (c == -1)


'c' is a 'char' type which is unsigned so this comparison never does what's expected. Changing both instances of this to the following gets a working bitcoind:

Code:
if (c == (char)-1)

Where 'working' means it's currently downloading the block chain. I  haven't extensively tested it yet. Binary here if anyone wants to risk it:

http://bluishcoder.co.nz/bitcoin-pool/bitcoind.gz

gunzip it and run it from the terminal. The standard RPC commands will work with it running.

Should attach it to the pooled mining effort Smiley
ribuck
Donator
Legendary
*
Offline Offline

Activity: 826


View Profile
December 07, 2010, 01:30:25 PM
 #3

This is so cool. I've installed it on my N900 and am up to block 2000. I wonder what the khash/s will be - my guess is 50 khash/s.

Let me know your bitcoin receiving address, and we can make the first p2p (phone-to-phone) transaction.
doublec
Legendary
*
Offline Offline

Activity: 1078


View Profile
December 07, 2010, 11:38:34 PM
 #4

This is so cool. I've installed it on my N900 and am up to block 2000. I wonder what the khash/s will be - my guess is 50 khash/s.

Let me know your bitcoin receiving address, and we can make the first p2p (phone-to-phone) transaction.

I created 18T1jQ9QT1fsDJ7q8YKBGhdM56iYt4sXoV on my phone. I'm interested in what the battery hit is like for running it full time. It did take a *long* time to get the block chain. I get between 130 and 150 khash/s when I did a short generation test run.
MoonShadow
Legendary
*
Offline Offline

Activity: 1666



View Profile
December 07, 2010, 11:42:58 PM
 #5

This is awesome.  The battery life has to suck though.  Can you get terminal access to the daemon on the smartphone, or something along the lines of ncurses?  If the generation is disabled, and a frontend could be thrown together, this would likely satisfy the bounty for a standalone smartphone client.

"The powers of financial capitalism had another far-reaching aim, nothing less than to create a world system of financial control in private hands able to dominate the political system of each country and the economy of the world as a whole. This system was to be controlled in a feudalist fashion by the central banks of the world acting in concert, by secret agreements arrived at in frequent meetings and conferences. The apex of the systems was to be the Bank for International Settlements in Basel, Switzerland, a private bank owned and controlled by the world's central banks which were themselves private corporations. Each central bank...sought to dominate its government by its ability to control Treasury loans, to manipulate foreign exchanges, to influence the level of economic activity in the country, and to influence cooperative politicians by subsequent economic rewards in the business world."

- Carroll Quigley, CFR member, mentor to Bill Clinton, from 'Tragedy And Hope'
doublec
Legendary
*
Offline Offline

Activity: 1078


View Profile
December 08, 2010, 12:26:17 AM
 #6

This is awesome.  The battery life has to suck though.  Can you get terminal access to the daemon on the smartphone, or something along the lines of ncurses?  If the generation is disabled, and a frontend could be thrown together, this would likely satisfy the bounty for a standalone smartphone client.

I'm hoping the battery life for just running the client (ie. not generating) won't be too bad. I run skype constantly to receive calls via a skype number and gtalk most of the time. They require a constant connection and I get a days usage out of the phone.

I use the built in XTerm to get terminal access and run bitcoind manually to do stuff. A JSON-RPC frontend for it wouldn't be too difficult - assuming the bitcoind RPC interface exposes enough information.
grondilu
Legendary
*
Offline Offline

Activity: 1134


View Profile
December 08, 2010, 12:40:53 AM
 #7

I own a n900 too so I might think it's cool to have bitcoin running on it.

An yet, I doubt it will be useful.  Especialy since I don't store any personnal data on my phone (except for backup after encryption).

I mean, the n900 is awesome but anyone who gets his hands on it could see all my personnal data.  :/

I don't know how you guys cope with that, but personnaly I can't.
doublec
Legendary
*
Offline Offline

Activity: 1078


View Profile
December 08, 2010, 12:43:35 AM
 #8

I don't know how you guys cope with that, but honnestly I can't.

The same way I deal with it on my laptop. Encrypted filesystem.
doublec
Legendary
*
Offline Offline

Activity: 1078


View Profile
December 08, 2010, 09:13:54 AM
 #9

I'm hoping the battery life for just running the client (ie. not generating) won't be too bad

I've been running bitcoind all day on the N900 and the battery hit has been minimal. There seems to be little overhead if I'm already running the IM protocols (Skype, GTalk, etc).
Anonymous
Guest

December 08, 2010, 09:22:44 AM
 #10

*owns an iphone  Embarrassed
dsg
Jr. Member
*
Offline Offline

Activity: 37


View Profile
December 08, 2010, 10:16:02 AM
 #11

This is awesome.  The battery life has to suck though.  Can you get terminal access to the daemon on the smartphone, or something along the lines of ncurses?  If the generation is disabled, and a frontend could be thrown together, this would likely satisfy the bounty for a standalone smartphone client.

I'm hoping the battery life for just running the client (ie. not generating) won't be too bad. I run skype constantly to receive calls via a skype number and gtalk most of the time. They require a constant connection and I get a days usage out of the phone.

I use the built in XTerm to get terminal access and run bitcoind manually to do stuff. A JSON-RPC frontend for it wouldn't be too difficult - assuming the bitcoind RPC interface exposes enough information.

You can encrypt your filesystem just like any other linux machine, it's what I do. Just compile a new kernel with DM_CRYPT and such, install cryptsetup from extras-devel and make a small boot script in /etc/event.d/.

Encrypted /home and /home/user/MyDocs from SD card FTW Smiley

btw, nice work getting bitcoind going. I don't think I'd run it on my n900 though (I have a trusted machine and an active VPN from my phone so I don't need to burn battery), but I've been tempted to write a n900 GUI that talks to the JSON-RPC interface. Maybe when I have some more time.
ribuck
Donator
Legendary
*
Offline Offline

Activity: 826


View Profile
December 08, 2010, 11:16:52 AM
 #12

I created 18T1jQ9QT1fsDJ7q8YKBGhdM56iYt4sXoV on my phone.

I sent 0.42 BTC from my N900 at 10.55 GMT. If you receive it, that's the first ph2ph bitcoin transfer!

Doublec's bitcoind seems to work perfectly. It took me ten hours to get the block chain. I had the phone plugged in to USB all that time, and occasionally a warning flashed up saying that the phone was using more power than the USB was supplying. But now that the block chain is up to date it's fine, even with generating. I think writing the block chain to flash memory was pushing the power consumption up.

Like doublec's phone, mine hashes at between 130 and 150 khash/s. The predicted "average time to generate a block" is 2869 days at the current difficulty level of 8078. That's almost 8 years, so I'm not holding my breath. However, if we had 2869 people generating on phones, someone would generate a block on their phone every day, so it's possible that a block will be generated on someone's phone one day.

For those who don't know the N900, it runs a reasonably standard Linux with root access. The shell is "ash" which is basically a cut-down bash. The utilities are mostly cut-down versions from the BusyBox project, so for example you have to use "more" rather than "less", and the commands don't have so many options, but it's not a big limitation.

Programming for the N900 is generally done in C++ on a Linux PC using a cross-compiler. GUIs are GTK+ or Qt. Masochists have even managed to install gcc on the phone and do their development on-device. The phone comes with Python, and you can install PyQt which provides a straightforward way to develop GUI apps on-device. The phone comes with 32GB onboard, and you can add another 32GB using the microSD socket, so there's plenty of space to develop stuff.
ribuck
Donator
Legendary
*
Offline Offline

Activity: 826


View Profile
December 08, 2010, 11:19:00 AM
 #13

I mean, the n900 is awesome but anyone who gets his hands on it could see all my personnal data.  :/

If I put 100 bitcoins on my phone, I don't regard that as personal data. If my phone gets lost or stolen, the value of the phone is much greater than the value of the bitcoins it holds.
doublec
Legendary
*
Offline Offline

Activity: 1078


View Profile
December 08, 2010, 11:27:07 AM
 #14

I sent 0.42 BTC from my N900 at 10.55 GMT. If you receive it, that's the first ph2ph bitcoin transfer!

Successfully received on my phone, thanks!

I think you're right about the writing of the block chain to flash memory. There's also the debug log which is very chatty. See ~/.bitcoin/debug.log. We'd probably want to turn that off on the phone.

em3rgentOrdr
Sr. Member
****
Offline Offline

Activity: 434


youtube.com/ericfontainejazz now accepts bitcoin


View Profile WWW
December 08, 2010, 11:32:57 AM
 #15

I sent 0.42 BTC from my N900 at 10.55 GMT. If you receive it, that's the first ph2ph bitcoin transfer!

Successfully received on my phone, thanks!


Awesome!!!  Cheesy

"We will not find a solution to political problems in cryptography, but we can win a major battle in the arms race and gain a new territory of freedom for several years.

Governments are good at cutting off the heads of a centrally controlled networks, but pure P2P networks are holding their own."
doublec
Legendary
*
Offline Offline

Activity: 1078


View Profile
December 08, 2010, 11:34:13 AM
 #16

If you use the 'Desktop Command Execution' widget you can execute bitcoind RPC commands and have the result displayed on the desktop in a widget. So I have my current balance in a widget on the desktop on my phone.
Anonymous
Guest

December 08, 2010, 11:38:34 AM
 #17

I sent .61 btc to your phone because this is pretty cool. Im on a laptop does that count as a mobile device?

Its also cheaper than a text message   Cheesy

Now if starbucks publishes a bitcoin address you can buy a coffee . Does the n900 have copy and paste? Tongue

doublec
Legendary
*
Offline Offline

Activity: 1078


View Profile
December 08, 2010, 12:26:17 PM
 #18

I sent .61 btc to your phone because this is pretty cool. Im on a laptop does that count as a mobile device?

Its also cheaper than a text message   Cheesy

Now if starbucks publishes a bitcoin address you can buy a coffee . Does the n900 have copy and paste? Tongue

I received the .61 on the N900, thanks! Yes, the N900 does have copy and paste although it can be a pain to get exactly the right area to copy in the browser. I need a good way of getting addresses onto the phone. So if I see an address on a web page, or printed out, how to get this on the phone easily so I can send to it. Barcodes were discussed in the android thread so that's a possibility I guess.
ribuck
Donator
Legendary
*
Offline Offline

Activity: 826


View Profile
December 08, 2010, 12:39:22 PM
 #19

Yes, the N900 does have copy and paste although it can be a pain to get exactly the right area to copy in the browser. I need a good way of getting addresses onto the phone.

I'm surprised to hear you say that.

To send the bitcoin to you, I just browsed your forum post on my phone, double-tapped on your bitcoin address to select it, pressed control-C on the keyboard to copy it, then used the "Paste" menu option in XTerminal. Not at all painful!

I have found though, that bitcoin addresses in Gmail have a nonbreaking space added after the 16th character. To copy those cleanly, click "show original" in Gmail and copy from the raw message text.
doublec
Legendary
*
Offline Offline

Activity: 1078


View Profile
December 08, 2010, 02:57:13 PM
 #20

To send the bitcoin to you, I just browsed your forum post on my phone, double-tapped on your bitcoin address to select it, pressed control-C on the keyboard to copy it, then used the "Paste" menu option in XTerminal. Not at all painful!

Ah, I didn't realise double tapping the address would select it. I was using the swype from left to right gesture, clicking the mouse pointer that appears, click and dragging the selection area then control-C, etc. The double-tap is much faster.
Pages: [1] 2 3 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!