Running on FreeBSD


Advanced search

Message boards : Number crunching : Running on FreeBSD

Author Message
Dmitry
Avatar
Send message
Joined: 27 Jul 12
Posts: 22
Credit: 271,107
RAC: 0

Message 1814 - Posted: 27 Jun 2013 | 21:08:45 UTC

Hi,

I've received the sensor recently. It works fine on windows, but I want to run it on FreeBSD as it is always on.

I use


naoko# uname -a
FreeBSD naoko.local 9.0-RELEASE FreeBSD 9.0-RELEASE #20: Tue Feb 28 22:52:39 MSK 2012 root@naoko.local:/usr/obj/usr/src/sys/NAOKO i386


with linux emulation port '/usr/ports/emulators/linux_base-f10/'

When I attach the sensor, the system finds it:
naoko# dmesg
...
uhid2: <microchip radioactiveathome.org GRS, class 0/0, rev 1.10/3.01, addr 2> on usbus1
...
naoko# usbconfig
...
ugen1.2: <radioactiveathome.org GRS microchip> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON


But when I get the workunit from radioactive@home the app radac_1.77_i686-pc-linux-gnu__nci can't find the sensor (stderr.txt):
Debug: num_samples: 30
get_sensor_list(): Position: 0 vid: 16c0 pid: 05df vendor obdev.at product DataStore
get_sensor_list(): Position: 1 vid: 16c0 pid: 05df vendor obdev.at product radioactiveathome.org GRS
get_sensor_list(): Position: 2 vid: 16c0 pid: 05df vendor obdev.at product radioactiveathome.org GRS
get_sensor_list(): Position: 3 vid: 16c0 pid: 05df vendor obdev.at product radioactiveathome.org GRS
get_sensor_list(): Position: 4 vid: 16c0 pid: 05df vendor obdev.at product radioactiveathome.org GRS
get_sensor_list(): Position: 5 vid: 04d8 pid: f6fe vendor microchip product radioactiveathome.org GRS
Debug: get_sensor_list(): exiting
Debug: enabled; sample time: 240, num_samples: 30
Radac $Rev: 585 $ starting...
Debug (openDevice): 16c0:05df obdev.at/DataStore not found or could not be accessed: The specified device was not found
Debug (openDevice): 16c0:05df obdev.at/radioactiveathome.org GRS not found or could not be accessed: The specified device was not found
Debug (openDevice): 16c0:05df obdev.at/radioactiveathome.org GRS not found or could not be accessed: The specified device was not found
Debug (openDevice): 16c0:05df obdev.at/radioactiveathome.org GRS not found or could not be accessed: The specified device was not found
Debug (openDevice): 16c0:05df obdev.at/radioactiveathome.org GRS not found or could not be accessed: The specified device was not found
Debug (openDevice): 04d8:f6fe microchip/radioactiveathome.org GRS not found or could not be accessed: The specified device was not found
Could not find any of the devices listed in sensors.xml: The specified device was not found



Does anyone know how to deal with it?
What is inside get_sensor_list? how does it work? what API is used to work with USB?


Regards, Dmitry.

Profile TJM
Project administrator
Project developer
Project tester
Send message
Joined: 16 Apr 11
Posts: 291
Credit: 1,368,721
RAC: 57

Message 1815 - Posted: 27 Jun 2013 | 21:27:52 UTC - in response to Message 1814.
Last modified: 27 Jun 2013 | 21:28:30 UTC

The sources of rev 1.77 are here: http://radioactiveathome.org/boinc/forum_thread.php?id=99 it uses libusb on Linux.

I think you might have permission problems. I have no idea how USB works on FreeBSD, on most Linux distros the sensor won't work without editing udev rules as only root gets access by default.

Dmitry
Avatar
Send message
Joined: 27 Jul 12
Posts: 22
Credit: 271,107
RAC: 0

Message 1817 - Posted: 28 Jun 2013 | 8:08:00 UTC - in response to Message 1815.

I didn't manage to find the exact cause of the problem. It seems that libusb that is included into linux emulator doesn't find the device requested (neither in unprivileged no in root mode)

As I don't have much spare time, I built the hidtool from the sources you'd mentioned (by doing so I linked it with libusb provided with FreeBSD). It works!

To be able to send results to the project I replaced the radac_1.77_i686-pc-linux-gnu__nci with my manually built executable.

(The sensor is found by the application only if it runs under root. I didn't have time to find out how to give rights of USB device access to other users, so for now I simply set sticky bit to the executable and changed the owner of it to root).

Do you know whether it is possible to make boinc to always use my compiled app instead of receiving it from the server?

As supporting FreeBSD separately is costly for you and I don't want to rebuild the app and do this ad-hoc installation each time the app is updated.

Profile TJM
Project administrator
Project developer
Project tester
Send message
Joined: 16 Apr 11
Posts: 291
Credit: 1,368,721
RAC: 57

Message 1818 - Posted: 28 Jun 2013 | 8:23:04 UTC - in response to Message 1817.

'Anonymous platform' solves the problem, as you can then replace the executables.

This is an example (for Windows) but you can easily tweak the app_info.xml.
http://www.enigmaathome.net/static/3486xtswfs/radioactiveathome.orgboinc.7z
You will need 3 files in the 'projects' folder: app_info.xml, executable and sensors.xml.


Dmitry
Avatar
Send message
Joined: 27 Jul 12
Posts: 22
Credit: 271,107
RAC: 0

Message 1819 - Posted: 28 Jun 2013 | 8:37:20 UTC - in response to Message 1818.

Thanks for the info!

I'll try it

Dmitry
Avatar
Send message
Joined: 27 Jul 12
Posts: 22
Credit: 271,107
RAC: 0

Message 1826 - Posted: 29 Jun 2013 | 6:49:20 UTC - in response to Message 1818.

It works!

Thanks!

If anyone needs the radac app compiled on FreeBSD 9.0 x86 I shared it here: http://home-server.redirectme.net:81/filestore/for_external/radac_1.77_i686-pc-freebsd.

Post to thread

Message boards : Number crunching : Running on FreeBSD


Main page · Your account · Message boards


Copyright © 2024 BOINC@Poland | Open Science for the future