<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for iP Solutions</title>
	<atom:link href="http://test2.ipsolutionscorp.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://test2.ipsolutionscorp.com</link>
	<description>The technical leverage you need to get the results you want</description>
	<lastBuildDate>Thu, 16 May 2013 23:36:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
	<item>
		<title>Comment on SPI Command-line Utility for Raspberry Pi by Gary Marks</title>
		<link>http://test2.ipsolutionscorp.com/raspberry-pi-spi-utility/#comment-33</link>
		<dc:creator>Gary Marks</dc:creator>
		<pubDate>Thu, 16 May 2013 23:36:33 +0000</pubDate>
		<guid isPermaLink="false">http://test2.ipsolutionscorp.com/?p=138#comment-33</guid>
		<description><![CDATA[Bill, I have not used &quot;wiringPi&quot;, but I checked it out.  There are a couple of points made by the creator, which speak to the issue:
1. &quot;The gpio command is designed to be installed as a setuid program and called by a normal user without using the sudo command (or logging in as root).&quot;
2. The gpio utility supports GPIO exports to /sys/class/gpio.

The first technique (setuid) can just as easily be done with spincl.  Simply use chmod to set the bit:  
chmod +s /path/spincl.  
Or edit the &quot;install&quot; target in the Makefile to set the permissions as 4755 instead of 755:  
sudo chmod 4755 /opt/bin/spincl.  
I should point out that using setuid is consistent with my point about root privileges.  In other words, because spincl is owned by root and the setuid bit transfers the owner&#039;s privileges to the process that is executing spincl, then that user has root privileges for that process.

The second technique (/sys/class/gpio) is an embedded Linux method of transferring GPIO resources from kernel space to user space.  I don&#039;t know if there is any equivalent for SPI.  

If you need users other than root to use spincl (I would be cautious about this), then your best bet is to set the &#039;s&#039; bit (technique 1 above).]]></description>
		<content:encoded><![CDATA[<p>Bill, I have not used “wiringPi”, but I checked it out.  There are a couple of points made by the creator, which speak to the issue:<br />
1. “The gpio command is designed to be installed as a setuid program and called by a normal user without using the sudo command (or logging in as root).“<br />
2. The gpio utility supports GPIO exports to /sys/class/gpio.</p>
<p>The first technique (setuid) can just as easily be done with spincl.  Simply use chmod to set the bit:<br />
chmod +s /path/spincl.<br />
Or edit the “install” target in the Makefile to set the permissions as 4755 instead of 755:<br />
sudo chmod 4755 /opt/bin/spincl.<br />
I should point out that using setuid is consistent with my point about root privileges.  In other words, because spincl is owned by root and the setuid bit transfers the owner’s privileges to the process that is executing spincl, then that user has root privileges for that process.</p>
<p>The second technique (/sys/class/gpio) is an embedded Linux method of transferring GPIO resources from kernel space to user space.  I don’t know if there is any equivalent for SPI.  </p>
<p>If you need users other than root to use spincl (I would be cautious about this), then your best bet is to set the ‘s’ bit (technique 1 above).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on SPI Command-line Utility for Raspberry Pi by Bill</title>
		<link>http://test2.ipsolutionscorp.com/raspberry-pi-spi-utility/#comment-28</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Thu, 16 May 2013 00:55:40 +0000</pubDate>
		<guid isPermaLink="false">http://test2.ipsolutionscorp.com/?p=138#comment-28</guid>
		<description><![CDATA[Thank you Gary for explain to me in detail. I&#039;m a newbie to embedded Linux, and doesn&#039;t have much experience to device driver or peripheral control programming. I could fully understand your explanation. I just feel curious that the utility &quot;gpio&quot; coming with &quot;wiringPi&quot; doesn&#039;t require me to &quot;sudo&quot; first, and I think maybe this useful utility could have such feature. Anyway, thank you for your great job! :)]]></description>
		<content:encoded><![CDATA[<p>Thank you Gary for explain to me in detail. I’m a newbie to embedded Linux, and doesn’t have much experience to device driver or peripheral control programming. I could fully understand your explanation. I just feel curious that the utility “gpio” coming with “wiringPi” doesn’t require me to “sudo” first, and I think maybe this useful utility could have such feature. Anyway, thank you for your great job! <img src='http://test2.ipsolutionscorp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on SPI Command-line Utility for Raspberry Pi by Gary Marks</title>
		<link>http://test2.ipsolutionscorp.com/raspberry-pi-spi-utility/#comment-25</link>
		<dc:creator>Gary Marks</dc:creator>
		<pubDate>Wed, 15 May 2013 18:45:05 +0000</pubDate>
		<guid isPermaLink="false">http://test2.ipsolutionscorp.com/?p=138#comment-25</guid>
		<description><![CDATA[Thank you Bill for your question.  I had not considered the option of running the utility without root privilege because generally an embedded application that needs to access kernel resources needs to have root privilege.  In this case, the SPI core on the bcm2835 chip is programmed by it&#039;s registers that are memory mapped with very specific hardware addresses, which can only be accessed by kernel (device driver) code.  The driver in this case is /dev/mem.

You might be able to create a &quot;work-around&quot; for this, but it would go against the &quot;Linux privilege model&quot;.  I should also say that most embedded applications run as root.  That&#039;s not to say that there isn&#039;t a role for user&#039;s with non-root privilege on embedded systems.  For example, I have a user (developer) on my primary Raspberry Pi development system that owns all the source code, etc.  Also, you might want users with different levels of access to various types of data/information, etc.

I hope this was useful.]]></description>
		<content:encoded><![CDATA[<p>Thank you Bill for your question.  I had not considered the option of running the utility without root privilege because generally an embedded application that needs to access kernel resources needs to have root privilege.  In this case, the SPI core on the bcm2835 chip is programmed by it’s registers that are memory mapped with very specific hardware addresses, which can only be accessed by kernel (device driver) code.  The driver in this case is /dev/mem.</p>
<p>You might be able to create a “work-around” for this, but it would go against the “Linux privilege model”.  I should also say that most embedded applications run as root.  That’s not to say that there isn’t a role for user’s with non-root privilege on embedded systems.  For example, I have a user (developer) on my primary Raspberry Pi development system that owns all the source code, etc.  Also, you might want users with different levels of access to various types of data/information, etc.</p>
<p>I hope this was useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on SPI Command-line Utility for Raspberry Pi by Bill</title>
		<link>http://test2.ipsolutionscorp.com/raspberry-pi-spi-utility/#comment-24</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Wed, 15 May 2013 14:01:28 +0000</pubDate>
		<guid isPermaLink="false">http://test2.ipsolutionscorp.com/?p=138#comment-24</guid>
		<description><![CDATA[Thank you for this useful utility! Do you have plan to improve this utility to run it without root privilege?]]></description>
		<content:encoded><![CDATA[<p>Thank you for this useful utility! Do you have plan to improve this utility to run it without root privilege?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
