I should be fixing analog input this weekend, as well as cleaning up some of the digital output code so it works a lot smoother
Before I forget, I didn't mention that out of the box you can't write to the FB due to permissions restrictions. I chose to add a udev rule to change the owner to my non-root user I run my system as.
To do this you need to identify some distinguishing info about your device - the vendor id and product id should be sufficient and these are shown in the output of "lsusb" otherwise you can use udevadm if you want to get fancy.
Then just create a file /etc/udev/rules.d/50-fb.rules (any name you want as long as it starts with a number - which controls the order it is loaded - and ends in .rules). Inside it put
You'll want to change the "04d8", "000e" and "cgalpin" to suit your environment. The rule basically says if you match the device with this vendor id and product id, change the owner to cgalpin and set the permissions to 666.Code:SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="000e", OWNER="cgalpin", MODE="0666"
Then just unplug and re-plugin the FB and device permissions/owner will be changed if your rule is working.
hth
charles
running fbd as root also solves this issue. I'm kinda torn on the issue: fbd as root but use the system bus, fbd as user, use session bus, but add udev rule... Lose-lose situation
The one thing I haven't been able to test on the fbd is the analog input dbus signal. have you been able to test that?
Former author of LinuxICE, nghost.
Current author of nobdy.
In this application, running fbd as root is fine for sure and I would use it this way. And for Bugbyte he'll definitely want to keep it using the system bus as connecting to the session bus from apache/php opens up a whole can of worms that is not worth getting into if you can avoid it (permissions and X related).
But If you want to use Malcom's GUI or any other direct access as a non-root user you'll need the rule there too of course and this is why I forgot about it - I only needed this when first trying out the FB without dbus.
But in terms of setting up a system, this should be pretty easy to automate too if we want to make it easy for people to use this (a udev script that calls a slightly smarter script to determine the right user to give permissions, or just broaden the permissions a bit to a group the primary user should already be in, etc.)
I only got as far as trying to get an analog value and it segfaults at any attempt. I have not tried registering for any signals. I am not if it's a fbd or Fb issue. I plan on getting familiar with the code but don't expect to be able to spend too much time on this for the next few days.
I'll tell you I was a bit surprised to see the polling. Maybe I shouldn't have, but I kind of expected the FB to be doing the polling and expose the changes as signals to the outside world. Not sure what else the chip is doing with it's cyclesOn my crappy little carputer this polling takes a fair amount of cpu - as much as 10% shown by top, which worries me. And I am not sure why, but the php calls to dbus seem to take a lot of memory when I'd expect it to take little to none.
But really cool stuff - getting me excited enough to follow through on a lot of stuff I keep talking about doing but never do
I'd really like to help with this, even if just doing grunt work like developing tests, documenting it and making sample test programs in various languages, although I should be able to contribute more significantly than that if it's wanted.
charles
p.s. Sorry if I have butchered people's names. I think I called you Kevin at some point and know know it's Kevron. As you can tell I don't get into the whole clever naming scheme, and never know what to call people![]()
Awesome! Thanks for the help!
Okay, I tried to install phpmyadmin but I mistyped the root password and it failed. It said:
"ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).
unable to connect to mysql server.
error encountered creating user:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
dbconfig-common: phpmyadmin configure: trying again.
dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf
*** WARNING: ucf was run from a maintainer script that uses debconf, but
the script did not pass --debconf-ok to ucf. The maintainer
script should be fixed to not stop debconf before calling ucf,
and pass it this parameter. For now, ucf will revert to using
old-style, non-debconf prompting. Ugh!
Please inform the package maintainer about this problem.
Replacing config file /etc/phpmyadmin/config-db.php with new version
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).
unable to connect to mysql server.
error encountered creating user:
See, this is where my n00bness gets me in trouble. I tried reinstalling it but got:
Building dependency tree
Reading state information... Done
phpmyadmin is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
On a side note, issuing http://plugIP/phpinfo.php does give me back a page with all the info on it. I had created that when I installed php. However, phpmyadmin gives me a 404 error.
Also, on proftpd, I set it up as an inet server because it said it would use less resources, but now I get the following:
root@iPlug:~# sudo /etc/init.d/proftpd start
ProFTPd is started from inetd/xinetd.
root@iPlug:~# ftp localhost
-bash: ftp: command not found
Sorry for being such a pain. Don't worry, my Perl scripting book and my Linux for dummies book arrived yesterday and I've got about 4 more that deal with php and administering apache server on the way.
Want to:
-Find out about the new iBug iPad install?
-Find out about carPC's in just 5 minutes? View the Car PC 101 video
The fact that phpMyAdmin is in the package system is a great idea, but it's annoying in practice. All phpMyAdmin is is a set of php files. It doesn't need this "installation" bologna. Save yourself package management issues and go here:
http://www.phpmyadmin.net/home_page/index.php
download it, unarchive it and stick it in the root folder of your web directory. It has a configuration file in there too.
That site also has a bunch of documentation on it.
Your proftpd problems are not problems with proftpd. The problem is you don't have the ftp client installed on the the plug. See what apt-get turns up for apt-get install ftp. Otherwise, we'll need to talk about alternative FTP clients.
You can also go to the mac terminal and try to ftp from there to the plug.
My Nearly Complete Car:
http://www.mp3car.com/vbulletin/show...ed-car-pc.html
Micro Control Center... Control Your Car Across the Internet
http://www.mp3car.com/fusion-brain/1...-internet.html
Website: (It's a work in progress, really. All my projects have taken me from ever really developing it.)
http://paulfurtado.com/
Want to:
-Find out about the new iBug iPad install?
-Find out about carPC's in just 5 minutes? View the Car PC 101 video
ftp is split up in a server [ in your case proftpd] and a client [in your case ftp on the mac]
the d at the end of proftpd "suggests" that it's a daemon, or an application that runs in the back ground .. typically a server ... example: jabberd is the jabber messaging daemon[read server]
ftp is the client this connects to the server just like your web browser on your mac connects to the apache web server on your plug, ftp [from any comptuer with an ftp client on it] will connect to the ftp server [proftpd] on the plug!
so back to the SATS ftp:proftpd::firefox:apache2 [loosely]
Sounds like you got your ftp problem sorted out, great.
Regarding phpmyadmin, regardless of if you choose to re-install using the package, or install from a tar ball, you will want to do two things
1. Uninstall the package
2. Make sure you know your root password and can connect to mysql before reinstalling. You should be able to runCode:sudo apt-get remove phpmyadmin
And enter your password and get a "mysql>" prompt.Code:mysql -u root -p
Oh and if you don't think you need it, just do #1 and scrap it. I just figured you'd find it useful and it does confirm you have a working installation.
hth
charles
This is a very interesting idea. Would it be worth combining efforts and adding the results of this work into LinuxICE? Maybe a LinuxICE headless edition: doesn't have X, nGhost or any other graphical peices, just runs the services (wifi-proximity, fbd, obdgpslogger(d), apache, etc).
I think an awesome web interface to these services can be produced if done right: create a sf.net project, subversion code repo so multiple coders can hack on it all at once, packages for LinuxICE/Ubuntu, etc.
what say ye?
Former author of LinuxICE, nghost.
Current author of nobdy.
Bookmarks