个人主页:知孤云出岫
目录
配置蓝牙终端定位示例
业务需求
组网需求
数据规划
配置思路
配置注意事项
操作步骤
配置文件
配置蓝牙终端定位示例
组网图形
图1 配置蓝牙终端定位示例组网图
操作步骤
- 配置AC和定位服务器通信
# 配置Router,创建VLAN102,加入接口GE1/0/0,配置VLANIF102接口和AC互通。 <Router> system-view [Router] vlan 102 [Router-vlan102] quit [Router] interface gigabitethernet 1/0/0 [Router-GigabitEthernet1/0/0] port trunk allow-pass vlan 102 [Router-GigabitEthernet1/0/0] quit [Router] interface vlanif 102 [Router-Vlanif102] ip address 10.23.102.1 24 # 配置AC,创建VLAN102,加入接口GE0/0/2,配置VLANIF102接口和Router互通。 <AC> system-view [AC] vlan 102 [AC-vlan102] quit [AC] interface gigabitethernet 0/0/2 [AC-GigabitEthernet0/0/2] port trunk allow-pass vlan 102 [AC-GigabitEthernet0/0/2] quit [AC] interface vlanif 102 [AC-Vlanif102] ip address 10.23.102.2 24 [AC-Vlanif102] quit # 在AC上创建一条到定位服务器的静态路由,下一跳指向Router。 [AC] ip route-static 10.23.103.1 32 10.23.102.1 # 在AC上执行ping操作,目的地址是定位服务器,可以ping通表示网络正常互通。 [AC] ping 10.23.103.1PING 10.23.102.2: 56 data bytes, press CTRL_C to breakReply from 10.23.103.1: bytes=56 Sequence=1 ttl=255 time=1 ms
- 配置AC设备与定位服务器通信
# 配置AC的SNMP协议版本。[AC] snmp-agent sys-info version v2c # 配置读团体名为public123,写团体名为private123。[AC] snmp-agent community read public123 [AC] snmp-agent community write private123
- 在AC上查看WLAN网络的基本配置
检查项
命令
数据
查看AP所属的AP组
display ap all
AP组:ap-group1
AP name:AP1,AP2,AP3,...
- 如果AP组和单个AP下都有配置,则单个AP下的配置优先生效。
- 对于新创建的模板,用户配置完成后,需要将此模板引用到AP或者AP组,才能最终生效。
- 配置蓝牙终端定位功能
# 创建名为“wlan-ble”的BLE模板,开启蓝牙监控功能,可以接收周边的蓝牙基站信息,配置蓝牙Tag定位信息上报的目的地和端口号。 [AC] wlan [AC-wlan-view] ble-profile name wlan-ble [AC-wlan-ble-prof-wlan-ble] sniffer enable ibeacon-mode [AC-wlan-ble-prof-wlan-ble] report enable [AC-wlan-ble-prof-wlan-ble] report-to-server ip-address 10.23.102.1 port 10001 via-ac ac-port 32180 [AC-wlan-ble-prof-wlan-ble] quit # 将AP覆盖范围内的BLE基站添加到监控列表中。 [AC-wlan-view] ble monitoring-list mac 1234-1234-1000 to 1234-1234-1002 # 配置AP组引用BLE模板。 [AC-wlan-view] ap-group name ap-group1 [AC-wlan-ap-group-ap-group1] ble-profile wlan-ble [AC-wlan-ap-group-ap-group1] quit
- 配置定位服务器
- 验证配置结果
# AP获取到BLE基站信息后,通过执行命令display wlan ble site-info { all | mac-address mac-address },可以查看AP获取到的BLE基站信息。
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#dddddd">[AC-wlan-view] <strong id="ZH-CN_TASK_0176912533__b987943675190923">display wlan ble site-info all</strong> ------------------------------------------------------------------------------------------------------------------------------------ --------------- Index MAC Host AP ID Host AP name RSSI Power Type DetachedFlag Aging-Timeout(m) Broadcast count Advertisement d ata ------------------------------------------------------------------------------------------------------------------------------------ --------------- 0 0000-0101-0202 0 area_1 -30 50% ibeacon N 57 10 02-02-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-fa 1 0000-0101-0303 0 area_1 -31 51% ibeacon N 57 12 01-02-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-fa 2 0000-0101-0505 0 area_1 -33 55% ibeacon N 57 22 03-02-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-fa ------------------------------------------------------------------------------------------------------------------------------------ --------------- Total: 3</span></span></span>
# 用户的蓝牙终端接入WLAN网络并开启蓝牙功能后,安装第三方的APP,APP上可以显示自己在地图上的位置,同时收到附近的导购信息。
配置文件
-
Router的配置文件 # vlan batch 101 to 102 # interface Vlanif102ip address 10.23.102.1 255.255.255.0 # interface GigabitEthernet1/0/0port link-type trunkport trunk allow-pass vlan 101 to 102 # return AC的配置文件# vlan batch 100 to 102 # interface Vlanif102ip address 10.23.102.2 255.255.255.0 # interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 101 to 102 # ip route-static 10.23.103.1 255.255.255.255 10.23.102.1 #snmp-agent local-engineid 800007DB030200000000E0snmp-agent community read %^%#sP6,%Hno.$v[Lf#fiyP(eKm4)vNP*Q"mA~'$XjP4r}XXU4f%'&y>D`/1.5\Clr]I5mUJ46!a7'9p#*o2%^%#snmp-agent community write %^%#/.U;L9&iwS.dF15y]J"N\XU='K:YkWj/O.)=6W$3q{M1J4.<X"\h{a:p)c\;TBL\=qn=u+7YR~L/#`V>%^%#snmp-agent sys-info version v2csnmp-agent # wlanble-profile name wlan-blesniffer enable ibeacon-modereport-to-server ip-address 10.23.102.1 port 10001 via-ac ac-port 32180report enableble monitoring-list mac 1234-1234-1000ble monitoring-list mac 1234-1234-1001ble monitoring-list mac 1234-1234-1002ap-group name ap-group1ble-profile wlan-ble # return