* [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\0y8A\0\x03ì\_s\x1aÉvÇweïBêîÖM*©ü©[ÕËÚ2È\b\x01úçöb\x18 Ê\b´ìõÊ®¹ÃÌ ¦<Ì Aî®ó\x05OTå\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Û,Bbi:³ê]Wþ3}}õåZO3Öz=H<©r¹âz®X)\x14s^[ûÅÍJ"¡r7\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ñú·gU\x16>öf°Ø@\x16¬ê¤fêÎP2\fdß\x0e8!kZ§{Lvʨ;Ðl\x1cã©%\r \ö-U%¶ÙwÞHºC.Í1%Xª¢Ù¥õÆJ4H²\x06\x18Ö¿¤86\x14Õ"Î@%j\rmböéÍAó\x1c¨jI:9\x1a÷tM\x06\rʪa«ä\µlÍ4HH6å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ó<¶ÍV4êõ.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غEt[ ÏÖq7Èr»ÞÁnq²¡µ7¥MdÔ\x14\x18[´\x06ª6J"´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Òú²áLTË2¦zˤ\0\rQI3íkÙ\x02ô)I.í5di_%k¦<Í\x01É6¬ûÔ).êhð^Ó)Ñzn¼Yó®&[ú\x15`Zg\x14\× õ\x02k\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È÷¬z7{»Ó±Kbä\x1f¿þâZ¤èt¦ Z\x05\x10§[\x15[·2Jµ&ËN'âqKuÆ ¿\x1c¶ëI\x05è7\x05EÙ\f3-!>\x02«vú©äKçMß\x06è\x01ê\x19ÒPõkùÌÞN\f^[W¥0¥¶sq{DK=#+²¾sµêeEÖ \bYêKZ\0»õ¡°i"Ë˼[¼ÙR\0Öý2%ëÀe(éº)§ò9\0"[û½jöSÐO<òïô4¼\b\b\x1d\x1fEV*YU`KHÈP\x1dÖe\x125\x13W/4'ÇË·0cúê\x1e£Ä\x05ÚaT:*c<\x04z>4s¯\0^[1Á\x18^[\x1aõN×a\x14/D80s:\x1dªù\aAý^\x150\x11Ç\x041¥r;\x04w\x01åÑ£\fáñ2¿¸gF²¶º7mG\x13DØß\0Ò0pÃ\a
&§\x0e½ÐÙ\x18´#\x1fs>ÜM"Iîùt\x043R*Aðlzó)VkZSi±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+Û6oS4(vi¼Âx\x7f\x1c¨ú(ç2 oÁ+¿Kþ÷6ñÖ¢L±È\x05^[\x01D<yá¶\bBÁõK\aÊàrgrâä¡4\x15tP¼f1]ÁO§§^[;tr¦\x12À\0x\x0e@i¿Ñ\x1cyUØ=$ Ò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\x03qD4CØ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¼Æ\x1fOÁ¢d³Yî¾è|R^äçèÍ*ª\v"\x0eóV*12¡Ì\x19í\x13O\x04D×û\x12,Qlt\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â\x0fdÁÉü?\x02eQD`\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òèw4Ö$6^[\x10¾7ÄêÐ\x1eù¸\x01m\x10ï¯Bq6a,]Àê²a\x10z\x05A©\0»l{á0I5=\x1fLzNv\x11
w\x01°»
WÁAßpÅá\r4\x14\x16â(3Y-ñÕ\x1dJ8'|\x023~Zm\x17ÌüÃX{q¢aÎ
= C°\x06ä«ì\x01ß,\x02ú.øÁÏ\x02c\x02¥¬·¾½KvüIWí§³¼³°I\x13\x16ì¹àÂ;\x17w« òV\x10¥\x1eî±\x0e]Qg, ûæ\x02²^ÐT³½ÊÛ\x16\x7f\x17¯\x1aCåü\x16PØ\x06_MnÍôU ,VµOhY`ûÍ=Ëåß;Q[ñ\x11v|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`æ²zr§U\x06Ô\x06¼ö¥Dícöì¢eG¯\x1d
°L\x058ê¾8\x12ÄÃrçiaåE.\x0fÍÜ\a\x0eìW3j¦\x1fÖi@E<rM¨g*Å)¸à¾õ[¢ê¶
\x14~¤RâR¢¼)rOA¨ ù¹Û*)ÃÀT\è\x137c\x1eîyÔBcÙKû_\x13j\x15Éth\vë2íÒUè2'fèSKn?A$\x1aGä\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}\x18ZxÜ\x11ڢЬ
UÑ\x7f\x1e/§¦s2uTC\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!ï=°õ~ÝËî}?=çà¼]\x02P\x7f;
*iy\x12wÝx\x04\x16ægª@gÃhL\x1eAÃ\x14÷ôÄX´É±¼[¶Ui ßÖ»â~¹Þ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ÁÐÿÅqOsCb9×!FX,2g\x15¸ó[ñõxí³\bÞ3Mü±\x04?ù©L/hfÌ<ç\x11eêªwfq"E?:âTúÓD03öbeò<3+GO¬çh(CiøM\x0fÕhß%w!\b´ÀVWX\x1e
?dma>£\fÖá½Irùb®PÌ\x17s^[ÅÜf1·5Qu\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É×$Gtíí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$Î\x15g9ãÌì'\x10£\x03"_sÔ¡Ì\vÎ×0ÌÀî¨ÃDe.Ð\f{xñCyòA¼îÆç\fóºd3ô`à£;âûoÎ\aÔýÑ·ØÝñ\x1e\=\r\x03|¦÷çflqϱkw\x05}ª\x1eû,!/Èÿð\x02f\aÌf<Cf-\0vIä³_\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ö)¤GF½òÊnie_ì<¯w+5±Ýj\b¬T¦[åPºL\x1f)¸ñõ\x03uÅÊ\x11Ý5a5,¯ÅÛXn^[áY7¨á\x16i \x11ݦ\v©re×
\x1c¥`8Üõ\x13Fo¯Ù(µ\x1f×g5Ê"xíóó G<^[`Üèá\x1aþ\x04
\x11IH\x14>*¡;]íN§\x1e\r£mk\v\0RÊ&
J±ð\x1c\x0e«,&YvbZ#§ó<÷r-æ\x06õwCÔõt¶ø,põm\x1ex\aFyî^[n\x14\x02:Ýr÷¸#\x1eÛåÃ\x18Ð\x16ÊU\x11i:\x02x\x17\x02
k1ßã'¶Ý(1\vÒó¡îÃåÜ\x7fÂÈmÎ,\0±rN\x13Vå\x7f{\rû\f}^ä\ÒÇøXâ6F\x17¿6FKÀß\x12üg13ãlú?d\x19\x05ôèß ég×D\0}Þ\x1fx½#þãÆ\x11ý%2WÅbÃ>ׯ¹B>ãGSï\x15\x02o\x03Àm\0ø\x05\0\x18\x14[&|s\Æ\x7f³ 80Íö}Â\x01ZÍ4j,(Õ\x0fe\x1dó£#Äç\x17\0Ò\aCE°¹BcI=Ô\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ªµ:]±ÒmDEºí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«\x0e7yR\x7f°\¢b\x1e]³b\x1a\x1f!Ø¡ Å.\x02ê»a<sU¶øx6ÁùvÅt^[¤~b+&\x1a*\0 ÄÃòÑVKA\v 8\v1\x1cþØÞÕýF\x03ñ{å¿"!\x15è¶[î¸\aN< Ø*\x01íu·\x10 *$Y5Rºn²ÀéþùñçØ±ì½\x17l f=þ=\x1föø7{\x15U\x1d¢Ð1ñ}*\x16¿ÀÓ»x¢\vè+À\a,³)Ç\x16 L)Fo].kTYx`ê6\x19)+jtAÊä\x1dÄ.\x0157çh hÄß ´jÆpÌ
R¼þUC\x0eÊy£¸ß¦Gl\x01ÁaÅ\x16:ï³üÌcÊ8S§¯ÙÉz6À$\x13®\x1e·I=À»ú\rA\x1dÿÔÝ(y¨ef9sª\v(Ê3ȺRÖi,ê\x15xYÝß}¡ÍîÎ\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`Êðù¶)ÜMqê}¥\x1cÿ\x03\x1c(Õ»K 3~J1Ø>RañR´.·¬èÚÖs^[LL̯/gWïÏçç\x17ïn\x16çog\x17×\vAà0¡Z6C\´(_=Ô¬\x1a,\x15Zí8--sz-c«ÃÚòÖ5Ôô²\x015Dõ²Üfm\x18Oo<¢êyôpË\x05Ctôðäé2*Ä\af0å: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«õ°\x167yfÉì'ÄQ)ó&ßûÐä®»¼rô\x0e°Ík\x14\x1dô Ç\f±}GÞêí°q1@\x17¨.\x7f]Ïæ\v´%{l\3ûN6.#}uñöòÍláõ72u[¶6\x16\x17c\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\abgÄØÆ``"&Õ½$G$çhê¹ /Ü¢\x17ä7\x11\x1f«è\x02xi\fC\x14à\x11e'½ G4HA.ÉqÉ0îåf}g\x11·È\x19¼è±\x17\x16ä\x14MÕ] \a:Ùwø}o¿ ^[Ì/¶j©È\x11R|^[©(n÷=M\x19n\rGsÁ§¸¥\x03¶¹¯ñ&Ï89½Øì\x1f<ùá6¼Þ0rqÛï.Á\0V§u@\x0f\x18\x12ëÃ¥U£ú¢\x17\x1aÏe·û<Ø®\x1dï\x0fÇzè\b=Þ6qOò^5¾¼}çsx\x1c·¦¼$oªR6\x1e\x1eés¹xÅ6y²¼äðHÉ-o-Oãk5teÍn7§\x19íc\v(Vµo1ú2ÉaèÜ^[
\x05\v,NÖ\x0e¢v:ê\aÆmr¾-ÄÿFZj\aÆ\0W\x05Å\x14\x13Á^£ [X\v|Ä-\rû~v
9Èô$\x01QlQ³ô\x1f
÷\x19ã¼²Õ ®xLKZÚE¥à®xy êf\x1aù\x01Ù_êÇ\x02×ΧFk-Vq\x02ÅNÁgé¸uM\x17Oí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ñ_6Vò\x15ØS&ù2'¡
6Û¢n\x01Uݲª©íÂ\x17^[ÑϧT?ï5Z\x1eðè
vn7-\x18R¾.Þ\x1fPaWÅHA£`Ò¿$\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