public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] Fwd: reduce hci connect time
@ 2004-09-03 16:58 murdok
  2004-09-06  8:29 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: murdok @ 2004-09-03 16:58 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]

Hi to all

I'm trying to reduce the time of HCI connect using the clock offset in the
hcitool create connection command.
So I modified hcitool.c (present in attach) adding the clkoffset parameter
on hci_create_connection:

 if (hci_create_connection(dd, &bdaddr, htobs(ptype), clkoffset , role,
&handle, 25000) < 0)
                perror("Can't create connection");

and change the code for insert that in the command with this syntax:

hcitool cc --clkos <clkoffset-in-decimal> <BDADDR>;

then I add a printf into hcitool inq for print the clkoffset in decimal
and try to insert this in the connection command, b
ut the time of connect do not change!

Later, during other test I take a mistake using a wrong clockoffset in the
connect command and the time of the connection w
as redused under 100 ms (with the slave in continuos page scan mode).

So I write a little bash script for test and I find a stange class of value
to reduce this time of connection, but I can't
understanding the logic.

Where I mistake?
Why if I insert the same value returned from hci inqiry the connection do
not reduce its time?
There is a bug in the code or I wrong using some function?

In attach you can find:
the hcitool.c code (modified)
a dump with a hci inquiry, and an hci connect with the same value of
 clokoffset bash script for trying a lot value of clkoffset

Can you help me

Thanks
 Ilario



