Hi,

Find the init.rc from the zoom2 product directory below.

http://git.omapzoom.org/?p=repo/android/vendor/ti/zoom2.git;a=blob;f=init.omapzoom2.rc;h=3434840e46a2694b5e42b77e027d6dd3c068989f;hb=HEAD

Recently I've added a new service by name hciattach_legacy which has the
same definition as hciattach in init.rc, that's all.
And 1 more thing, hcid.conf path might have changed, and I've changed that
in my local init.rc file.

Sockets as far as I know should be created in /data/misc/hcid/, I suppose
[or somewhere there..]

On Tue, Feb 3, 2009 at 9:33 AM, Sidharth Malhotra <[email protected]> wrote:

>
> Hi Pavan,
>
> I am aware of this flag and have unset this to ensure that sockets can
> be opened by hcid. But, I am still struggling with how to bring up
> hcid.
> By the way, can you share the init.rc file and the hcid source you are
> running. It seems you also had certain problems earlier.
>
> Since yesterday, I have been able to open the socket, but I am now
> stuck on  -
> hcid[681]: Unable to get the control socket for 'bluetooth'
>
> Were you able to resolve this one? I also saw that there is no
> Bluetooth entry in /dev/socket. What to do now?
>
> Thanks,
> Sidharth
>
>
>
> On Feb 2, 6:15 pm, pavan savoy <[email protected]> wrote:
> > hciattach & hcid should be running as user "bluetooth" with both of them
> in
> > group bluetooth & net_bt_admin.
> > If you are in development....
> > just remove the ANDROID_PARANOID_NETWORK option from your kernel.
> >
> > regards,
> > Pavan
> >
> >
> >
> > On Mon, Feb 2, 2009 at 5:40 PM, Sidharth Malhotra <[email protected]>
> wrote:
> >
> > > Hi Nick,
> >
> > > I have been a silent observer of this group till now, but now I am
> > > kinda stuck. I am able to run hciattach, hciconfig, hcitool, etc. but
> > > while running hcid I get this error message:
> >
> > > "
> > > bash-3.2# hcid
> > > hcid[1155]: Bluetooth HCI daemon
> > > hcid[1155]: Create and Bind socket
> > > hcid[1155]: Can't open HCI socket: Operation not permitted (1)
> > > hcid[1155]: Cant open HCI socket: Bad file number (9
> > > "
> >
> > > Can you tell me how to avoid this? I can run hcid (start hcid) with
> > > "bluetooth" user, but I guess since hcid is not running in root user
> > > mode, I am facing this error. The relevant hcid entry in init.rc file
> > > is:
> > > service hcid /system/bin/logwrapper /system/bin/hcid -d -s -n -f
> > > system/etc/hcid.conf
> > >    socket bluetooth stream 660 bluetooth bluetooth
> > >    socket dbus_bluetooth stream 660 bluetooth bluetooth
> > >    # init.rc does not yet support applying capabilities, so run as
> > > root and
> > >    # let hcid drop uid to bluetooth with the right linux capabilities
> > >    group bluetooth net_bt_admin misc
> > >    user root
> > >    group bluetooth net_bt_admin misc
> > > #   disabled
> > >    oneshot
> >
> > > Still, when I do a ps, I cannot see hcid running.
> >
> > > Thanks,
> > > Sidharth
> >
> > > On Dec 9 2008, 2:34 am, Nick Pelly <[email protected]> wrote:
> > > > This is some Android specific magic.
> >
> > > > When two linux processes wish to communicate via a unix domain socket
> on
> > > a
> > > > traditional linux distribution they often use /tmp. However on
> Android we
> > > > got rid of /tmp for security and storage accountability reasons.
> Instead
> > > a
> > > > mechanism was introduced for daemons to request a unix domain socket
> in
> > > > /dev/socket than the init process creates on behalf of the daemon.
> The
> > > > daemon just picks up the file descriptor from the environment.
> >
> > > > See
> > > > /dev/socket
> > > > #define ANDROID_SOCKET_DIR
> > > > system/core/init/readme.txt keyword socket
> >
> > > > The error you show here seems to indicate that hcid was unable to
> open
> > > the
> > > > socket provided by init. Perhaps you did not use the socket syntax in
> > > your
> > > > init.rc
> >
> > > > Nick
> > > > Android Systems Engineer
> >
> > > > On Mon, Dec 8, 2008 at 1:16 PM, pavan savoy <[email protected]>
> > > wrote:
> > > > > Hi,
> >
> > > > > I started the bluez hcid as root, after disabling the kernel
> feature
> > > that
> > > > > blocks creation of sockets [CONFIG_ANDROID_PARANOID_NETWORK] in the
> > > kernel,
> >
> > > > > Now If I start off hcid, I realise that the SDP server, isn't being
> > > > > initialised properly.
> >
> > > > > I get the error...
> >
> > > > > # hcid -f /etc/hcid.conf -d -n
> > > > > hcid[681]: Bluetooth HCI daemon
> > > > > hcid[681]: Enabling debug information
> > > > > hcid[681]: Starting SDP server
> > > > > hcid[681]: Adding rec : 0x3b628
> > > > > hcid[681]: with handle : 0x1
> > > > > hcid[681]: Adding rec : 0x3b788
> > > > > hcid[681]: with handle : 0x0
> > > > > hcid[681]: Service classes 0x00
> > > > > hcid[681]: Unable to get the control socket for 'bluetooth'
> > > > > hcid[681]: Server initialization failed
> >
> > > > > What is the reason ? where is android_get_control_socket defined,
> why
> > > do we
> > > > > need it ?
> >
> > > > > regards,
> > > > > Pavan- Hide quoted text -
> >
> > > > - Show quoted text -- Hide quoted text -
> >
> > - Show quoted text -
> >
>

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to