osdir.com
mailing list archive

Subject: Re: piconet.. - msg#00155

List: linux.bluez.devel

Date: Prev Next Index Thread: Prev Next Index
Hi Steffen,

> My source code for most of my BTserver can be found at:
> http://www.diku.dk/hjemmesider/studerende/zool/bt/prot.cc
> As you can see in my souce (see the listenL2CAP method), I do almost as you
> told me to do and what l2test.c is doing.
> I use the standard bind, listen and accept methods and spawns of a new
> child, when I get a connection. But I still can't make it work when I have
> more than one client (a piconet). Why is that? can you see a minor flaw in
> my code?
>
> I have made a hciconfig -a with one of my USB dongles (it is a DBT 120
> unit):
>
> hci0: Type: USB
> BD Address: 00:40:05:60:41:0D ACL MTU: 192:8 SCO MTU: 64:8
> UP RUNNING PSCAN ISCAN
> RX bytes:653 acl:0 sco:0 events:19 errors:0
> TX bytes:314 acl:0 sco:0 commands:18 errors:0
> Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
> Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
> Link policy: RSWITCH HOLD SNIFF PARK
> Link mode: SLAVE ACCEPT
> Name: 'fsck-0'
> Class: 0x000100
> Service Classes: Unspecified
> Device Class: Computer, Uncategorized
> HCI Ver: 1.1 (0x1) HCI Rev: 0x1bb LMP Ver: 1.1 (0x1) LMP Subver: 0x1bb
> Manufacturer: Cambridge Silicon Radio (10)
>
> I can only give you this one, because one of my friends have the other two
> dongles. I will though sent the output later tonight, when I get them back.
> :-)

so far so good, but check with "hciconfig hci0 revision" for the
firmware version. This one is too old. It should be HCI 16.4 or newer,
but if this is a DBT-120 Rev. B3 you might have a chance to update it.

> PS: It also seems like that the l2test works with more clients.. I really
> can't see the big difference in my code and l2test.. But mabye it is me..
> ;-)

I think you should use fork(). What is wrong with using poll() or
select() and an event loop.

And btw since you use code from l2test.c etc. you should include the GPL
license statement at the top of your code.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/


Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: piconet..

Hi Marcel and others, ;-) > > > > > PS. I belive that the PSM in the L2CAP layer can serve more than one > > > > > client or am I totally wrong? otherwise I should update the PSM > > > > > everytime a new client connect.. > > > > > > > > It can also serve multiple PSM on the same ACL link. > > > > > > Ok.. how do I do that? > > > > > > you call listen() and then accept() for every incoming connection. It is > > the same as for TCP/IP. > > Ok.. I am already doing this in my parent thread. So the problem must be > somewhere else. > I'll try to do the hciconfig -a in a brief moment and sent the output to the > list... :-) My source code for most of my BTserver can be found at: http://www.diku.dk/hjemmesider/studerende/zool/bt/prot.cc As you can see in my souce (see the listenL2CAP method), I do almost as you told me to do and what l2test.c is doing. I use the standard bind, listen and accept methods and spawns of a new child, when I get a connection. But I still can't make it work when I have more than one client (a piconet). Why is that? can you see a minor flaw in my code? I have made a hciconfig -a with one of my USB dongles (it is a DBT 120 unit): hci0: Type: USB BD Address: 00:40:05:60:41:0D ACL MTU: 192:8 SCO MTU: 64:8 UP RUNNING PSCAN ISCAN RX bytes:653 acl:0 sco:0 events:19 errors:0 TX bytes:314 acl:0 sco:0 commands:18 errors:0 Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: RSWITCH HOLD SNIFF PARK Link mode: SLAVE ACCEPT Name: 'fsck-0' Class: 0x000100 Service Classes: Unspecified Device Class: Computer, Uncategorized HCI Ver: 1.1 (0x1) HCI Rev: 0x1bb LMP Ver: 1.1 (0x1) LMP Subver: 0x1bb Manufacturer: Cambridge Silicon Radio (10) I can only give you this one, because one of my friends have the other two dongles. I will though sent the output later tonight, when I get them back. :-) PS: It also seems like that the l2test works with more clients.. I really can't see the big difference in my code and l2test.. But mabye it is me.. ;-) /Steffen Larsen ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/

Next Message by Date: click to view message preview

Re: piconet..

