QCN and BOINC for Raspberry Pi (Debian "Wheezy" Linux)

QCN and BOINC for Raspberry Pi (Debian "Wheezy" Linux)

log in

Advanced search

Questions and Answers : Unix/Linux : QCN and BOINC for Raspberry Pi (Debian "Wheezy" Linux)

1 · 2 · 3 · 4 . . . 5 · Next
Author Message
Profile Carl Christensen
Project administrator
Project developer
Project tester
Project scientist
Send message
Joined: 9 Jan 08
Posts: 1274
Credit: 11,147
RAC: 4
Message 4183 - Posted: 11 Aug 2012, 4:17:59 UTC
Last modified: 17 Aug 2012, 18:29:31 UTC


http://www.raspberrypi.org/faqs
I have BOINC & QCN running on a Raspberry Pi - it seems to run best with the BOINC for ARM running in a root account (for permissions to the USB sensors) as a higher priority process (this BOINC for ARM compiled has modifications to allow non-compute intensive tasks e.g. plan-class "nci" to run at a very high priority level). The BOINC & QCN are command-line only, ie no GUI BOINC Manager or OpenGL graphics.

I get an unfortunate but not horrible number of resets even when using the high priority, but it may turn out to be useful for earthquake monitoring (i.e. trigger monitoring but not 'round-the-clock' 24/7 monitoring due to the few resets per hour).

You can try by downloading and running BOINC (command-line client only e.g. no graphics/GUI):
BOINC for Raspberry Pi ARM "Wheezy" Debian Linux:

http://qcn.stanford.edu/sensor/download/boinc-armv6.zip

Or it may be easier to use a preconfigured SD Card image with boinc already setup so you just use "boinccmd" to attach to QCN as shown below:

1.2GB SD Card Image for Raspberry Pi (Debian Wheezy Linux, includes boinc installed & running as root)

http://qcn-upl.stanford.edu/carlc/web/qcn_boinc_raspi_8gb_sd_card.img.gz

gzip -d qcn_boinc_raspi_8gb_sd_card.img.gz

(expands to an 8GB image - so best to get an 8GB SD Card - Class 10 speed is best)

to burn sd card image, assuming your root SD card is at /dev/disk2:

sudo dd if=./qcn_boinc_raspi.img of=/dev/disk2 bs=1048576

Password for root account (& qcn account, where boinc is installed in ~/boinc) is 'qcnpi'

Note you need to unmount SD Card partition (but not eject SD card) in Disk Utility or:
sudo umount /dev/disk2s1

Otherwise you'll get "Disk Busy" messages

// my Raspberry Pi running on QCN to see the # of resets I encountered
http://qcn.stanford.edu/continual/show_host_detail.php?hostid=1034


to save your own SD card image:
sudo dd if=/dev/disk2 of=./qcn_boinc_raspberry_pi.img bs=1048576


To attach to QCN from commmand line:

sudo su

./boinccmd --project_attach http://qcn.stanford.edu/sensor ACCOUNT_KEY

where ACCOUNT_KEY is your BOINC QCN Account Key from here:

http://qcn.stanford.edu/sensor/home.php

also set your location on the page for this computer entry

http://qcn.stanford.edu/sensor/hosts_user.php

notes:
1) clock seems to be bad, but corrects with ntpdate as usual
2) onavi has the most trouble - probably usb troubles
3) still a lot of resets, made a custom boinc-arm that runs at high priority & root
4) need to run as root for phidgets and high priority
5) may be best to look into an accelerometer plug-in onto the RPi board
(i.e. bypass the USB interface which is the bottleneck)?

get root as "sudo su"

from /home/qcn/boinc run

./boinccmd to get various status updates or actions on BOINC & QCN e.g.

./boinccmd --get_messages

usage: boinccmd [--host hostname] [--passwd passwd] command

