Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mihini-dev] mihini-dev Digest, Vol 12, Issue 6

Hi Cuero,

I managed to get it working by editing the /etc/init.c/mihini script to run mihini as root (" -u root -g root") it's working for the time being. Still i'd like to give a try at your method later. But once i chaged the user and group space to root, there happened to be a problem with persistent storage, i.e. any applications installed through the appcon, would no longer be detected on next reboot. 
It somehow resolved after I purged all the persistent data and re initiate the devicetree and all other my application specific settings.

Thanks for your advice, and i'll keep you posted about any outcome.
Regards. 


On Mon, Feb 24, 2014 at 10:30 PM, <mihini-dev-request@xxxxxxxxxxx> wrote:
Send mihini-dev mailing list submissions to
        mihini-dev@xxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        https://dev.eclipse.org/mailman/listinfo/mihini-dev
or, via email, send a message with subject or body 'help' to
        mihini-dev-request@xxxxxxxxxxx

You can reach the person managing the list at
        mihini-dev-owner@xxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of mihini-dev digest..."


Today's Topics:

   1. Accessing /dev/spidev* devices through LUA mihini
      applications. (Rajitha Karunarathne)
   2. Re: Accessing /dev/spidev* devices through LUA mihini
      applications. (Cuero Bugot)


----------------------------------------------------------------------

Message: 1
Date: Mon, 24 Feb 2014 14:11:44 +0530
From: Rajitha Karunarathne <rajithak@xxxxxxxxxxxxxxxx>
To: mihini-dev@xxxxxxxxxxx
Subject: [mihini-dev] Accessing /dev/spidev* devices through LUA
        mihini  applications.
Message-ID:
        <CAKcbVpS_9HXgwvzAvVy5WWe2YWFobZXyVNvuCONGaARv4aRShw@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"

Hello there,

I've so far interfaced nrf24l01 module to raspberry pi directly. Then I've
compiled the rf24 and rf24network libraries as shared libraries and through
LUA C bindings i can access the module and everything works when i log in
to rapsberryPI (Mihini Host)  through KONEKI LDT as root. But whenever I
try to run it as normal user, i get a "Segmentation fault", and I have
found out that even a C/C++ application I need to execute as root in order
to get the /dev/spidev* s work, otherwise it gives "Segmentation fault"
error.
For the development process I can run as root but when I try to install the
LUA application as  MIHINI application still the error remains.
I tried changing the udev rules to change access permissions of
/dev/spidev* s too. But still no success.
Any suggestions as to how I can run MIHINI lua applications as root?

Regards.
Rajitha.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dev.eclipse.org/mailman/private/mihini-dev/attachments/20140224/2ea2e864/attachment.html>

------------------------------

Message: 2
Date: Mon, 24 Feb 2014 02:25:58 -0800
From: Cuero Bugot <cbugot@xxxxxxxxxxxxxxxxxx>
To: Mihini project developer discussions <mihini-dev@xxxxxxxxxxx>
Subject: Re: [mihini-dev] Accessing /dev/spidev* devices through LUA
        mihini applications.
Message-ID:
        <9287D1909D3EEA4E92505D48604887E9EA278A87CE@carmd-exchmb01.sierrawireless.local>

Content-Type: text/plain; charset="us-ascii"

Could try to manually change the device permission to allow to everybody and check it that works. If so, you can try to resolve the issue with udev or anything to resolve the permissions on your system.
So the test is:
Type 'chmod a+rwx /dev/spidev*' in a shell, as root. So that  just before starting your application. Beware this change will most likely do not survive a reboot, so you'll have to do it again after a reboot..
Then launch your application.

Let me it that works.

Thx,
Cuero

From: mihini-dev-bounces@xxxxxxxxxxx [mailto:mihini-dev-bounces@xxxxxxxxxxx] On Behalf Of Rajitha Karunarathne
Sent: Monday, February 24, 2014 9:42 AM
To: mihini-dev@xxxxxxxxxxx
Subject: [mihini-dev] Accessing /dev/spidev* devices through LUA mihini applications.

Hello there,

I've so far interfaced nrf24l01 module to raspberry pi directly. Then I've compiled the rf24 and rf24network libraries as shared libraries and through LUA C bindings i can access the module and everything works when i log in to rapsberryPI (Mihini Host)  through KONEKI LDT as root. But whenever I try to run it as normal user, i get a "Segmentation fault", and I have found out that even a C/C++ application I need to execute as root in order to get the /dev/spidev* s work, otherwise it gives "Segmentation fault" error.
For the development process I can run as root but when I try to install the LUA application as  MIHINI application still the error remains.
I tried changing the udev rules to change access permissions of /dev/spidev* s too. But still no success.
Any suggestions as to how I can run MIHINI lua applications as root?

Regards.
Rajitha.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dev.eclipse.org/mailman/private/mihini-dev/attachments/20140224/8cceb582/attachment.html>

------------------------------

_______________________________________________
mihini-dev mailing list
mihini-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mihini-dev


End of mihini-dev Digest, Vol 12, Issue 6
*****************************************


Back to the top