Well, The thing is you are getting the operation not permitted. Not permission denied. I'm pretty sure that is because with the paranoid setting in the kernel only processes belonging to a particular group are allowed to access internet functionality. So it doesn't matter what you set the permissions of the socket to it will still fail. I suppose net_bt_admin should be a group that has inet capability, though.
pavan savoy wrote: > Sean, > > Currently, this is the setting, > user bluetooth > group bluetooth net_bt_admin misc > > And it should just be this, rather than adding hciattach_legacy to > more groups, I think we should figure out a way so that hci0 is opened > up for user bluetooth, isn't it ? > > I suppose Nick would agree with that ? > What you say Nick ? > > regards, > Pavan > > On Fri, Mar 20, 2009 at 6:16 PM, Sean McNeil <[email protected] > <mailto:[email protected]>> wrote: > > > Did you try adding group "inet" to hciattach? Is that the one that > kicks > off texas_post? > > pavan savoy wrote: > > yeah, Sean, actually I have the hciattach working when run as root, > > I just want possibly the proper way that's all. > > > > regards, > > Pavan > > > > On Fri, Mar 20, 2009 at 6:08 PM, Sean McNeil > <[email protected] <mailto:[email protected]> > > <mailto:[email protected] <mailto:[email protected]>>> > wrote: > > > > > > Hi Pavan, > > > > While testing, try turning off > > > > CONFIG_ANDROID_PARANOID_NETWORK > > > > in the kernel. You are probably trying to access the socket in a > > process > > that doesn't have network permission. > > > > Sean > > > > pavan savoy wrote: > > > Nope, Still get the error, tried out lot of things > actually, fcntl, > > > umask, still seem to have that error. > > > I don;t want to run hciattach as root, and screw up > permissions of > > > UART just because of that, > > > > > > Please suggest .... > > > > > > regards, > > > Pavan > > > > > > On Thu, Mar 19, 2009 at 11:03 AM, pavan savoy > > <[email protected] <mailto:[email protected]> > <mailto:[email protected] <mailto:[email protected]>> > > > <mailto:[email protected] > <mailto:[email protected]> <mailto:[email protected] > <mailto:[email protected]>>>> > > wrote: > > > > > > Nick, > > > > > > When hciattach opens up the UART device, it is able to > > write, but > > > I guess its the socket which is causing the problem, > > > I am verifying it. > > > > > > There is a texas_post function which writes in data after > > hci0 has > > > come up, it basically does a hci_open_dev & then does > a write.. > > > > > > regards, > > > Pavan > > > > > > > > > On Thu, Mar 19, 2009 at 10:58 AM, Nick Pelly > > <[email protected] <mailto:[email protected]> > <mailto:[email protected] <mailto:[email protected]>> > > > <mailto:[email protected] <mailto:[email protected]> > <mailto:[email protected] <mailto:[email protected]>>>> wrote: > > > > > > > > > On Thu, Mar 19, 2009 at 8:46 AM, pavan savoy > > > <[email protected] > <mailto:[email protected]> <mailto:[email protected] > <mailto:[email protected]>> > > <mailto:[email protected] <mailto:[email protected]> > <mailto:[email protected] <mailto:[email protected]>>>> wrote: > > > > update: below... > > > >> > > > >> Hi, > > > >> > > > >> Why do I get this ? I have a set of Vendor Specific > > > commands that > > > >> hciattach would send over the hci0 socket > interface, > > I get > > > these when I try > > > >> and send them, > > > >> > > > >> I//system/bin/hciattach( 959): Cannot send hci > > command to > > > socket: > > > >> Operation not permitted > > > >> I//system/bin/hciattach( 959): Can't > initialize device: > > > Operation not > > > >> permitted > > > >> > > > >> It had eventually came down to function writev in > > > hci_send_cmd, and the > > > >> writev in itself is failing. > > > >> > > > >> I am starting hciattach & hcid from UI, so the > user/owner > > > is 'bluetooth' > > > >> although I do get the same message when I try > and run > > as 'root. > > > >> Here's the ocf/ogf when I get that error, > > > > > > > > [Just an update here, When run as root, it is fine, > > doesn't > > > give me that > > > > error] > > > >> > > > >> I//system/bin/hciattach( 959): > hci_send_cmd:writing > > 63, 268 > > > >> I//system/bin/hciattach( 959): hci_send_cmd: > errno: 1 > > > >> > > > >> > > > >> Any ideas ?? > > > >> > > > >> regards, > > > >> Pavan > > > >> > > > > > > > > > > You should check the permissions on the uart device. > > Make sure > > > it is > > > writable by user Bluetooth. > > > > > > For example /dev/ttyHS0. Although in your case > might be > > different. > > > > > > Nick > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ unsubscribe: [email protected] website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---