Hi again Marcel, > > My source code for most of my BTserver can be found at: > > http://www.diku.dk/hjemmesider/studerende/zool/bt/prot.cc > > As you can see in my souce (see the listenL2CAP method), I do almost as you > > told me to do and what l2test.c is doing. > > I use the standard bind, listen and accept methods and spawns of a new > > child, when I get a connection. But I still can't make it work when I have > > more than one client (a piconet). Why is that? can you see a minor flaw in > > my code? > > > > I have made a hciconfig -a with one of my USB dongles (it is a DBT 120 > > unit): > > > > hci0: Type: USB > > BD Address: 00:40:05:60:41:0D ACL MTU: 192:8 SCO MTU: 64:8 > > UP RUNNING PSCAN ISCAN > > RX bytes:653 acl:0 sco:0 events:19 errors:0 > > TX bytes:314 acl:0 sco:0 commands:18 errors:0 > > Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00 > > Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 > > Link policy: RSWITCH HOLD SNIFF PARK > > Link mode: SLAVE ACCEPT > > Name: 'fsck-0' > > Class: 0x000100 > > Service Classes: Unspecified > > Device Class: Computer, Uncategorized > > HCI Ver: 1.1 (0x1) HCI Rev: 0x1bb LMP Ver: 1.1 (0x1) LMP Subver: 0x1bb > > Manufacturer: Cambridge Silicon Radio (10) > > > > I can only give you this one, because one of my friends have the other two > > dongles. I will though sent the output later tonight, when I get them back. > > :-) I got the two others: hci0: Type: USB BD Address: 00:01:53:00:14:EE ACL MTU: 192:8 SCO MTU: 64:8 UP RUNNING PSCAN ISCAN RX bytes:81 acl:0 sco:0 events:10 errors:0 TX bytes:39 acl:0 sco:0 commands:10 errors:0 Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: Link mode: SLAVE ACCEPT Name: 'knoglen' Class: 0x000000 Service Classes: Unspecified Device Class: Miscellaneous, HCI Ver: 1.1 (0x1) HCI Rev: 0x20d LMP Ver: 1.1 (0x1) LMP Subver: 0x20d Manufacturer: Cambridge Silicon Radio (10) hci0: Type: USB BD Address: 00:01:53:00:0D:B5 ACL MTU: 192:8 SCO MTU: 64:8 UP RUNNING PSCAN ISCAN RX bytes:87 acl:0 sco:0 events:11 errors:0 TX bytes:39 acl:0 sco:0 commands:10 errors:0 Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: Link mode: SLAVE ACCEPT Name: 'JESPER' Class: 0x000000 Service Classes: Unspecified Device Class: Miscellaneous, HCI Ver: 1.1 (0x1) HCI Rev: 0x20d LMP Ver: 1.1 (0x1) LMP Subver: 0x20d Manufacturer: Cambridge Silicon Radio (10) > so far so good, but check with "hciconfig hci0 revision" for the > firmware version. This one is too old. It should be HCI 16.4 or newer, > but if this is a DBT-120 Rev. B3 you might have a chance to update it. Well. It is the B3 revision, so I would be able to do that. :-) > I think you should use fork(). What is wrong with using poll() or > select() and an event loop. Hmm.. This dosn't really answer my question. I am using fork()., and would like to get my application to work. I tried to compare it towards the l2test, but couldn't see that much difference. And the l2test works with the same dongles; connecting two clients against one server. Can you point somewhere in my code, where I should do some changes, so it could work?? I really starts to nag me, why my code dosn't work. All things works fine (like connecting/disconnecting etc.) with one clients, but with two... :-( And I have tried to make my server MASTER by setting the L2CAP_LM_MASTER in the link manager. > And btw since you use code from l2test.c etc. you should include the GPL > license statement at the top of your code. No worry.. I will. -Thanks again for a quick answer! :-) /Steffen Larsen ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/

Previous Message by Thread: click to view message preview

Re: piconet..

Hi Marcel and others, ;-) > > > > > PS. I belive that the PSM in the L2CAP layer can serve more than one > > > > > client or am I totally wrong? otherwise I should update the PSM > > > > > everytime a new client connect.. > > > > > > > > It can also serve multiple PSM on the same ACL link. > > > > > > Ok.. how do I do that? > > > > > > you call listen() and then accept() for every incoming connection. It is > > the same as for TCP/IP. > > Ok.. I am already doing this in my parent thread. So the problem must be > somewhere else. > I'll try to do the hciconfig -a in a brief moment and sent the output to the > list... :-) My source code for most of my BTserver can be found at: http://www.diku.dk/hjemmesider/studerende/zool/bt/prot.cc As you can see in my souce (see the listenL2CAP method), I do almost as you told me to do and what l2test.c is doing. I use the standard bind, listen and accept methods and spawns of a new child, when I get a connection. But I still can't make it work when I have more than one client (a piconet). Why is that? can you see a minor flaw in my code? I have made a hciconfig -a with one of my USB dongles (it is a DBT 120 unit): hci0: Type: USB BD Address: 00:40:05:60:41:0D ACL MTU: 192:8 SCO MTU: 64:8 UP RUNNING PSCAN ISCAN RX bytes:653 acl:0 sco:0 events:19 errors:0 TX bytes:314 acl:0 sco:0 commands:18 errors:0 Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: RSWITCH HOLD SNIFF PARK Link mode: SLAVE ACCEPT Name: 'fsck-0' Class: 0x000100 Service Classes: Unspecified Device Class: Computer, Uncategorized HCI Ver: 1.1 (0x1) HCI Rev: 0x1bb LMP Ver: 1.1 (0x1) LMP Subver: 0x1bb Manufacturer: Cambridge Silicon Radio (10) I can only give you this one, because one of my friends have the other two dongles. I will though sent the output later tonight, when I get them back. :-) PS: It also seems like that the l2test works with more clients.. I really can't see the big difference in my code and l2test.. But mabye it is me.. ;-) /Steffen Larsen ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/

