Smart Bluetooth Forum Discussions
Hi all,
I have the battery service working fine, but I would like to fine-tune it.
I invoke blebat_Init() in your application_create function, and then periodically invoke blebat_pollMonitor().
Then I tried to fine-tune blebat_batmon_cfg in blebat.c, but modifying the members of the blebat_batmon_cfg does not scale appropriately for our battery.
For a test, I changed:
/*.fullVoltage =*/ 3200, // millivolts. The nominal full battery voltage
/*.emptyVoltage =*/ 1800, // millivolts. The voltage at which the batteries are considered drained
/*.shutdownVoltage =*/ 1700, // millivolts. System should shutdown if it detects battery
To:
/*.fullVoltage =*/ 6100, // millivolts. The nominal full battery voltage
/*.emptyVoltage =*/ 2400, // millivolts. The voltage at which the batteries are considered drained
/*.shutdownVoltage =*/ 1700, // millivolts. System should shutdown if it detects battery
And then used a battery that's about 2.8 V but it says 72% in both cases. In the second case it should report a much lower %.
The big question is:
Is the new version of blebat.c really compiled, linked and loaded with the rest of the application?
In my case, I don't think that is happening. What am I doing wrong? I saved it, cleaned the project, rebuilt "all" and loaded it.
Please help.
Thanks,
Gil
Show LessHi
I am trying to interface InvenSense MPU9150 motion detector sensor with Tag3 board. I found difficulty when i tried to write 0 on one of register of sensor in order to start sensor. I am very new in I2C programming. I posted function below kindly look into this. Thanks
UINT8 sensor_app_writeSensor(UINT8 register_address, UINT8 data)
{
UINT8 read_status;
UINT8 return_value = 0;
UINT8 reg_data_bytes[2];
reg_data_bytes[0]= register_address;
reg_data_bytes[1] = data;
read_status = i2cm_write(reg_data_bytes, sizeof(reg_data_bytes), MPU9150_I2C_ADDRESS);
ble_trace1("read status=%d\n",MPU9150_PWR_MGMT_1);
switch(read_status)
{
case I2CM_BUSY:
// Transaction did not go through. ERROR. Handle this case.
ble_trace0("\ndone4.\n");
break;
case I2CM_SUCCESS:
// The read was successful.
ble_trace0("\ndone5.\n");
return_value = 1;
break;
case I2CM_OP_FAILED:
// No slave device with this address exists on the I2C bus. ERROR. Handle this.
ble_trace0("\ndone6.\n");
default:
break;
}
return return_value;
}
void motion_sensor_read_and_print_motion_data(void)
{ UINT8 return_value = 0;
INT8 motion_data;
INT16 gcd;
i2cm_init();
/* the default speed is 100kHz, it's not required the speed config. */
i2cm_setSpeed(I2CM_SPEED_400KHZ);
i2cm_setTransactionSpeed();
sensor_app_writeSensor(MPU9150_PWR_MGMT_1, 0);
ble_trace0("\nStarting new measurement.\n");
motion_data=sensor_app_readSensor(MPU9150_ACCEL_XOUT_L,MPU9150_ACCEL_XOUT_H);
ble_trace1("motion_sensor_read_motion_data returned %d\n",motion_data);
}
Show LessHi,
I'm testing speed_test demo app, the tag is 920737TAG-03, I use sdk WICED-Smart-SDK-2.2.1.
During TEST_NOTIFICATIONS, I get roughly an 2KB/s transmission rate using IOS Phone(iphone 4s) , but it's 8KB/s using Android(samsung S6), Can you give me some advice -- how to speed up with IOS?
Show LessHi,
I want to change the dynamic range and Output Data Rate (ODR) of magnetometer sensor (LSM303D) sensor present in the WICED Sense device. The current default setting is (-8, +8) Gauss and 25 Hz respectively ( from ./WICED_Sense_SDK 2.1_1.3Final/wiced_sense.c: Line 1171). I have two questions:
(1) How shall I compile the new firmware for Wiced SENSE? I already have the source code (WICED_Sense_SDK 2.1_1.3Final.zip). In the past, I have successfully changed the MAC address of my SENSE using a USB connection.
(2) When I receive the accelerometer/magnetometer sensor data in self developed Android app (SENSE is in notification mode), I get data at approximately 10Hz. However, the source code states that it is currently set to 25 Hz ( from ./WICED_Sense_SDK 2.1_1.3Final/wiced_sense.c: Line 1186). Why this difference in the output data rate?
Regards,
Abhishek
Show LessHi BCMs,
When I test BCM20736 bleprofile_sendNotification() function, find out that:
1. BCM20736 Txbuffer default is 16, APP layer call bleprofile_sendNotification() to copy tx data to buffer, and Txbuffer -1. After stack send it out, Txbuffer +1.
If I call bleprofile_sendNotification() over 16 times or even more, the Txbuffer would be a negative number(print out). what would happen to BCM20736 BT stack in this case??
2. Could we modify the size of Txbuffer ? and how to modify it if it's possible.
3. There is one callback function register to GATT, and also there is one callback function of fine timer. What's the proirity of this two callback function? Would the fine timer callback function interrupt GATT callback function ??
tks
Show LessHi, I am using the timer startup as used in most of the sample apps by inserting the following two lines in the _create() function:
bleprofile_regTimerCb(temperature_sensor_fine_timeouty, temperature_sensor_timeout);
bleprofile_StartTimer();
The fine timer is set to 100ms in the BLE_PROFILE_CFG:
/*.fine_timer_interval =*/ 100, // ms
I use the fine timer for running all the repetitive tasks that need to occur at a regular interval. The normal timer (which I think is always set to 1 sec), using the temperature_sensor_timeout callback, is an empty function.
The problem that I am facing is that the custom 20736 board runs normally for about 1 sec, and then it freezes. A copy of the debug trace is included below. One thing that I noticed in the trace is that normal timer shows a setting of 0 sec:
15:46:21 Normal Timer(0 s, 0 tick)
Is this how it is supposed to show up? What is the reason for timers to lock up? I have spent plenty of hours looking through the discussions and trying various alternatives, but nothing seems to work, and so I am stuck with this issue.
I also upgraded SDK from 2.1.1 to 2.2.1, but that did not change the outcome.
Please help!!
hanks.
Debug Trace:
==========
15:46:21 - temperature_sensor_create()
15:46:21 -
15:46:21 - 0118
15:46:21 - 0018
15:46:21 - 021600002a
15:46:21 - 326e6445645f556c747261536f756e64
15:46:21 - 021800012a
15:46:21 - 0002
15:46:21 - Writing LED Driver registers ...
15:46:21 - LED Driver init complete
15:46:21 -
15:46:21 - Reading identification registers...
15:46:21 - Temp. Sensor Manufacturer ID returned 0
15:46:21 -
15:46:21 - Temp. Sensor device ID = 0
15:46:21 - Rev. ID = 0
15:46:21 -
15:46:21 - Configuring Temp. Sensor...
15:46:21 -
15:46:21 - Configuring Upper and Lower threshold registers...
15:46:21 -
15:46:21 - Setting up resolution
15:46:21 -
15:46:21 - Temp. Sensor init complete
15:46:21 -
15:46:21 - Initializing various functions, ports, and peripherals.
15:46:21 -
15:46:21 - 0201061109326e6445645f556c747261
15:46:21 - 536f756e64
15:46:21 - 020a04
15:46:21 -
15:46:21 - blecm evt handler:
15:46:21 - 0e0401082000
15:46:21 -
15:46:21 - blecm evt handler:
15:46:21 - 0e0401092000
15:46:21 Trace Decoding Error - Could not find line number 314
15:46:21 Perm : 0002
15:46:21 Len, Max Len : 0010, 0010
15:46:21 UUID : 2A00
15:46:21 Attribute bytes
15:46:21 Handle: 0017
15:46:21 Perm : 0002
15:46:21 Len, Max Len : 0005, 0005
15:46:21 UUID : 2803
15:46:21 Attribute bytes
15:46:21 Handle: 0018
15:46:21 Perm : 0002
15:46:21 Len, Max Len : 0002, 0002
15:46:21 UUID : 2A01
15:46:21 Attribute bytes
15:46:21 Gatt DB Dump complete
15:46:21 bd_addr[5:2] = 20 73 6A 1E
15:46:21 bd_addr[1:0] = C181 00
15:46:21 GPIO 0001 (11)
15:46:21 GPIO 0014 (104)
15:46:21 GPIO 0025 (1003)
15:46:21 GPIO 0015 (20)
15:46:21 GPIO 0027 (2001)
15:46:21 Interrupt mask[0,1]:4000 0000
15:46:21 Interrupt mask[2]:0000
15:46:21 GPIO_WP:OFF= 00
15:46:21 GPIOBTN1:OFF=1,INT:0
15:46:21 GPIO_LED:OFF=1
15:46:21 GPIOBAT
15:46:21 GPIO_BUZ:OFF=0
15:46:21 Fine Timer(100 ms, 10/sec)
15:46:21 Fine TImer tick 8
15:46:21 Normal Timer(0 s, 0 tick)
15:46:21 - hello_sensor_fine_timeout:1
15:46:21 -
15:46:21 - Starting new temperature measurement.
15:46:21 -
15:46:21 - Power Button read value = 1
15:46:21 -
15:46:21 - UP/DOWN Button read value = 1
15:46:21 -
15:46:21 - Power setting read value = 0
15:46:21 -
15:46:21 - Current Temperature Setting = 36
15:46:21 -
15:46:21 - Temp. Sensor Manufacturer ID returned 0
15:46:21 -
15:46:21 - Temp. Sensor device ID = 0
15:46:21 - Rev. ID = 0
15:46:21 -
15:46:21 - MCP9808 Temperature Register raw data returned 0
15:46:21 -
15:46:21 - The current temperature is: 0 degrees C
15:46:21 - Heater output turned OFF
15:46:21 - hello_sensor_fine_timeout:2
15:46:21 -
15:46:21 - Starting new temperature measurement.
15:46:21 -
15:46:21 - Power Button read value = 1
15:46:21 -
15:46:21 - UP/DOWN Button read value = 1
15:46:21 -
15:46:21 - Power setting read value = 0
15:46:21 -
15:46:21 - Current Temperature Setting = 36
15:46:21 -
15:46:21 - Temp. Sensor Manufacturer ID returned 0
15:46:21 -
15:46:21 - Temp. Sensor device ID = 0
15:46:21 - Rev. ID = 0
15:46:21 -
15:46:21 - MCP9808 Temperature Register raw data returned 0
15:46:21 -
15:46:21 - The current temperature is: 0 degrees C
15:46:21 - Heater output turned OFF
15:46:21 - hello_sensor_fine_timeout:3
15:46:21 -
15:46:21 - Starting new temperature measurement.
15:46:21 -
15:46:21 - Power Button read value = 1
15:46:21 -
15:46:21 - UP/DOWN Button read value = 1
15:46:21 -
15:46:21 - Power setting read value = 0
15:46:21 -
15:46:21 - Current Temperature Setting = 36
15:46:21 -
15:46:21 - Temp. Sensor Manufacturer ID returned 0
15:46:21 -
15:46:21 - Temp. Sensor device ID = 0
15:46:21 - Rev. ID = 0
15:46:21 -
15:46:21 - MCP9808 Temperature Register raw data returned 0
15:46:21 -
15:46:21 - The current temperature is: 0 degrees C
15:46:21 - Heater output turned OFF
Debug trace freezes at this point.
Show LessHi BCM pals,
My team find out that, in long non-stop data tranmit test, some BCM20736 might enter some strange status such as:
1. could not receive data from its central
2. could not send data to its central
3. could not advertising
In APP layer, we print out the log via UART, and there is no error in the APP layer.
For example, today we have get one problem, one BCM20736 work in peripheral mode, and it could recieve data from central, but when it send data back, there is no data received by its central. After reset this BCM20736, everything goes right.
We think that, if we could polling BCM20736 stack status in APP layer, and we could do self-reset once there is any abnormal status happened in the stack. With this process, we could improve our product much more stable.
tks...
Show LessI'm facing download failure issue and the end of log as following:
---------
Download minidriver successfully had written 21 bytes to address 0x00203C1F
Download minidriver successfully had written 8 bytes to address 0x002043FC
Launch minidriver at 0x00201000 succeeded
Download config successfully had written 40 bytes to address 0xFF000000: 01 08 00 F0 00 00 62 08 C0 5D 89 FD 04 00 FF FF FF FF 40 06 00 97 6F 16 6A 73 20 02 0A 00 80 05 00 00 40 01 00 00 00 04
Downloaded 0 code bytes ( 0.0%) and 40 data bytes ( 0.5%). Verified 0 code bytes ( 0.0%) and 0 data bytes ( 0.0%). Current state: Terminated with error
A total of 1 contiguous memory areas were filled:
[FF000000..FF000027] DATA (40 bytes)
CRC mismatch while checking 40 bytes starting at address 0xFF000000; host computed A1A68F21, firmware computed 213E3225
---------
I'm using BCM20736 chip, and there is only EEPROM device on IIC bus, no other iic device.
Pls give me some advice, thanks.
Show LessHi
I read these documents:
http://community.broadcom.com/servlet/JiveServlet/previewBody/1737-102-2-1742/20737S-DS100-R.pdf
Because of my poor English skill, I can't understand clearly about FCC of BCM20737S.
If I make my custom board with BCM20737S, can I release it in U.S. without any special procedures?
In short, in the case of making a custom baord with BSM20737S and selling it in U.S., is there are violating the law?
Although there is not any radio function with the exception of BCM20737S, do I have to engage with an accredited test lab to determine whether my custom board violates or not?
I'm sorry for the naive question.
Sincerely
Show Less