[-- Attachment #2: conn.tgz --]
[-- Type: application/x-gzip, Size: 7306 bytes --]

\x1f‹\b\0y8A\0\x03ì\_s\x1aÉvÇweïBêîÖM*©ü©[ÕËÚ2È\b\x01úç‹„öb\x18	Ê\b´€ìõÊ®¹ÃÌ ¦<Ì ™A–î®ó\x05’O‡Tå\x13¤*yJ\x1eîCžó\x01ò\x19òœ—¼Ýsº{þ€f\x10²±w7\x11%`æt÷éÓ§ÏùÓ݃zúXýýªmÉk#Ë<—dýuÖ\x1eÄ\x16ûÊås¹íÍÍX޽¦¿së…õX>—Ïoå¶ò…\\x1eê¯o\x156c$·`9B_cÛ‘,Bb–i:³ê]Wþ3}}õåZO3Öz’=H<©–r¹âz®X)\x14s‹^[ûÅÍJ"¡•r‰7\x03MWÉÉ	¹¯‘]ò›ßW¯H"®˜D*ýN•\a&ÐWò8•ä\aÒ“\x7f— ´¤¬›òëÒ})™ˆ;ÚP%\x03YsLS'²LVWÁÒL›Ü—Èý'Õ\x1d¯H‘ñ>\x11×<¾òœ§­«êˆä9o’\f¹H(¦¡&~l•þ¬^šq¶*›†‘UÆÃÑ\aê\x03ý\x7fkc#Òÿ7¶7¹ÿoç6×\vP¿ßÚ¾õÿñŠÃ{÷ìqù¿ÿáó؝;Kw×ÿî\x1f?S>Ý¡Ä\x7fÿçÏcK_,aÁŸ\x02©\x04¤\x7f\x12>‰-ýâ‹;/[ŸýG\x0eh1xgÖ¡Jì\0Jÿ¼\x02¥wîÄ~\x05ôgpÿ_ν؝»K¿dµÿò?\x7f\x01uï w,üÃßßcÜï.Aß±\x17@z“þ"¶ôÉŸÄÒ1—ÿgÀ	Kþ\x15Jîüò³¥tì\vùNì; ýï_ÅbKŸß\x0324ø\x14*"ñ×\x7f\r"Ý[ú$\x1dû³\x04¯÷l\x13ê‘O9ËO9õ×¥\x18í>voé\x1e'‰/ô7Ðô®[éà_X%\x18¨Kú·ÿ\x01ÒÝ%èò/~Ô™[Ì«çÅ\x7fv5v4Ý^-dó¹5\x04d{#sV~÷>fûÿööV>ïÆ\x7fð\x7f ç·\vÛù[ÿÿ\x18¯µ•\x04Á?BžÀü\x7fGVé7̸3 \x11:¦\fQ\x19T$¿&}Ó"\rÍ\x18_¸-*æèÒÒN\a\x0eIUÒ¤\0s¹
\x1fyB¾\x19Kºl\x0e‡¤nȦ52-ÉQ•ð&\x05l²NÈ¡t¡\rÉSK²Kɰ__’Ý¡tñú·gœU\x16>öf°Ø@\x16–¬ê¤fêÎP2\fd€„ß\x0e8!kZ§{Lvʨ;Ðl\x1cã©%\r	\ö-U%¶ÙwÞH–ºC.Í1‘%ƒXª¢ÙŽ¥õÆŽJ4‡H†²\x06š\x18šŠÖ¿¤Œ€86\x14Õ"Î@%Žj\rmböéÍAó˜\x1c¨†jI:9\x1a÷tM\x06\rʪa«ä\µlÍ4HH6å2Âr{ *¤wI^[ï£<\x1d.\x0fÙ7¡\x0fɁ&;Þ\0j\x02é´ö»ÏËmÔ;ä¨ÝzV¯
U’,wà>™!ÏëÝZë¸K F»Üì¾ ­}Rn¾ OëÍj†\bß\x1eµ…N‡òjµIýð¨Q\x17€^oV\x1aÇÕzó€<¶ÍV—4ê‡õ.0î¶h§œ]]è ÃC¡]©ÁmùI½Qï¾ÈP~ûõn\x13x“}`\&Gåv·^9n”Ûäè¸}Ôê\b F\x15X7ëÍý6ô$\x1c
Í.2ëÖêí*­ÿ‚´ë\aµn'KùÕ›P›\bϰZ§Vn4¨ •ÖÑ\vZ‹ÔZªÐNuÒ”qù\x18ÆMïž\b |ùIC`’4_0^[j”ë‡\x19Â(¤s$Têå\x06ôQ­·…J\x17é•V³#|s\fÝaIµ|X>\x10:^\v~O(³çµr·Ó\x02ÑÚ\x04ÔyÜè¢æöÛ­CÒhu¨†Ž;B\x06ÚtËØ\x1ef	”\x03¼ž×\x04\x18C^[‡Vn2VåJ·Þjb\x13è¿Û†Û\fi
\aúÐ¬\bغE›t[ ÏÖq‡7Ȑr»ÞÁnq²¡µ7¥MdÔ\x14\x18[´\x06ª6‡J"´A)‡eÊšª¾ãÙSÖ52T5jÍmÀ6<"Õìô<¢–ŽÊ]¸ƒ‘2»s\x05\x04\x18ZU8,·Ÿvü1¹em¡Q¦*\x04c£‚rÉ(“ ¹Wë\x1d:B5^[ðêûu¥H¼ •9'ùìÆ&ÂÄÆZn{­°IrÛÅõ­bþ1qq\b\x17#r\x1f\x1a¯%\x12_i}Eí“Zù™ ‚æöë\ab\rˆ†¬\x15•ìB¦Ü×N³ƒ½ÄWª\x01þŸ\b”ÙŽ¢™´(HÒµÞ$ml\0š(Óõ,Í8¢i§†¤OÒú²áL‘TË2¦z•Ë‘Ф\0\rQI3íkٝ\x02ôœ)I.í5di_%k¦<Í\x01É6¬ûÔ).†êhð^ÓŒ)Ñzn¼Yó®&[ú\x15`Zg\x14‰\×	õ\x02†k\x10Íp\b\fF3”\f|¢ð\vþvÜ
ò\0"ÿ
P$ët\aD‚™\a\x111Ήª$\x0fD(IÁ;CtÓ8Í\x10{`ZNš°µp
KJL]"–§€‰œ!ðyΫ’¯Ùw1ù(éòh\x1e7\x1aé4ù²DVóéD\x02\x02«\x031áÜÔ\x142¶¥S5…—é\x1d¯\x04Ç ¨ç¢fôÍ\x14ÞØ\x19Ÿ¦0®Øg:ñ}"\x0ef4–\x1d4~ÑmC\x14”È÷¬z‘7{»“ˆÓ±KŠbä\x1f¿‚þâZŸ¤èt¦ ‹Z\x05\x10§[\x15ž[·2„Jµ’&ËŠ–N'âqKuÆ ¿\x1c¶ëI\x05è7\x05EÙž‚\f3”-Œ!>\x02«vú©äKçMß\x06è\x01ê\x19ÒPõkùÌÞN\f^[W¥0¥¶s“q{DK=#+²¾sµ˜êeEÖ \bY‚êK„Z\0»õ”¡°i"Ë˼[¼‡Ù™R\0Öý2%ëÀe(éº)§ò9\0"[û½jöSÐOš<òïô4¼\b\b\x1d\x1fEšV*Y‘Œ‡U`KH“ÈP\x1dšÖe\x125\x13W/4'•ÇË·0cúê\x1e—£Ä\x05ÚaT:*c<\x04z>‡4œs¯\0‡^[1Á\x18^[\x1aõN×›a\x14/D80s:\x1dªŒù\aAý^\x150\x11Ç\x041¥•r;\x04w‰‚’\x01åÑ£\f‘á“ñŸ2¿¸gF²¶º7mG\x13†DØß\0Ò0pÃ\a
&§\x0e½Ð‡„Ù\x18´ˆ#\x1fsŒ>˜ÜM’"Iîùt\x043R*Aðlˆzó)V‚kZ­Si±ŠL\x04¬Îºb×´3ZN\x01gè˜(5–èšñZ„¤PMóùвkÀ\x18…\x1a⇶ë[ã¼¹qB3ª²ž$\x0fG©\x14³DÑ!+i˜”\f	˜'\x05Bw’ó\x118F} ^ˆ¸»–bñfd©}6éo4Å\x19d`퀱\x1eò~VÞ^[ób]5¨\x19Xê)Œ	–\x17tV3ÆN`4\x19b”ò0€]¨ÌÇa¸>†\x031ÐÎóTT׉\x1eØ€Â(Ä„k=(d\vß\x12(îO´W´Ìc@\x05eL}_4˜–ãP\x03\a\x1dG3xËg\x121Óø²D;žl\0ºY[!UÍ\x1eéÒ%A³ÒÑ^`QdÓ\x04Œ+ŽÛ6†o˜S4(viŸ¼Âx–ˆ\x7fŸ\x1c¨ú(™‰ç2 „‡ƒ‡oÁ+¿‡Kþ÷6ñ֏¢L±È\x05^[\x01ƒD<yŒá¶\bBÁõK\aÊàrgrâä¡‚4\x15tP¼f‘ž1]Á€O§‰§^[;tr¦\x12ˆÀ\0x\x0e@•i¿Ñ\x1cy€UØ=$ ÒXwŠ\x01=»B3]3^[ó”í‡Ø*Sa‘Ï
b‚'\x05\x0e\x01\J<>Êx¹\x04hÈ›Œºq6Ö¬ËhõkÆÙ|êO‚\x15ž:\x03 ç)Yçdp2Ë\x1eydƒ“ûúØ\x1ex<úsL!J\x125…PFNVW™\b¥æ+\0¼\vm\bÀ£ññ)cKâãEAá1±Áõ4Çv\x19\x10x\x01\x03&,2°Gª\fk|\x11”ôÀ\ramï²´T{\x04ZQ§yБ½Â^[zE—ón^[\x19æD\r76¨r\x03c\x03qD4Cؐ3ЗtjSô§=ñ€@?KÔê®æ},Rd˜á&âŒ\x13êw\b\x01Ûø[\b\x17¶
H©P÷Œó>)˜£ÓÓ.\x19\0„Ù}ÀrfÙ½,Ù*Z\v5|.\x03ädŽ©¥Xvά¿g©Òkìˆ70X\x03_¦k[ôY\v&õ\x0f%\x02ËýoÄJ¹R\x13ÄýÆq§6Õ(Ä\x1f]\v¼Æ\x1f™OÁ¢Žd³Yœèž|’R^äç“èÍ*ª\v"\x0eóV*12¡˜Ì\x19í‚\x13O\x04Dדû\x12,Q”lt\x18¤3F\x03!çEc\acæfb)ìù‘–¾&\x1f{éÐc>ðŠ¾­:E’»x°‘ݸ@²dÛô\x1eBKàÃÍÐ\x18O¿\x17ÊFdlh\x05¿\buDٝ\x14^eHTY~FY\x0e#š+¶+*äŒ(L¸\b<±ÁMAZÁ]\x14j‰-K†\x13\x1c	›Xã'‚›T”(àÄÂIäœ@A\x0fÎÂ1\v[Ï\rZѸ4\x13ЦA‹Þã*ò¤°1…b\x10â”\x0fdÁÉü?\x02ežQD`\x19B\rÏé=¤ñr|„0ȼE\v\x16YjŠêÃM\x19§ÛxðÄ=G³‰a‚œ\x03JI=]åy¤SÓ`Úq]íÇÃÒ0(U\=˜#Õ Y\x16ëße­(W¹B\x1eÆÓ]‚­&¸\a¡ææ°\rK3@­\x14Û[\x01\x18à‹:¼O{SƒÒ‚I(ð14\x1dUÄR\x13Ts\x15íƒ\f2„ñ¥ÏxÀp\8g\0xòè’wš4Ö$6’^[‡\x10¾7ÄêÐ\x1eù¸\x01‘m”\x10ï¯Bq›Ž‚6ˆ†a,]Àꁲa\x10z\x05A©\0»lŒ{á0I5=\x1fLz‹Nv\x11…w\x01°»
WÁAßpÅá\r4\x14\x16â(3Y-ñÕ\x1dJ8'|\x023~Zm\x17–žÌüÃX{œq¢aÎ
=	›C°\x06ƒä«ì›\x01‘ß,\x02‹ú.øÁ’Ï\x02c‹\x02¥¬·¾½ŠK‹vüIWŸí§³¼³°I\x13\x16ì¹à›;\x17w«	ŸòV€\x10Š¥\x1eî—±\x0e]Qg,	ûæ\x02œŠ²‰^ЁT³½ÊÛ\x16\x7f\x17¯\x1aCåü\x16PØ\x06_˜ŸMnÍôU	,VµOhY`ûÍ=Ëåß;Q[ñ\x11›v|OÏštì\f>'7ceåOÀ\r\x1dÜSúâ\x1d|’õ»:ø´{‡îdxÛ¨°†À]ÓôM8†\x01F8ÎÌ‹\x17\x04\x024\x12øN$¬¾\\0	÷nt04^×pñhå*jø;œÜ!±M\x18[××ÛêÙXµ\x1dL–°ª5d;\x1e^âô¡ÁK¶üfo[Ù
l2‡Ù\x7fÚíûK¬zí\x0e¯¯ƒ`v0%HOÂÄdY¶üÜ#\x10^[ÌN\x01¼C€à&4zŸ¿\vÍ\x0fÁ<0`憲zšr§U\x06Ô\x06¼ö¥Dícö씢eG¯\x1d‘
°L\x058ê¾8\x12ÄÃrçišaåE.\x0fÍÜ“\a\x0eìW3j¦\x1fÖi@E<rM¨g*ŽÅ)¸à¾õ[¢ê¶
\x14~¤RâR¢Ž¼)rOA¨	ù¹Û“*)ÃÀT\è\x137‰c\x1eîyÔBcÙK‡û_\x13j\x15Éth\v돃2íÒUè2'fèSKn?A$ƒž\x1a‡Gä\x19«‡=‘TîâÁEš ¹3%H¥!+ŽAëP2Æ}IÆ8a±V\x0f”´»å¡\x0fG(\x0e;4â\f²œ\b#Ÿ¢L\x12lÚ%Ûáè9`aѦLr\x1a\x06ú\x0e°› ÏH2Üð6¡)—8SSû¼’·Ûó®ß/\rÿ\x04/î…[\f\x17ÞM>xS\bÞ¬¿šj·\x11,Ý\fÞl\x05o¶y;Ô²KdŠõ\a\x0fƒ|逥m­§ƒ*”e4NŠçšÍýoB}\x18­Z‚xÜ\x11ڢЬ
UÑ\x7f\x1e‡/§¦s2–’uTC\x01WêiŽ%Á*\x14\x11\x18\x1fƒ“øöExV†)Ñû'eÈ%*'ƒ2²kžö÷àS†Ï“‘dó9`j¯X\x1dáB\x1aŽôÉ\x16\0gëø‘Ëã×F\x1e?
øAo7Âs;xÏ™ÚÑ{<·Bm\x1f–¿\x15écbb§þ\0ó¼2r0(AùdúÕ×t<Tëë\x0e?0QÏUÃ\x11\a
ð\x1e(n2æî*éªÁV[~Ú\b
ාñî´\x1fž©\x05&冉š;\x11‹ÈÓ
\x13>;Áy"M›;qâ[>‰8}\x02‰Ÿ\x01‚\x12à
”옺Ÿê±Ý—ü\x16ö\x06J›ª‘Ÿª\x12pž%"´ËÍ\x03üð\x03I!ï=°—õ~šÝËî}?=çà¼]”\x02P\x7f;…*iy™\x12wÝx\x04\x16“ægª@g‡ÃhL\x1eAÃ\x14Ÿ÷ôÄX´É±¼[¶U•i	ßÖ»â~¹Þ8n\v.\x12Q¸pÆ#ÂM\x1a·7}\v\x17e]•¬Ô2\x18ºw4È
l˜Ì\x11f!4©fNsô´\váñj]H阃Ø\x1e'”\x1fXàÃ^hì\b{VC\x04^\f÷ö덮Ðfܼ mC\x12]Ä7.½Í†2ÏÀÝ\b´Kñ±Â𱈮ˆ\x01%W¸È “Òë\r¸\x1eáô>PhÊ\0uh![:V÷”>Ið\x18¼£GἘôé\x168®\x02Àø'R\r[5\x18Váø'¸R\x06!c¥Ð>×ø˜bŒ¦Ü©<\x01ãt'YíT/mh5_/ˆx%ö\x05YI#gH×i¢è!'\x10Ryøðí¤VmS€ÅjØ?\0Qt\r\x7f¦öèL	hHE>G\x13Ó\x02²¬î©ç\x0e¿\x1aEO\x0eÈ\x16=94\x15ǐÊ\NñŸ3›~\x02\x01ò"í<˜;Ï
¯æœç9³Ã«\x19}\x14\x03e\x11ÁМÿÅqOsCb‘9×!FX,2gž\x15¸ó[ñõxí³\bÞ3Mü±\x04?ù©L/hf̉<ç\x11›eêªw’fq"E?:âTúÓD03öbeò<3+GO¬Œçh(CiøƒM\x0fÕhß%w!\b´ÀVWX\x1e…?šdm”a>£\fÖá½Irùb®PÌ­\x17s^[ÅÜf1·5QŸu\x18Z)ÌÈäwÞKóö­¨„Ó™\x12φQ¯ôlµ”\v$N(#Z+~cD†¥/…\x1e¶<Gc©\x1eâo@ÙÕºwµé^Õ¼ÒšWZÛŒp\0yþC¼\x11;a£ 1ž…Jv&\aQÞ†ŸÍY¬%\x1f\x11k\x01™\x10&4\x0f‡\x0fÉ×$GŠtíí5u[ÊÐ’D¼\\x1fSeX	htq‰˜é\x1d\x12Î׎ô4\Înd7žÌÕ|mÍÆƒÂ¾;ð䃋dfÙ›Êè†^\x15Rš<̼FLÉÒø\bÝG	@Ê9ú›yÖÉ]sñ;žAÆ·\a\x1a3\x0f4æÚ^[c^•	XO†"DønØ•­Â𭰐t€\a\x1a$Î\x15g”9ãÌì'\x10£\x03„"_sÔ¡Ì\vÎל0ÌÀî¨ÃDe.Ð\f{xñCyòA¼îÆç\fóºd3ô`à£;âûoÎ\aÔýÑ·ØÝñ\x1e\=\r˜\x03|¦÷çflqϱkw\x05}ª\x1eû€,!/È–ÿð\x02f\ảf<Cf-\0v€Iä³_–\a;d\x17q6\x02}lëæèc±³(báÆ^[\x1d¨ˆ]ˆòˆÈ# Á:\x13@ó§*±F󠑯’^[¢\x11WÃâwÓ‚Œg£‘<Êú\x1eÂçÞÝ\x05Ã3\x13äÊ\x12Á!M!¡¾›\x16#s7YdUì©*ù`•Àøý\x1a4\x0fãÝ¥ƒµçzÜk^xœ\x18äÏ\v!ùCTËÖYð\x19*댂 u–ŝ%‚\x0f\x15¶\x0eö)¤‰G­F½ò‚—Ênie_ì<¯w+5±Ýj\b¬T¦[åPºL\x1f)¸ñõ\x03uÅÊ\x11Ý5a5,¯ÅÛXn^[áY—7¨á\x16i \x11ݦ\v©re×
\x1c”¥`8Üõ‰\x13Fo¯ŠÙ(µ\x1fןgƒ­5Ê"xŒíˆóó G<^[`Üèá\x1aþ\x04…ž•\x11ŸIH\x14›>*¡;]íN§\x1e\r£–mk\v\0RÊ&
J±ðš\x1c\x0e«,&‹‹‚Yvž‡bZ#†§ó<÷r-æ\x06õwCÔõt¶ø,p’õm\x1ex›\aFyî‡^[n\x14\x02:Ýr÷¸#\x1e•ÛåÐ\x18Ð\x16ÊU\x11‘i:\x02xž\x17Œ\x02…k1ßã'¶Ý(1\vÒó¡îÃ區Ü\x7fÂÈmÎ,\0±›rN\x13VŸå\x7f{\rû\f}^ä\ÒÇøX‡â6F\x17¿6“FKÀŸß\x12üg1š3ã—lúœ?d›\x19\x05ôèß ég×D\0}Þ\x1fx½#þãÆ\x11ý%2WÅbÀ>ׯ¹B‚€>ãGSï\x15\x02‚Œo\x03Àm\0ø‰\x05\0\x18\x14[&|s\Æ\x7f•³ 80Íö}Â\x01ZÍ4j,(Õ\x0fe\x1d™ó£#Äçˆ\x17\0Ò\aCE°—¹B†cI†=Ô\x1c22ߨ\x16ÑaݤG‡\x0eg¤/ v —¨à\x01eþfÌ	ºLÄOî âGXE¸ê\x11©zDª\x1eoë&ºFtÀ¹6¼\x04T|Ãøâªuñ\x01f‚óœ\x11\x06w\8â1¦{ÈôëÉí\x17Rôÿ}Ìm0ú\x7f\x15ŒÐ>>L8ªµ:]±ÒmD­Eºír³sXïŠG­çB[l\bÏ„ÆtLº²;\x15Ùrh\x0eï\x19¸\x10†Âq|q\x11,\x12êÞ?”=°C…w£\x1a4KyPB\x1f»þš$+cËR\r‡þ³¢Cö)xüæs\x05¾ò~\r#\x05\x18«\x0eŽ7ŠŽyR\x7f°€˜‡\¢b\x1e”]³b‚\x1a\x1f!Ø¡Œ ŠÅ.—\x02ê»a<sU¶øx6ÁùvÅt^[¤~b+&\x1a*\0 ÄÃòÑ‚VKA–\v	8ˆŸˆ›\vŽ1\x1cƒþØÞÕýF\x03ñ{忈"!\x15è¶[î¸\aN< Ø“*\x01íu·œ\x10 *$Y5Rº›n²Àéþù›ñçØ±“ì’½\x17l	”f=þŠ=\x1föø7{‹\x15U\x1d¢Ð1ñ}*\x16¿ÀƒÓ»x¢\vèƒ+À\a,€³)Ç\x16 L)Fo].k€T‚„Yx`ê6\x19­)+jtAÊä\x1dÄ.\x0157çh• ”hÄ–ƒß	´jÆpÌ…R¼þ›UC\x0eÊy£¸ß¦Gl\x01ÁaÅ\x16:ï³üÌcÊ8S§¯ÙÉz6À$\x13®›\x1e·I=À»ú\r‹A\x1dÿÔÝ(y¨ef9sª\v(Ê›3ȺŸRÖi‹,ê\x15x˜YÝß}¡—ÍîÎ\x03nKm>[0\x7f#~+¸×<3³ïä?@ɘ‹ÀkŸ^[A;ç>\x12ô’0sáóÓñIº­˜Ó¹<õ©·Pþׂ!0`œ!„±ðŸ\0Õcˆ
,Å{\x06T\x13Qñq•\x7fã§Zˆ:X—ë¦ölê•õ\x05\x06Ó1Ø&)\x19°^[1`Êðù¶)šÜŸMŠ™qŽ“ê}¥Š\x1cÿ\x03\x1c(Õ»K• 3~J™1Ø>R“añR´.·¬èÚÖs^[LLšÌ¯/gWïÏçç\x17ïn\x16çog\x17×\vAà0¡Z6”C\´­(_=Ô¬\x1a,\x15Z†•—í8--sŽ‹z-c«ÃÚòÖ5Ôô²\x015Dõ²Ü›fm\x18Oo<¢êyôpË\x05Ctôðäé2‚‰‘*Ĉ\af‰0—å:i\x1e™¯£ÇÑôä÷§Ïø$åöWoÅÑ
$ü&Ê¿Wņ\x01Øjó_‚"*Ñ\x10­\b	h›¼·¼9âÁˆKàï«óÅlø\x1aH+{þw\x17 Uª}'w·P\x1d0»{\x15"û\x13%Ûæ\x16Ô¶"Mº¯³`¾1¶v±\x18ïÞ.üØ·¹\vY\x0e«õ°\x16Š7yf˜Éì'ÄQ)ó&ßûÐ’Žä®»¼rô\x0e°Ík\x14\x1dô˜ Ç\f±}GÞêí°q1@\x17¨.\x7f]Ïæ\v´%{l\3ûN6.#}uñöòÍláõ’72u[¶6\x16\x17c\x16÷íß\x1fîbé/\x11™\0/3æ«tóOÕÍÏ!Ï\bì\x1cKñqsø˜µ¢MP/nìzLZÈô?큊æ\x18ì]½#—‹öàïddwdïr4ÇçîFɁ¹\aæ>\x06sǬrY÷8.\x1dd»söîÕÕ‡ËE¯0°	v\x12\aЦóÖ”™k\x7f€÷×	ûþ\x01`rý\x7f\x05è\x19bµANÆq\x1e/·«ôÑ\0Žû‡¤ÎÖ)\x14.å”àˆb Gü\x13\x11\0\ažbgÄžØÆ``"&Ћս$‡G$çhê¹	/Ü¢\x17äˆ7\x11\x1f«è\x02xi\fC\x14à\x11e'½ G4HA.€ÉqÉ0Œîåf}g–\x11·È\x19¼è±‚\x17\x16ä\x14MÕ]Š \a:Ùwø‡}Ÿo¿ ƒ^[Ì/¶j‡•©È\x11ŸR|^[©(n÷=M\x19n\rGsÁ§¸¥\x03¶¹¯ñ™&Ï89½Øì\x1f<ùá6мÞ0rqÛï.Á\0V§u™@\x0f\x18\x12ëÃ¥U£úŽ¢\x17\x1aÏe·û<Ø®\x1d\x0f‡Çzè\b=Þ6qO›ò^5¾¼—}çsžx\x1c·¦¼$oªR6\x1e\x1eé‡s¹xÅ6y²¼•äðHÉ-o-Oãk5te͆nž7§\x19í€c\v(Vµo1úˆ2ÉaèÜ^[
ž\x05\v,NÖ\x0e¢v:êš\aÆmr¾-ÄÿŸF†Zj\aÆ”\0W\x05Å\x14\x13Á^£	[X\v|č-\rû~v…›9Èô$\x01QlQ³•ô\x1f…š÷\x19ã¼²Õ	Š®xŠLœKZÚE¥à®xy“	êfŸ\x1aù\x01Ù_êÇ\x02×ΧFk-Vq\x02ÅNÁgé¸u’M\x17ŸOíK÷\f\x12Iaò›Ž¥`æÆÍDò\x06\x18?­S´îO\x16Öz“^[Ì\x0egËmÎ?\x02†¾B\x05Q\x16\x0eo\x1dã¨GOŒ\x04|t—\x10\x13¦Ë]RøaÕ,\x10/Ávà=Gå*ÜF\rN\x11,ö¨\x17&í\x18\x01>•\x12<93l„\x04gِp¯ñ“â9®\x1fÚ\x15+Ök\aÎTÁÑ¢\fU\x1c;š\x19ñ_œš6‰Vò\x15ØS&ù2'¡
6Û¢n\x01Uݲª©íÂ\x17^[ÑϧT?ï5Z\x1eð‡è…vn7-\x18R¾.Þ‚\x1fPaWÅH€A£`Ò¿$\x0eUË\x03yÔ\x1d\x06Òµœ¸³\x14âZ6›\x15F€´VQ¤\f«_yüGàqÐß-;Q!yQ\x13SmÖ3…µGc.\x18!#\x7f	)¤B
)¤B
)¤B
)¤B
)¤B
)¤ñÒ\x7fõ]P&\0 \0\0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bluez-devel] Fwd: reduce hci connect time
  2004-09-03 16:58 [Bluez-devel] Fwd: reduce hci connect time murdok
