[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bluetooth-dev] HCI Emulation



Hi Folks,

For those who interested in fancy HCI Emulation.

BlueZ-1.1-pre1 (just released) includes HCI Emulation daemon (hciemud). 
Daemon supports essential HCI commands and events and multiple connections over TCP.
It's 100% user-space implementation so testing and hacking is easy.

BD address is specified using "hostname:port" notation (e.g. localhost:10).

Some traces from my machines:

ultrablue:/>uname -a
Linux ultrablue.qualcomm.com 2.4.7-pre8 #4 Thu Jul 19 11:00:15 UTC 2001 sparc64 unknown

ultrablue:/>hciemud
hcid - HCI Emulation daemon ver 1.0
Usage: 
         hciemud [-n] local_address

ultrablue:/>hciemud ultrablue:4000     
ultrablue:/>hciemud ultrablue:5000
ultrablue:/>hciconfig hci0 up
ultrablue:/>hciconfig hci1 up
ultrablue:/>hciconfig 
hci0:   Type: VHCI
         BD Address: 81:2E:E0:7C:0F:A0 ACL MTU: 1000:20  SCO: MTU 0:0
         UP RUNNING NORMAL PSCAN ISCAN 
         RX bytes:0 acl:191933 sco:0 events:30 errors:0
         TX bytes:2409 acl:74 sco:0 commands:12 errors:0

hci1:   Type: VHCI
         BD Address: 81:2E:E0:7C:13:88 ACL MTU: 1000:20  SCO: MTU 0:0
         UP RUNNING NORMAL PSCAN ISCAN 
         RX bytes:0 acl:4 sco:0 events:4296 errors:0
         TX bytes:29173492 acl:42843 sco:0 commands:10 errors:0

btdemo1:/>uname -a
Linux btdemo1.qualcomm.com 2.4.7-pre9 #3 Fri Jul 20 12:19:15 PDT 2001 i686 unknown

btdemo1:/>hciemud 129.46.225.113:4000
btdemo1:/>hciconfig hci0 up
btdemo1:/>hciconfig 
hci0:   Type: VHCI
         BD Address: 81:2E:E1:71:0F:A0 ACL MTU: 1000:20  SCO: MTU 0:0
         UP RUNNING NORMAL PSCAN ISCAN 
         RX bytes:0 acl:0 sco:0 events:8 errors:0
         TX bytes:39 acl:0 sco:0 commands:8 errors:0 

btdemo1:/>l2ping 81:2E:E0:7C:0F:A0 
Ping: 81:2E:E0:7C:0F:A0 from 81:2E:E1:71:0F:A0 (data size 20) ...
20 bytes from 81:2E:E0:7C:0F:A0 id 200 time 1.48ms
20 bytes from 81:2E:E0:7C:0F:A0 id 201 time 1.48ms
20 bytes from 81:2E:E0:7C:0F:A0 id 202 time 1.47ms
3 sent, 3 received, 0% loss

btdemo1:/usr/src/bluez/tools>./l2test -r -b 2000000
l2test[3422]: Waiting for connection on psm 10 ...
l2test[3427]: Connect from 81:2E:E0:7C:13:88 [imtu 672, omtu 672, flush_to 65535]
l2test[3427]: Receiving ...
l2test[3427]: 2000544 bytes in 0.01m speed 2405.21 kb

ultrablue:/>/usr/src/bluez/tools/l2test -S 81:2E:E0:7C:13:88 -s 81:2E:E1:71:0F:A0
l2test[6962]: Connected [imtu 672, omtu 672, flush_to 65535]
l2test[6962]: Sending ...

btdemo1:/>hciconfig hci0 conn
hci0:   Type: VHCI
         BD Address: 81:2E:E1:71:0F:A0 ACL MTU: 1000:20  SCO: MTU 0:0
         Connections:
                 81:2E:E0:7C:0F:A0 handle 2
                 81:2E:E0:7C:13:88 handle 1

All the best
Max

Maksim Krasnyanskiy	
Senior Kernel Engineer
Qualcomm Incorporated

maxk@xxxxxxx.com
http://bluez.sf.net
http://vtun.sf.net

-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com