2014-10-09 46 views
0

我有一个BLE113芯片有线像这样:为什么我的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上来。我将该芯片标记为可发现且可连接,但我的蓝牙设备都没有发现该芯片,为什么?

回答

0

接触这个BLUEGIGA支持后,他们一个解决方案作出回应......遗憾的是没有设置的BGDemo正确,但是当我更新我的心率演示板,用于例如,它是完全可发现的。

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

但是,心率演示与BGDemo相比的唯一区别在于代码,所有项目文件都几乎相同。提醒我:BG支持解释说,地址应当用开始和长度被调用,而不是开始和结束等我是如何使用它,当我称为以下各项:

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

因此,它应该是ADDR(0:6 )代替。

1

Did you add <device type="ble113" /> to project.xml(or project.bgproj)?

请参阅Bluegiga's knowledge bas e文章以获取更多信息。但在一般情况下,一个BLE112项目转换(如bgdemo)到BLE113项目:

  • 添加<device type="ble113" />到project.xml中(或project.bgproj)
  • 禁用/删除hardware.xml到USB引用和BGScript源
  • 使用硬件I2C引脚,而不是P1_6和P1_7如果I2C使用

我不认为最后两发子弹适用,因此请确保您有正确的设备类型在您的项目文件(最有可能命名为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> 
+0

如果我没有将设备类型设置为ble113,CCDebugger会向bgbuild发送一个错误。 在项目文件中,设备实际上设置为ble113,并且没有提及USB设置。 如何检查芯片是否使用l2c? – TristenHorton 2014-10-09 21:33:49

+0

从答案中的链接:硬件差异:USB与I2C 从硬件角度来看,BLE112的两个USB数据引脚(USB +和USB-)已换出用于I2C引脚(SDA和SCL)。这意味着BLE112软件I2C所需的P1_6和P1_7引脚不应该用于此目的,而应该使用专用硬件I2C引脚。利用这种差异不需要更改BGScript或BGAPI命令;它将被自动处理。 – forforf 2014-10-09 23:09:24

+0

另外,你有没有尝试过使用“find_me”项目而不是“bgdemo”项目? – forforf 2014-10-09 23:12:24