@ 2004-09-06  8:29 ` Marcel Holtmann
  2004-09-06  8:58   ` Arnaud Mouiche
  0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2004-09-06  8:29 UTC (permalink / raw)
  To: murdok; +Cc: bluez-devel

Hi Murdok,

> I'm trying to reduce the time of HCI connect using the clock offset in the
> hcitool create connection command.
> So I modified hcitool.c (present in attach) adding the clkoffset parameter
> on hci_create_connection:
> 
>  if (hci_create_connection(dd, &bdaddr, htobs(ptype), clkoffset , role,
> &handle, 25000) < 0)
>                 perror("Can't create connection");
> 
> and change the code for insert that in the command with this syntax:
> 
> hcitool cc --clkos <clkoffset-in-decimal> <BDADDR>;
> 
> then I add a printf into hcitool inq for print the clkoffset in decimal
> and try to insert this in the connection command, b
> ut the time of connect do not change!
> 
> Later, during other test I take a mistake using a wrong clockoffset in the
> connect command and the time of the connection w
> as redused under 100 ms (with the slave in continuos page scan mode).
> 
> So I write a little bash script for test and I find a stange class of value
> to reduce this time of connection, but I can't
> understanding the logic.
> 
> Where I mistake?
> Why if I insert the same value returned from hci inqiry the connection do
> not reduce its time?
> There is a bug in the code or I wrong using some function?
> 
> In attach you can find:
> the hcitool.c code (modified)
> a dump with a hci inquiry, and an hci connect with the same value of
>  clokoffset bash script for trying a lot value of clkoffset

