为什么我的BlueGiga BLE113不被发现?

时间:2014-10-09 00:35:41

标签: bluetooth bluegiga

我有一个像这样连接的BLE113芯片:

http://i.stack.imgur.com/bWj57.jpg

我测量了通过电线的电压,以确保电源进入BLE113电路板,并且恒定输入电压为3.3V(这是必需的)。

我使用Bluegiga网站上的BGDemo项目和http://edisonthk.wordpress.com/2014/01/18/getting-started-with-developing-bluetooth-4-0-le-and-android-with-ble112-bluetooth-module/

闪现了芯片。

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没有出现任何错误。我将芯片标记为可发现且可连接但我的蓝牙设备都没有发现芯片,为什么?

2 个答案:

答案 0 :(得分:1)

您是否已将<device type="ble113" />添加到project.xml(或project.bgproj)?

有关详细信息,请参阅Bluegiga's knowledge bas e文章。但一般来说,将BLE112项目(如bgdemo)转换为BLE113项目:

  • <device type="ble113" />添加到project.xml(或project.bgproj)
  • 从hardware.xml和BGScript源
  • 禁用/删除对USB的引用
  • 如果使用I2C,则使用硬件I2C引脚代替P1_6和P1_7

我不认为最后两个项目符号适用,因此请检查以确保项目文件中的设备类型正确(很可能名为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>

答案 1 :(得分:0)

在联系BlueGiga支持之后,他们回答了一个解决方案......遗憾的是BGDemo没有正确设置,但是当我用心率演示更新我的电路板时,它是完全可被发现的。

当连接到带有BLE的iPhone的LightBlue应用程序时,也会收到所有模拟的心脏信息。

然而,与BGDemo相比,心率演示的唯一区别是代码,所有项目文件几乎都是相同的。提醒我:BG支持部门解释说,应该使用start和length来调用addr,而不是像我在调用以下内容时那样使用它来开始和结束:

call attributes_write(xgatt_dis_2a25,0,6,addr(0:5))

因此,它应该是addr(0:6)。