我有一个这样的BLE113芯片:
http://i.stack.imgur.com/bWj57.jpg
我已经测量了通过电线的电压,以确保电源进入BLE113板,并且恒定输入为3.3V (这是所需的)。
我使用在Bluegiga网站和http://edisonthk.wordpress.com/2014/01/18/getting-started-with-developing-bluetooth-4-0-le-and-android-with-ble112-bluetooth-module/上找到的BGDemo项目闪烁芯片
bgdemo脚本:
dim addr(6)
# Boot Event listener
event system_boot(major ,minor ,patch ,build ,ll_version ,protocol_version ,hw )
#Get local BT address
call system_address_get( )(addr(0:6))
# Write BT address to DI service serial number string
call attributes_write(xgatt_dis_2a25,0,6,addr(0:5))
#set to advertising mode
call gap_set_mode(gap_general_discoverable,gap_undirected_connectable)
#set bondable mode
call sm_set_bondable_mode(1)
end
# Disconnection event listener
event connection_disconnected(handle,result)
#connection disconnected, continue advertising
call gap_set_mode(gap_general_discoverable,gap_undirected_connectable)
end在bgbuild中没有出现错误。我把芯片标记为可发现的和可连接的,但我的蓝牙设备却没有发现芯片,为什么?
发布于 2014-10-19 17:42:56
在与BlueGiga支持部门联系后,他们给出了解决方案.不幸的是,BGDemo没有正确设置,但是当我用心率演示更新我的板时,它是完全可发现的。
当连接到LightBlue应用程序的iPhones与BLE,所有的模拟心脏信息也收到。
然而,与BGDemo相比,心率演示中唯一的区别是代码,所有的项目文件实际上都是相同的。提醒我: BG支持解释了应该用开始和长度来调用addr,而不是像我调用以下命令时那样使用它:
call attributes_write(xgatt_dis_2a25,0,6,addr(0:5))因此,它应该是addr(0:6)。
发布于 2014-10-09 16:09:47
您是否将<device type="ble113" />添加到project.xml (或project.bgproj)中?
有关更多信息,请参见布卢基加的知识基础e文章。但通常,要将BLE112项目(如bgdemo)转换为BLE113项目:
<device type="ble113" />添加到project.xml (或project.bgproj)中我不认为最后两个要点适用,所以请检查以确保您的项目文件中有正确的设备类型(最有可能命名为project.bgproj)。
示例:
<?xml version="1.0" encoding="UTF-8" ?>
<project>
<gatt in="gatt.xml" />
<hardware in="hardware.xml" />
<script in="bgdemo.bgs" />
<image out="out.hex" />
<device type="ble113" />
<boot fw="bootuart" />
</project>https://stackoverflow.com/questions/26268570
复制相似问题