there should really be on 1 hciattach, i.e it needs to be run once..
I guess with mentioning bcmxxxx, the hciattach would have a custom
_init and _post function which does BCM specific initialization, like
setting baud-rate via HCI-VS and fw download...

but via cmd line.. you should probably be doing an start bluetoothd
before doing hciattach, in case hciattach also needs hci0 to be up ...

also how do you make sure chip is ON ?
Is it ON always? on boot ?

On Wed, Aug 4, 2010 at 1:59 PM, Ajith Kamath <sjce.aj...@gmail.com> wrote:
> Hi Pavan,
> But doing only hciattach with device type as 'any' doesn't work.( I tried
> that now , inside init.rc)
> Do i need to put second hciattach with dev type as 'bcm2035' in init.rc???
>
> Also in command line only after exceution of both commands , i get buletooth
> running.
> I stumbled across this by accident. But to do have anyidea why is it needed
> twice?
>
> When I run command with dev type any i get :
> #hciattach -s 115200 /dev/s3c_serial1 any 460800 flow NULL
> hciattach -s 115200 /dev/s3c_serial1 any 460800 flow NULL
> Device setup complete
>
> Next when I run with bcm2035 i get:
> # hciattach -s 115200 /dev/s3c_serial1 bcm2035 460800 flow NULL
> hciattach -s 115200 /dev/s3c_serial1 bcm2035 460800 flow NULL
> Failed to write reset command
> Can't initialize device: Unknown error: 0
>
>
> But only after I completed both the steps, BT will be up. Else, it will
> restart the device.
> Also if i directly start off with bcm2035 it give me initialization timed
> out error.
> Any advice??
>
> Thanks,
> Ajith
>
> On Wed, Aug 4, 2010 at 12:19 PM, Pavan Savoy <pavan.sa...@gmail.com> wrote:
>>
>> On Wed, Aug 4, 2010 at 12:19 PM, Pavan Savoy <pavan.sa...@gmail.com>
>> wrote:
>> > #service hciattachd /system/bin/hciattach -s 115200 /dev/s3c_serial1
>> > any 460800 flow NULL
>> >        #user root
>> >        #group bluetooth net_bt_admin
>> >        #disabled
>> >    #oneshot
>> >
>> > is almost correct except for the hciattach"d" part..
>> > so your entry should be ...
>> >
>> > service hciattach /system/bin/hciattach -s 115200 /dev/s3c_serial1 any
>> > 460800 flow NULL
>> >        user root
>> >        group bluetooth net_bt_admin
>> >        disabled
>> >    oneshot
>> >
>> > And no there is no hcid anymore since bluez4.x.. it is now
>> > bluetoothd.. which you have it properly..
>> >
>> > Assuming you have your rfkill driver in right place, and it has
>> > exposed the /sys/class/rfkill/rfkill0/state entry .. everything should
>> > automagically work !!
>> >
>> >
>> > On Wed, Aug 4, 2010 at 11:57 AM, Ajith Kamath <sjce.aj...@gmail.com>
>> > wrote:
>> >> Hi all,
>> >>
>> >> I'm able to start bluetooth after porting only from command line.
>> >> I give following commands and it works
>> >>
>> >> #hciattach -s 115200 /dev/s3c_serial1 any 460800 flow NULL
>> >> #hciattach -s 115200 /dev/s3c_serial1 bcm2035 460800 flow NULL
>> >>
>> >> Doing this brings bluetooth up for me.
>> >> But I want to put this in init.rc file so that it happens in boot
>> >> itself.
>> >> But its not working.
>> >> Can someone tell how to put it in init.rc
>> >>
>> >> Also from references i have realised that hcid is not at all there in
>> >> system/bin or in data/misc/hcid
>> >> Can some one please advice on this.
>> >>
>> >> commented parts in init.rc relating to bluetooth are things I tried but
>> >> didn't work
>> >>
>> >> Thanks,
>> >> Ajith
>> >>
>> >>
>> >>
>> >> --
>> >> unsubscribe: android-porting+unsubscr...@googlegroups.com
>> >> website: http://groups.google.com/group/android-porting
>> >>
>> >
>> >
>> >
>> > --
>> > --Pavan Savoy
>> >
>>
>>
>>
>> --
>> --Pavan Savoy
>>
>> --
>> unsubscribe: android-porting+unsubscr...@googlegroups.com
>> website: http://groups.google.com/group/android-porting
>
>



-- 
--Pavan Savoy

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to