Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
boernsj
Posts: 3
Registered: ‎05-15-2012
My Device: playbook
My Carrier: a1
Accepted Solution

wpa_cli

Hi everybody,

 

https://bdsc.webapps.blackberry.com/native/reference/com.qnx.doc.neutrino.utilities/topic/w/wpa_cli....

 

I wanted to run this command in playbook app - 

        system("wpa_cli scan");

this didn't work - so I changed it to 

        system("/usr/sbin/wpa_cli scan");

 

but as it looks like I do not have the permissions to do that. meh. 

Is there a way I can run this command on my playbook?

 

Thanks!

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: wpa_cli

File permissions:

 

$ ls -la wpa*
-rwxr-x---   1 root      nto          174072 Mar 29 12:06 wpa_cli

That shows that only user "root" (permissions rwx) and any user with group "nto" (permissions r-x) can read or execute that file.

 

There's no chance that on a non-rooted PlayBook any app can execute that file... apps run with restricted permissions that certainly don't include root access, or the powerful "nto" group.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: wpa_cli

It's a puzzle to me - why document utilities that you can not run? even ping/tracert are restricted... and you want to run wpa_cli! -)))
Basically all these utilites do not exist on Playbook for you. 

Please use plain text.
New Contributor
boernsj
Posts: 3
Registered: ‎05-15-2012
My Device: playbook
My Carrier: a1

Re: wpa_cli

[ Edited ]

@Peter,
thanks for you message. Do you know who can deploy apps as "nto"? operators?

 

@BGmot

why document utilities that you can not run? 

that's the question!

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: wpa_cli

That documentation appears to have been drawn from the more general QNX documentation, which has a long history in embedded systems where developers would generally have full or at least greater control over the permissions in the system.

I would expect the BB10 documentation will gradually be stripped of the pieces that document stuff to which no BB10 developer will ever have access.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.