Next Message by Thread: click to view message preview

Re: piconet..

Hi again Marcel, > > My source code for most of my BTserver can be found at: > > http://www.diku.dk/hjemmesider/studerende/zool/bt/prot.cc > > As you can see in my souce (see the listenL2CAP method), I do almost as you > > told me to do and what l2test.c is doing. > > I use the standard bind, listen and accept methods and spawns of a new > > child, when I get a connection. But I still can't make it work when I have > > more than one client (a piconet). Why is that? can you see a minor flaw in > > my code? > > > > I have made a hciconfig -a with one of my USB dongles (it is a DBT 120 > > unit): > > > > hci0: Type: USB > > BD Address: 00:40:05:60:41:0D ACL MTU: 192:8 SCO MTU: 64:8 > > UP RUNNING PSCAN ISCAN > > RX bytes:653 acl:0 sco:0 events:19 errors:0 > > TX bytes:314 acl:0 sco:0 commands:18 errors:0 > > Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00 > > Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 > > Link policy: RSWITCH HOLD SNIFF PARK > > Link mode: SLAVE ACCEPT > > Name: 'fsck-0' > > Class: 0x000100 > > Service Classes: Unspecified > > Device Class: Computer, Uncategorized > > HCI Ver: 1.1 (0x1) HCI Rev: 0x1bb LMP Ver: 1.1 (0x1) LMP Subver: 0x1bb > > Manufacturer: Cambridge Silicon Radio (10) > > > > I can only give you this one, because one of my friends have the other two > > dongles. I will though sent the output later tonight, when I get them back. > > :-) I got the two others: hci0: Type: USB BD Address: 00:01:53:00:14:EE ACL MTU: 192:8 SCO MTU: 64:8 UP RUNNING PSCAN ISCAN RX bytes:81 acl:0 sco:0 events:10 errors:0 TX bytes:39 acl:0 sco:0 commands:10 errors:0 Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: Link mode: SLAVE ACCEPT Name: 'knoglen' Class: 0x000000 Service Classes: Unspecified Device Class: Miscellaneous, HCI Ver: 1.1 (0x1) HCI Rev: 0x20d LMP Ver: 1.1 (0x1) LMP Subver: 0x20d Manufacturer: Cambridge Silicon Radio (10) hci0: Type: USB BD Address: 00:01:53:00:0D:B5 ACL MTU: 192:8 SCO MTU: 64:8 UP RUNNING PSCAN ISCAN RX bytes:87 acl:0 sco:0 events:11 errors:0 TX bytes:39 acl:0 sco:0 commands:10 errors:0 Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: Link mode: SLAVE ACCEPT Name: 'JESPER' Class: 0x000000 Service Classes: Unspecified Device Class: Miscellaneous, HCI Ver: 1.1 (0x1) HCI Rev: 0x20d LMP Ver: 1.1 (0x1) LMP Subver: 0x20d Manufacturer: Cambridge Silicon Radio (10) > so far so good, but check with "hciconfig hci0 revision" for the > firmware version. This one is too old. It should be HCI 16.4 or newer, > but if this is a DBT-120 Rev. B3 you might have a chance to update it. Well. It is the B3 revision, so I would be able to do that. :-) > I think you should use fork(). What is wrong with using poll() or > select() and an event loop. Hmm.. This dosn't really answer my question. I am using fork()., and would like to get my application to work. I tried to compare it towards the l2test, but couldn't see that much difference. And the l2test works with the same dongles; connecting two clients against one server. Can you point somewhere in my code, where I should do some changes, so it could work?? I really starts to nag me, why my code dosn't work. All things works fine (like connecting/disconnecting etc.) with one clients, but with two... :-( And I have tried to make my server MASTER by setting the L2CAP_LM_MASTER in the link manager. > And btw since you use code from l2test.c etc. you should include the GPL > license statement at the top of your code. No worry.. I will. -Thanks again for a quick answer! :-) /Steffen Larsen ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by