Commands:
--create_account URL email passwd name
--file_transfer URL filename op file transfer operation
op = retry | abort
--get_cc_status
--get_daily_xfer_history show network traffic history
--get_disk_usage show disk usage
--get_file_transfers show file transfers
--get_host_info
--get_message_count show largest message seqno
--get_messages [ seqno ] show messages > seqno
--get_notices [ seqno ] show notices > seqno
--get_project_config URL
--get_project_status show status of all attached projects
--get_proxy_settings
--get_simple_gui_info show status of projects and active tasks
--get_state show entire state
--get_tasks show tasks
--join_acct_mgr URL name passwd attach account manager
--lookup_account URL email passwd
--network_available retry deferred network communication
--project URL op project operation
op = reset | detach | update | suspend | resume | nomorework | allowmorework
--project_attach URL auth attach to project
--quit tell client to exit
--quit_acct_mgr quit current account manager
--read_cc_config
--read_global_prefs_override
--run_benchmarks
--set_debts URL1 std1 ltd1 [URL2 std2 ltd2 ...]
--set_gpu_mode mode duration set GPU run mode for given duration
mode = always | auto | never
--set_network_mode mode duration
--set_proxy_settings
--set_run_mode mode duration set run mode for given duration
mode = always | auto | never
--task url task_name op task operation
op = suspend | resume | abort
--version, -V show client version

Letraz
Send message
Joined: 2 Aug 11
Posts: 1
Credit: 16,807
RAC: 0
Message 4344 - Posted: 9 Nov 2012, 22:13:17 UTC - in response to Message 4183.

Hi Carl

I own a raspberry too now. I downloaded the image and could setup as you decribed. The only thing is I do not know my ACCOUNT-KEY. Is this the user-id (for the community functions) or the key to access the account (there are two, full access and resticted access)?

In the log I see this message:
"[Quake-Catcher Network] Invalid or missing account key.", but my raspberry is listed under my computers. Furthermore it had once contact to the project server but did not receive further tasks. Currently I received two tasks. One is "in progress" and the other is somehow interrupted. The command "./boinccmd --get_tasks" does not show any task...

Thanks for your help.

Regards,
Letraz

Les Bayliss
Volunteer moderator
Project tester
Send message
Joined: 27 Jan 12
Posts: 406
Credit: 48,834
RAC: 60
Message 4345 - Posted: 9 Nov 2012, 22:56:03 UTC - in response to Message 4344.

It's the key to access the account - Full access
It's also called the Authenticator in the xml file: account_qcn_stanford.edu_sensor.xml, which is in your BOINC folder.

antidumb
Send message
Joined: 16 Aug 12
Posts: 2
Credit: 271
RAC: 0
Message 4380 - Posted: 14 Dec 2012, 7:12:51 UTC

Hoping you (or anyone else) may be able to help me out. When I try to get this set up, everything seems fine, but in my QCN account, under sensor type, it reads "Not Found". I'm running it on the Pi, using your instructions, but I'm having no luck.

Thanks!

--Eric

Profile Carl Christensen
Project administrator
Project developer
Project tester
Project scientist
Send message
Joined: 9 Jan 08
Posts: 1274
Credit: 11,147
RAC: 4
Message 4381 - Posted: 14 Dec 2012, 8:47:05 UTC - in response to Message 4380.

what sensor do you have? The phidget seems to need to be run as root as that's how the libusb implementation they use want it -- the ONavi may require checking permissions for the device as well.

antidumb
Send message
Joined: 16 Aug 12
Posts: 2
Credit: 271
RAC: 0
Message 4385 - Posted: 15 Dec 2012, 3:45:04 UTC - in response to Message 4381.

I've got the o-navi.

Alessandro Freda
Send message
Joined: 19 Dec 08
Posts: 69
Credit: 319,178
RAC: 1,369
Message 4391 - Posted: 17 Dec 2012, 15:05:48 UTC - in response to Message 4183.

I've try a 512Mb Raspberry Pi, configure it for remote control from a PC windows with BoincView and attached QCN and Radioactive (without connect sensor so far) and have some question about raspbian for QCN:

1. why qcn-raspi image is >4Gb ?
2. top command output seems show only 256Mb RAM
3. why run BOINC as root ?
4. I don't know debian/raspbian so is there a default firewall active and configured ?
5. found a problem with Radioactive because of the nane of platform (armv6l-unknown-linux-gnueabihf):
http://radioactiveathome.org/boinc/forum_thread.php?id=154&nowrap=true#1520
have you a new updated qcn-raspi image ?

Regards,
Ale