check the specification on how to modify the clock offset for making it
a valid value for the create connection command.

Your patch is not really needed, because there is no need to use the
"hcitool cc ..." command. I wrote it many times that this is only a
command for debugging and not for normal use. The kernel has its own
inquiry cache and it uses the clock offset for every connection created
through by the kernel.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bluez-devel] Fwd: reduce hci connect time
  2004-09-06  8:29 ` Marcel Holtmann
@ 2004-09-06  8:58   ` Arnaud Mouiche
  0 siblings, 0 replies; 3+ messages in thread
From: Arnaud Mouiche @ 2004-09-06  8:58 UTC (permalink / raw)
  To: murdok; +Cc: bluez-devel

At 10:29 06/09/2004, Marcel Holtmann wrote:
>Hi Murdok,
>
> > I'm trying to reduce the time of HCI connect using the clock offset in the
> > hcitool create connection command.
> > So I modified hcitool.c (present in attach) adding the clkoffset parameter
> > on hci_create_connection:
> >
> >  if (hci_create_connection(dd, &bdaddr, htobs(ptype), clkoffset , role,
> > &handle, 25000) < 0)
> >                 perror("Can't create connection");
> >
> > and change the code for insert that in the command with this syntax:
> >
> > hcitool cc --clkos <clkoffset-in-decimal> <BDADDR>;
> >
> > then I add a printf into hcitool inq for print the clkoffset in decimal
> > and try to insert this in the connection command, b
> > ut the time of connect do not change!
> >
> > Later, during other test I take a mistake using a wrong clockoffset in the
> > connect command and the time of the connection w
> > as redused under 100 ms (with the slave in continuos page scan mode).
> >
> > So I write a little bash script for test and I find a stange class of value
> > to reduce this time of connection, but I can't
> > understanding the logic.
> >
> > Where I mistake?
> > Why if I insert the same value returned from hci inqiry the connection do
> > not reduce its time?
> > There is a bug in the code or I wrong using some function?
> >
> > In attach you can find:
> > the hcitool.c code (modified)
> > a dump with a hci inquiry, and an hci connect with the same value of
> >  clokoffset bash script for trying a lot value of clkoffset
>
>check the specification on how to modify the clock offset for making it
>a valid value for the create connection command.
>
>Your patch is not really needed, because there is no need to use the
>"hcitool cc ..." command. I wrote it many times that this is only a
>command for debugging and not for normal use. The kernel has its own
>inquiry cache and it uses the clock offset for every connection created
>through by the kernel.
>
>Regards
>
>Marcel

Hi murdok

The page scan repetition mode is also an important information for create 
connection, to help the connection. I don't know if the information is 
cached by inquiry result and/or if it is used corretly in 
HCI_CREAT_CONNECTION HCI command.

May be you can check this and see if it helps in your situation.

arnaud




>-------------------------------------------------------
>This SF.Net email is sponsored by BEA Weblogic Workshop
>FREE Java Enterprise J2EE developer tools!
>Get your free copy of BEA WebLogic Workshop 8.1 today.
>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
>_______________________________________________
>Bluez-devel mailing list
>Bluez-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/bluez-devel



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-09-06  8:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-03 16:58 [Bluez-devel] Fwd: reduce hci connect time murdok
2004-09-06  8:29 ` Marcel Holtmann
2004-09-06  8:58   ` Arnaud Mouiche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox