Forum
[SOLVED] XBMC blocks GPIO usage - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Testing & Experimental (/forum-21.html)
+--- Thread: [SOLVED] XBMC blocks GPIO usage (/thread-1347.html)



XBMC blocks GPIO usage - hpeter - 12th Sep, 2013 10:58 PM

Hi guys,

I'm using XBian 1.0 Beta 1.1 on a Raspberry Pi (Model B Rev. 2) and searched the FAQ, tried iRC and asked for help on G+ without any outcome. With a 433MHz transmitter connected to the GPIOs on the board I like to control my power sockets. This works flawless if XBMC isn't running. But somehow XBMC seems to use the GPIOs too. While it's running I cannot emit my signals like XBMC is blocking my request for some reason. Is there any implementation or applied patch which I have to disable within the media center software to control the GPIOs?

My last thought was, that there may be a timing problem since XBMC uses the CPU excessively.

Thanks in advance,
Peter

PS: the attachment contains the code for controlling the transmitter

edit: adding the attachment failed. Location is now https://www.dropbox.com/s/5ciim5sryrnmap6/elro.py


RE: XBMC blocks GPIO usage - mk01 - 13th Sep, 2013 12:16 AM

you forgot the attachment.


RE: XBMC blocks GPIO usage - hpeter - 13th Sep, 2013 12:33 AM

(13th Sep, 2013 12:16 AM)mk01 Wrote:  you forgot the attachment.

Right Undecided You can find the python script at https://www.dropbox.com/s/5ciim5sryrnmap6/elro.py


RE: XBMC blocks GPIO usage - CurlyMo - 13th Sep, 2013 01:59 AM

Just use http://www.pilight.org. Works perfectly on XBian and with Elro.


RE: XBMC blocks GPIO usage - hpeter - 13th Sep, 2013 02:38 AM

(13th Sep, 2013 01:59 AM)CurlyMo Wrote:  Just use http://www.pilight.org. Works perfectly on XBian and with Elro.

Seems like a very flexible but big solution. I found another approach that works!! Problems with timing after all.

Code:
# ...
repeat = 24 # Number of transmissions
pulselength = 60 # microseconds
# ...

credits: with ice cream at http://www.raspberrypi.org/phpBB3/viewtopic.php?f=32&t=32177


RE: XBMC blocks GPIO usage - CurlyMo - 13th Sep, 2013 03:41 AM

Don't know why pilight should be big? Uses as good as no CPU resources when idle. Has a footprint of only 1.5mb and does everything you want but better. Even works perfectly in receiving codes.


RE: XBMC blocks GPIO usage - hpeter - 13th Sep, 2013 05:02 AM

(13th Sep, 2013 03:41 AM)CurlyMo Wrote:  Don't know why pilight should be big? Uses as good as no CPU resources when idle. Has a footprint of only 1.5mb and does everything you want but better. Even works perfectly in receiving codes.

Of course, it has a small footprint, but I like keeping it low-level. After a while with pilight, I have to admit that this is a great way of doing things. But I also haven't had much luck so far. No signals at all.

Despite new challenges, thanks for your replies, they helped me a lot.


RE: XBMC blocks GPIO usage - IriDium - 14th Sep, 2013 04:33 AM

@hpeter - as the "Problem" has been fixed can you change the status to Solved - Tnx