Smart Bluetooth Forum Discussions
I need to write some code at the Android NDK level to access some Bluetooth features that aren't exposed at the Java level. For example, I want to have a 2nd bluetooth adapter on my Android device and listen for other devices in range. I know that the Bluedroid stack in the Android OS comes from Broadcom, so I hope I'm in the right place. I've tried to follow some of the code that's in the AOSP distribution, but there's not much documentation, and I'm having trouble making much progress. I think that I want to get to the point where I can call a userial_read() API, but it seems like there's a lot of bootstrapping that I need to do first in my code. I was looking at the bte_main.c code, and trying to use that as a model. But, I'm not sure if that's the right way to go. What's the right place to look for documentation? Is there any sample bluedroid C code that I should use as a model? Thanks!
Show LessHi, I am sure this question will be a simple one however I cant find an answer despite much searching. We are doing a design based on the BCM20732I . We can get this part from Mouser but we need to verify that it contains the iDevices stack. Is that correct?
Also what is the difference between the BCM20731I and BCM20732S? Our design is based on the Silicon Labs Sensor Puck and utilizes that source for the BT functionality. We are adding more sensors to our product but want to avoid any changes to the way the BT works and the extra effort. Our thinking is we just need the BCM20732I.
Hope someone can clear this up! Thank you!
Show LessCurrently we have fine timer interval defined as 250ms like below:
const BLE_PROFILE_CFG ir_sensor_cfg = {
/*.fine_timer_interval =*/250, // ms 12-1000
.......
For a test, we comment out our timer callback reg like below:
// bleprofile_regTimerCb(sensor_fine_timeout, sensor_timeout);
// bleprofile_StartTimer();
And we can observe the mini pulse every 250ms
Please check the red arrow, the small pulse means the 250ms fine timer is still counting, if we change the fine_timer_interval = 0, the base current will move to 6mA. Seems not the correct way to disable it.
If we change the fine timer interval to 1000ms, the period will become 1 second, but we didn't use the fine timer now!
So please kindly tell us how to disable the fine timer in real to prevent the pulse.
Thanks.
Show LessHi everybody,
I encountered a problem with a generated GATT DB using the WICED Bluetooth Designer.
The GATT DB is only interpreted until one characteristic with descriptor is read. If I remove it from the GATT DB, all works fine.
This is the characteristic:
// ----- Characteristic 'Command Read from BLE'
#define HDLC_TTL_ENHANCEMENT_SERVICE_COMMAND_READ_FROM_BLE 0x0530
#define HDLC_TTL_ENHANCEMENT_SERVICE_COMMAND_READ_FROM_BLE_VALUE 0x0531
#define __UUID_TTL_ENHANCEMENT_SERVICE_COMMAND_READ_FROM_BLE 0x45, 0x4c, 0xdb, 0xc3, 0x17, 0x7f, 0x56, 0x82, 0x60, 0x40, 0xaa, 0x4d, 0x0a, 0x00, 0x00, 0x00
// Client Configuration
#define HDLD_TTL_ENHANCEMENT_SERVICE_COMMAND_READ_FROM_BLE_CLIENT_CONFIGURATION 0x0540
//<Name>Command Read from BLE</Name>
//<Uuid>45 4c db c3 17 7f 56 82 60 40 aa 4d 0a 00 00 00</Uuid>
CHARACTERISTIC_UUID128 (HDLC_TTL_ENHANCEMENT_SERVICE_COMMAND_READ_FROM_BLE,HDLC_TTL_ENHANCEMENT_SERVICE_COMMAND_READ_FROM_BLE_VALUE,
__UUID_TTL_ENHANCEMENT_SERVICE_COMMAND_READ_FROM_BLE,LEGATTDB_CHAR_PROP_WRITE_NO_RESPONSE | LEGATTDB_CHAR_PROP_NOTIFY,
LEGATTDB_PERM_WRITE_CMD | LEGATTDB_PERM_READABLE,5),0x00,0x00,0x00,0x00,0x00,
//<ClientConfiguration>
//<Notification>false</Notification>
//<Indication>false</Indication>
CHAR_DESCRIPTOR_UUID16_WRITABLE (HDLD_TTL_ENHANCEMENT_SERVICE_COMMAND_READ_FROM_BLE_CLIENT_CONFIGURATION,
UUID_DESCRIPTOR_CLIENT_CHARACTERISTIC_CONFIGURATION,
LEGATTDB_PERM_READABLE | LEGATTDB_PERM_WRITE_CMD | LEGATTDB_PERM_WRITE_REQ | LEGATTDB_PERM_RELIABLE_WRITE | LEGATTDB_PERM_AUTH_WRITABLE,2),
BIT16_TO_8 (CCC_NONE),
Best regards
Hannes Baumgart
Show LessHi,
I just found out about the BCM20706, and am very much looking forward to testing this!
However this will only make sense for us if there will be a version including the Antenna in the near future.
When, if ever can we expect this, as samples and then for production?
Where can we get access to the Smart Ready SDK?
Show LessHi,
I finally got around to spending a few days working with the BCM920737TAG3 board, and am starting to get the hang of it. I even managed to get 2.2.2 running.
However, one of my main requirements remains a baudrate of 4800.
I seem to have two options:
1) get it to work natively, even if this is not officially supported. (4800 UART Baudrate)
2) write a software uart, that would use one of the PWM outputs or the new bt_clock_based_timer for bitbanging TX and a timer combined with a pin interrupt for RX
as you can imagine, I'd prefer 1)
I spent many hours trying to get 1) to work, but have not yet managed.
tw_puart_init(GPIO_PIN_UART_RX, GPIO_PIN_UART_TX,4800);
P_UART_HIGH_BAUDRATE_DIV(0x44); //set the registers directly
P_UART_LOW_BAUDRATE_DIV(0xC8);
I tried using the functions I could find in puart.h (tw_puart_init() and puart_calculateBaudrate()), as well as using the two macros above to set the divisor registers directly. While this worked for almost any baudrate, I could not get 4800 to work. (P_UART would output at 26607 baud when set to 4800). Unfortunately, There is no obvious logic as to how "dhbr" and "dlbr" need to be calculated, or how they might be used by the internal hardware to actually genrate the output. It is obviously not just a 16 bit "divisor" for the clock that's split into two 8 bit registers, as I'm used to from other systems. I tested at least 40 different baudrates at known intervals, to see if I could find some patterns in the binary representation of the two registers, to no avail.
If someone from broadcom could give me some pointers in which direction to continue, or even better: provide an actual solution, that would be the best. getting some "real" documentation of the hardware would be great.
I have three more ideas before I start working on a software uart, but I can't figure out how to try them, as the documentation is lacking concerning these things:
a) Slow the entire CPU down from 24 to 12Mhz, and hope that 4800 baud will then work with the divisor settings of 9600 at 24Mhz.
as I will almost definitely need some lower power modes while the radio can be completely off, this might be interesting anyway - It would be great if I could get more info on this (eg what the lowest speed is at which Bluetooth will still work)
b) use a different clock for P_UART - I already figured out how to use the auxiliary clock for PWM, and how to configure that to use either the 24MHz or 1MHz as the reference to generate pretty much any frequency (pwm_tones app is great!). I could not find any (documented) methods of using one of the ACLK's for P_UART.
c) somehow manage to increase the sampling (constant P_UART_SAMPLE_CLOCK) from 16 to 32, which should get me down to 4800 baud with the settings for 9600 baud.
If anyone has some ideas for me, I'd be very happy to hear them!
Thanks already!
Show LessUnfortunately it looks like the SDK 2.2.2 hasn't solved the issue of random disconnect/reconnects that we were seeing with SDK 2.2.1 but not with SDK 2.2.0.
As mentioned before, when we build our custom application using the SDK 2.2.0 we get a battery life with a CR2032 of 72+ hrs with no random disconnect/reconnects, while with the SDK 2.2.1 we get a battery life of 62+ hrs with anywhere from 50 to 100 random disconnect/reconnects. With everything else being the same the random disconnect/reconnects seen with SDK 2.2.1 is the culprit for the reduction in battery life. The SDK 2.2.2 was supposed to solve that.
I used the (.7z) version to import the SDK 2.2.2 into the OSX Eclipse IDE. I built our custom application on our board and I am seeing the same behavior with the random disconnect/reconnects seen with SDK 2.2.1. The iPhone running our app to acquire the data is sitting right next to the board. The same board when built with SDK 2.2.0 exhibits no random disconnects/reconnects throughout the 72hr period. I also separately built the SDK 2.2.2 on a laptop running Windows 7 and built our custom application on a different board and immediately noticed the same behavior.
This is rather unfortunate and disappointing since we have resolved almost all other issues and were hoping to freeze the firmware. How do we resolve this ?
p.s.1 - The random disconnect/reconnects are not a reboot of the board, so the data index count is maintained
p.s.2 - Our custom application is a modified heart_rate_monitor with a fine timer set at 200 ms.
Show Less===
SDK: 2.1.1
Tag: 920737.
app: hello-sensor based customer app.
OTA firmware size ~ 20KB.
===
Problem:
We enable only 1-slave BT connection with client handset and also this slave device can
broadcast with ADV which includes some sensor values of device during connection was established. However we find sometimes when 2nd connection attempt with client,
sometimes it can let 2nd device to connect with client (why? coz it's 1 only configured) and also if disconnecting 2nd link, the ADV broadcast is gone at handset scan? I try this one hello-sensor example, it can get same failed result, any help?
What I modify is,
- in hello_sensor_connection_up(),
disable "stop adv" and call blecm_setAdvDuringConnEnable(TRUE) to
activate ADV during connection phase.
- in hello_sensor_create();
add 2 line below,
blecm_ConMuxInit(1);
//blecm_enableConMux(); //mark it coz we dont need multi-connection.
to sum up,
after configuration with only 1 slave connection ability and add with ADV during
BT-link, sometimes 2nd device can also be connected and after it disconnects,
ADV is gone. Don't know why.
ths,I want to know is there any tools or introductions for current test with 20732/6/7;I want to test our device's current comsumption,for example:how to set the device in stable RX/TX/sleep/Deep Sleep stably so I can get the right value
Show LessExcuse me,I was learning the blog about how to change BD_ADDR,here got some questions:
NO.1: In part1-1,it says that You can choose how to generate the lower 12 bits - either random or from a structured database I want to set my BD_ADDR increase 1 once a time, is there any way to do so.Or just I can set the rand between 0 and maximum.Which means that int(rand(20480)) and printf "00101801%04X" are the two ways correspond to random and structure database.
No.2: When converting cgs file to hex file, in the example,you use eeprom to save application, if I use series flash as external memory,should I replace the btp file 20737_EEPROM.btp to 20737_SFLASH.btp,and then which file should I replace the MINIDRIVER uart_DISABLE_EEPROM_WP_PIN1.hex,if I use different pin protect ,what can I do.
NO.3: Hex File and BD_ADDR and Descriptions in Development
It says that I can set DLConfigBD_ADDRBase to the desired value.I try to use Hello_sensor for testing and change the value as DLConfigBD_ADDRBase=20736A112345,after building and making target,the BD_ADDR didn't change,also I have tried set the value equal to random and it didn't work too.
Can you provide more detailed refference book,ths. Our target is set the BD_ADDR increase 1 once a time when mass production since we have apply enough BD_ADDR from IEEE .
Show Less