Profile Carl Christensen
Project administrator
Project developer
Project tester
Project scientist
Send message
Joined: 9 Jan 08
Posts: 1274
Credit: 11,147
RAC: 4
Message 4395 - Posted: 18 Dec 2012, 4:55:13 UTC - in response to Message 4391.
Last modified: 18 Dec 2012, 4:55:22 UTC

I only had an 8GB SD card handy so the image is made from that. I have to run as root for the Phidget sensor as their libusb library requires that. Also it runs better as root as in the BOINC I made for ARM, I run QCN at highest priority otherwise you get a lot of "resets" as the USB hardware seems to be slow. The ONavi should be able to run in a BOINC user account but you have to fiddle with the permissions to allow the lower-priority-security.

Alessandro Freda
Send message
Joined: 19 Dec 08
Posts: 69
Credit: 319,178
RAC: 1,369
Message 4405 - Posted: 2 Jan 2013, 0:10:58 UTC - in response to Message 4395.

I only had an 8GB SD card handy so the image is made from that. I have to run as root for the Phidget sensor as their libusb library requires that. Also it runs better as root as in the BOINC I made for ARM, I run QCN at highest priority otherwise you get a lot of "resets" as the USB hardware seems to be slow. The ONavi should be able to run in a BOINC user account but you have to fiddle with the permissions to allow the lower-priority-security.

I'm tring QCN on this raspi-host so far:
http://qcn.stanford.edu/sensor/show_host_detail.php?hostid=25326

I've used the last standard raspbian image + your arm-boinc 7.1.0 on a JW 24F8 sensor. I'm also used the standard 'pi' used simply coping the boinc 7.1.0 files and start BOINC with a "multiplatform" trick:

pi@raspberrypi ~ $ crontab -l @reboot cd /home/pi/BOINC; ./boinc > /dev/null 2> /dev/null

I've see a weird behavior, after the attach (from "top") the qcn client use 50 / 80% CPU, after a reboot stay at 2.3%

Without GUI how can be sure that exists a true data flow from the JW ?

BTW the resets seems != 0, so how can I rise the priority under raspbian ?

Profile Carl Christensen
Project administrator
Project developer
Project tester
Project scientist
Send message
Joined: 9 Jan 08
Posts: 1274
Credit: 11,147
RAC: 4
Message 4406 - Posted: 2 Jan 2013, 17:34:35 UTC - in response to Message 4405.

if you run it as root then the boinc version I created will be able to increase the thread priority and lower the # of resets.

Alessandro Freda
Send message
Joined: 19 Dec 08
Posts: 69
Credit: 319,178
RAC: 1,369
Message 4407 - Posted: 3 Jan 2013, 10:14:21 UTC - in response to Message 4406.

if you run it as root then the boinc version I created will be able to increase the thread priority and lower the # of resets.

I'll try, btw seems that after disconnect all ssh (ping 83602321) reset counter has stopped.

Profile Carl Christensen
Project administrator
Project developer
Project tester
Project scientist
Send message
Joined: 9 Jan 08
Posts: 1274
Credit: 11,147
RAC: 4
Message 4409 - Posted: 3 Jan 2013, 15:54:33 UTC - in response to Message 4407.

OK, the Pi seems to be a bit sluggish for QCN, I think due to their cheap USB hardware and has trouble at 50Hz - I had better luck with other devices like the Guru/ShivaPlug. I hope a future RPi will have a little bit better, or maybe we can design an accelerometer plug-in board for direct fast access (bypassing the USB bus), as something like the RPi would be great for getting a lot of cheap QCN stations out there!

Jim MacDonald
Send message
Joined: 3 Jul 10
Posts: 2
Credit: 0
RAC: 0
Message 4412 - Posted: 6 Jan 2013, 7:29:43 UTC

It's not that the clock is bad, Raspberry Pi's don't have a clock by design, so the must be connected to a network and get Nto hacks from somewhere see:


http://www.raspberrypi.org/faqs

Alessandro Freda
Send message
Joined: 19 Dec 08
Posts: 69
Credit: 319,178
RAC: 1,369
Message 4415 - Posted: 7 Jan 2013, 14:33:19 UTC - in response to Message 4409.

OK, the Pi seems to be a bit sluggish for QCN, I think due to their cheap USB hardware and has trouble at 50Hz

