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 <pavan.sa...@gmail.com > <mailto:pavan.sa...@gmail.com>> 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 <npe...@google.com > <mailto:npe...@google.com>> wrote: > > > On Thu, Mar 19, 2009 at 8:46 AM, pavan savoy > <pavan.sa...@gmail.com <mailto:pavan.sa...@gmail.com>> 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: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---