Помощь - Поиск - Пользователи - Календарь
Полная версия этой страницы: Загнать BC-05 в park mode
Форум разработчиков электроники ELECTRONIX.ru > Интерфейсы > Форумы по интерфейсам > Wireless/Optic
Алексей ВМ
Добрый день,

Пробовал ли кто-нибудь загнать CSR-кий чип (BC-05, например) в park mode при работе без внешнего хоста - на модуле запущен, например, spp или hfp. Если это возможно, то какой функцией? Как я понимаю, это делается вызовом ф-ции ConnectionSetLinkPolicy(), в которую передается таблица режимов питания, а потом библиотека connection сама все разруливает, но вдруг есть ещё какой-нибудь способ? Используется BlueLab 4.1.

Спасибо.
Tarbal
Цитата(Алексей ВМ @ Sep 13 2013, 15:55) *
Добрый день,

Пробовал ли кто-нибудь загнать CSR-кий чип (BC-05, например) в park mode при работе без внешнего хоста - на модуле запущен, например, spp или hfp. Если это возможно, то какой функцией? Как я понимаю, это делается вызовом ф-ции ConnectionSetLinkPolicy(), в которую передается таблица режимов питания, а потом библиотека connection сама все разруливает, но вдруг есть ещё какой-нибудь способ? Используется BlueLab 4.1.

Спасибо.


К сожалению я давно не работал с CSR. Все собираюсь купить BlueLab. У них на сайте есть инструкции как подключится к их поддержке.
http://news.csr.com/

http://read.pudn.com/downloads158/ebook/70...-to-BlueLab.pdf
Найдите пункт 3.1 на 7 странице или 3.2 на 11.

Там есть подгруппа c.p.b.bluelab. В ней и спросите ваш вопрос. Можно сначала поискать. Не исключено, что кто-то спрашивал.

Там инженеры CSR в реальном времени как на форуме отвечают на вопросы. Я уверен, что есть функция для ввода в один из энергосберегаютхих режимов. Кстати если у вас есть пример их апликации хедсета, то вы можете найти вход в энергосберегающий режим. Я не помню какой из них используется снифинг или park (там третий был, но забыл как называется).

Вот несколько ответов с ленты:

"ran" <ran@ran> wrote in message news:44f70570@ukrbcsr01....
>
> 1. what is the reason it didn't enter park mode?
>
> 2. is it because I need to do some changes in the spp master's code ? and
if
> so - what kind of changes?
>
> 3.what kind of message request or information it sends to the other chip
> when i configered it as DM_LINK_POLICY_KEEP_PARKED ?
>

You need to send a DM_HCI_WRITE_LP_SETTINGS on the master with the park bit
enabled in link_policy_settings. As you don't want it to initiate park, set
the dm_policy to 0.