Notice that I must yet switch to user root the BOINC directory.
So, the very few reset, you can see now on the host 25326 are at normal priority.
Sorry, I'll try to rise the priority asap.


Alessandro Freda
Send message
Joined: 19 Dec 08
Posts: 69
Credit: 319,178
RAC: 1,369
Message 4416 - Posted: 7 Jan 2013, 15:03:49 UTC - in response to Message 4412.
Last modified: 7 Jan 2013, 15:07:24 UTC

It's not that the clock is bad, Raspberry Pi's don't have a clock by design, so the must be connected to a network and get Nto hacks from somewhere see:


http://www.raspberrypi.org/faqs

The "50Hz" problem concern all slow platform (also x86) that are unable to read samples at 50 times per sec from USB because the relative slowness of the CPU (combined with a non real-time kernel). Not the lack of a RTC on raspberry. QCN use a custom NTP client, BTW my Raspberry using his standard NTP client show to be well synchronized, only the first ping after a reboot show "bad" offset values (es: 83586865), because BOINC and QCN ping start before raspbian NTP service reach to sync the clock.

Alessandro Freda
Send message
Joined: 19 Dec 08
Posts: 69
Credit: 319,178
RAC: 1,369
Message 4417 - Posted: 7 Jan 2013, 16:06:30 UTC - in response to Message 4409.

OK, the Pi seems to be a bit sluggish for QCN, I think due to their cheap USB hardware and has trouble at 50Hz - I had better luck with other devices like the Guru/ShivaPlug. I hope a future RPi will have a little bit better, or maybe we can design an accelerometer plug-in board for direct fast access (bypassing the USB bus), as something like the RPi would be great for getting a lot of cheap QCN stations out there!

Over the priority change there are 2 others attempts that not require HW mods:

1. raspi OC (from 700MHz to 800, 900, or 1GHz)

2. since my raspi is dedicated to BOINC sensors, try to use a RT kernel (if exists for debian or raspbian) and schedule QCN client as a real-time process,

the 2nd probably require also mods to QCN client (for example in order to split a thread for USB data read)


Profile Carl Christensen
Project administrator
Project developer
Project tester
Project scientist
Send message
Joined: 9 Jan 08
Posts: 1274
Credit: 11,147
RAC: 4
Message 4418 - Posted: 7 Jan 2013, 18:37:41 UTC - in response to Message 4415.
Last modified: 7 Jan 2013, 19:51:29 UTC

in the boinc client I made for RaspPi it will bump up QCN app to "real time priority" - this has to be done on the BOINC side as it will force the default of "idle priority" (i.e. as normal BOINC client). I'm glad you have it working, I think this may be great for the future of QCN.

Jim MacDonald
Send message
Joined: 3 Jul 10
Posts: 2
Credit: 0
RAC: 0
Message 4448 - Posted: 19 Jan 2013, 16:15:54 UTC - in response to Message 4409.

OK, the Pi seems to be a bit sluggish for QCN!



So lemme ask you another question about this, did you have the sensor pluged straight into the Pi? Wher you using a USB? If so, Was it powered? Or did it drew power from the Pi ?
____________

Profile Carl Christensen
Project administrator
Project developer
Project tester
Project scientist
Send message
Joined: 9 Jan 08
Posts: 1274
Credit: 11,147
RAC: 4
Message 4449 - Posted: 19 Jan 2013, 16:20:21 UTC - in response to Message 4448.

yeah, the Pi is setup for the JoyWarrior, ONavi, and Phidgets 1056 USB sensors. I think it would be best to have an accelerometer on a board that plugs in to the Pi ie bypassing their sluggish USB.

Jim MacDonald
Avatar
Send message
Joined: 28 Sep 08
Posts: 8
Credit: 12,558
RAC: 0
Message 4450 - Posted: 19 Jan 2013, 23:17:20 UTC - in response to Message 4448.

but did you use a powered USB hub or plug straight in? if you plugged straight in to the Pi you are drawing power from the Pi and possibly causing a brown out the Pi. Try it with a powered USB hub

1 · 2 · 3 · 4 . . . 5 · Next

Questions and Answers : Unix/Linux : QCN and BOINC for Raspberry Pi (Debian "Wheezy" Linux)


Return to Quake-Catcher Network Sensor Monitoring main page


Copyright © 2016 CalTech