By default, the Connection Library sets the policy to allow Sniff and
RoleSwitch. The reason it does not allow park is that there are many
Bluetooth chipsets on the market which do not implement park correctly
(because it's so tricky to get right!). In fact, the Bluetooth SIG are
planning to remove it from future specs.

Can I suggest you use sniff?

Chris.
------------------------------------------------------------------

"ran" <ran@ran> wrote in message news:44fbf27f@ukrbcsr01....
> Hi,
> 1. I took a look at the lp table and I saw there is just two states :
active
> and sniff . is it possible to add park to this table?

The LP table does not support park. As I said in my last email, we don't
recommend the use of park.

> 2. I measured the currents at lp sniff state . at the ssp slave (spp dev
cool.gif
> the currents indicated that it enter deep sleep( 0.9mA) but at the ssp
> master (spp dev a) it didnt enter deep sleep (5mA).
> why ssp master doesn't enter deep sleep at the sniff state.

5mA implies the chip is in sniff, but has not entered deep sleep for some
reason. Obvious suggestion is to check PSKEY_DEEP_SLEEP_STATE. By default,
SPP is likely to disable sleep to prevent bytes being lost on the UART.

Chris.
-----------------------------------------


sharpbull wrote:
> Nobody cares this question.Maybe my question remain obscure?
> "sharpbull" <sharpbull@gmail.com> дÈëÏûÏ¢ÐÂÎÅ:447660a8@ukrbcsr01....
>> Hello all!
>> I use BlueLab3.4.2 to develop spp application.The chip is BC4 EXT.I want my spp module can enter park mode then the master device can connect with more spp module.But I find some code to do this has been delete in BlueLab3.4.2.In BlueLab2.8,some function can be called to do park.Why?
>> I want to know how can I realize this function with BlueLab3.4.2.
>> Thanks for your help!
>> sharp
>>
>
>

Park mode has been all but officially deprecated from the Bluetooth specification... or there has at least been discussion to that end.

That being said, you're right, park mode is still a valid and legal low power mode in the latest version of the Bluetooth specification.

There are placeholders to support park mode is in BlueLab and in the header files. However, park mode has not been added to the standard released libraries.

It is possible for you to add the support to the the code since the primitives and other state variables are there as placeholders in the header files.

Cheers,
Ken

-----------------------------------------------------------
Ken Steck wrote:
> Park mode has been all but officially deprecated from the Bluetooth
> specification... or there has at least been discussion to that end.

It's not been officially deprecated, but at the last spec meeting I went
to, every mention of park mode was accompanied by giggling.

You may interpret this observation any way you want.

- Steven
------------------------------------------------------

> I am writing an application based on the Spp_slave example in Bluelab 2.8.
> I really need to be able to park the device and then unpark the device
from
> the master (I am using a single board computer running win CE to act as
the
> master). When I set the max_intval and min_intval values in config.c in
the
> spp_common directory, the device appears to panic after a connection has
> occurred (the SBC can't successfully disconnect from the device).
>
By setting the panic action to reset you can verify whether the device
really does panic. Can you confirm that the device is reset after this panic
condition occurs. Alternatively you might try running the app in the
debugger as then you'll be able to work out exactly where its panicking.

> After reading the Bluestack documentation I noticed that the Device
Manager
> can be configured to try to keep the device in park mode when there is no
> ACL data being sent.
>
This is true but the spp app runs on top of the CM and this does not use
this feature, it explicitly puts the device into the requested mode.

> I was wondering if you can tell me what happens when
> the device is put in park mode (I haven't been able to see anything about
it
> in the Bluelab documentation).
>
The link is parked (assuming the other end also supports park mode and has
it enabled!) I'm afraid if you want a more specific answer you'll have to
ask a more specific question

> Also I was wondering if the Connection
> Manager is set up so that when no ACL data is being sent it tries to keep
> the link in park mode.
>
No the CM does not see the data and does not know when it is being sent.
When you put data into the RFCOMM buffer BlueStack automatically unparks the
link to send the data.. It then sends an event to the CM telling it the link
is now active and the CM then tries to park the link (after a small timeout
has expired)



-------------------------------------------------

I try to configure bc03-mm board to enter in parked mode with Bluelab 2.95.
When a ACL connection is established i send the following command, but
blueStactk returns an error in DM_HCI_WRITE_LP_SETTINGS_COMPLETE. The error
code is -29875 or unsignned 35661. I can't find this value in bluetooth
specification. Can anybody help me? Thanks.


MAKE_PRIM_T(DM_HCI_WRITE_LP_SETTINGS);
prim->bd_addr = *addr;
prim->link_policy_settings = 0x0008;
prim->dm_policy = DM_LINK_POLICY_KEEP_PARKED;
prim->u.park_settings.max_interval=1000;
prim->u.park_settings.min_interval=100;
prim->u.park_settings.park_idle_time=100;
VmSendBlueStackPrim(DM_PRIM,prim);

Там море информации.

Настоятельно рекомендуют не пользоваться Парк модой. Говорят, что лучше Сниф. Рассказывают, что на конференциях по Блутусу упоминание о Парк моде вызывает хихиканье в зале. Поговаривали о том, чтобы убрать эту моду вообще. Может уже убрали.
Алексей ВМ
Спасибо!

Пример гарнитуры у меня есть (сейчас CSR перешел от BlueLab к SDK, сделанным на его основе), но, к сожалению, ф-ций, явно переводящих чип в один из энергосберегающих режимов, я не нашел.

За информацию о форуме спасибо, попытаюсь там поискать ответ.

Сейчас в SDK поддерживается три режима, которые можно задать с помощью ConnectionSetLinkPolicy(): lp_active, lp_sniff, lp_passive. Последний и вызывает вопросы - что это - hold или park.

Алексей.

PS. Подключился к поддержке - кладезь информации. Благодарю за ссылку!
Tarbal
Последнее сообщение показывает как формируется запрос. Там такая система. Есть несколько обработчиков событий.
Один из них DM (device монитор или менеджер чего-то судя по букве М). Все его события начинаются DM_.... одно из них DM_LINK_POLICY_KEEP_PARKED запрос зайти в парк моду. Надо сформировать запрос и послать его. В коде есть множество примеров -- там это делается сплошь и рядом для других DM_ запросов. В обработчике стоит switch(event) и case DM_LINK_POLICY_KEEP_PARKED: делает всю работу. Не рекомендую копировать содержимое case в то место где надо сделать парк. Правильно сформировать запрос и послать его.

Цитата(Алексей ВМ @ Sep 17 2013, 09:27) *
Спасибо!

PS. Подключился к поддержке - кладезь информации. Благодарю за ссылку!


На здоровье!
Да. Без этого форума разрабатывать было-бы кисло sm.gif
Там есть подфорумы. Один из них тест, где надо попробовать как получается писать.
Еще есть подфорум с правилами.
При регистрации некоторые по ошибке вводят имя типа CSR, полагая, что это имя под которым будет форум у них. На самом деле это имя под корорым они будут на форуме.

Зачастую на простой вопрос они не отвечают, но я нашел способ спрашивать так чтобы ответили. Я спрашивал в каком документе про это можно почитать sm.gif
Успехов
Алексей ВМ
Цитата(Tarbal @ Sep 17 2013, 03:46) *
Настоятельно рекомендуют не пользоваться Парк модой. Говорят, что лучше Сниф. Рассказывают, что на конференциях по Блутусу упоминание о Парк моде вызывает хихиканье в зале. Поговаривали о том, чтобы убрать эту моду вообще. Может уже убрали.


Думаю, и я не буду усердствовать, использую sniff + DeepSleep, потеряю немного. Ещё раз благодарю за ценную информацию.
Tarbal
Цитата(Алексей ВМ @ Sep 17 2013, 18:06) *
Думаю, и я не буду усердствовать, использую sniff + DeepSleep, потеряю немного. Ещё раз благодарю за ценную информацию.


Успеха вам.
Для просмотра полной версии этой страницы, пожалуйста, пройдите по ссылке.
Invision Power Board © 2001-2024 Invision Power Services, Inc.