Smart Bluetooth Forum Discussions
Hi all,
i would to know if it is easy to port the code from the SDK1 to the SDK2; if in the SDK2 you have resolved the many bug present in the first SDK and if it is easy to debug using a jlink the code on the SDK 2. Is the documentation about the APIs in the SDK 2 is more exaustive than tne documentation about the SDK 1.Thks.
Show LessCould you tell how to use the api : void leatt_sendErrResponse(INT32 errCode, INT32 reqOpcode, INT32 handleInError ) ( be defined
in the leatt.h)
I don't know errCode, reqOpcode, handleInError ? no any description in leatt.h.
I quess
errCode =
#define LEATT_ERR_CODE_INVALID_HANDLE 0x01
#define LEATT_ERR_CODE_READ_NOT_PERMITTED 0x02
...........
reqOpcode =
#define LEATT_OPCODE_ERR_RSP 0x1
#define LEATT_OPCODE_EXCHANGE_MTU_REQ 0x2
.........
but whis is handleInError ??????
In our production need a read gatt character call back function
and a error response.
xxx_create(void)
{
.....
lel2cap_regConnLessHandler(4, homedoor_l2cap_att_data_handler); /* home_door_l2cap_att_data_handler is l2cap att data access call back function */
...........
}
static void homedoor_l2cap_att_data_handler(UINT8 *l2capHdr)
{
uint8 opcode = (LEATT_PDU_HDR*) (l2capHdr + 4);
UINT16 *handle = (UINT16 *)(l2capHdr + 5);
UINT8 status = 0;
switch(opcode)
{
case LEATT_OPCODE_READ_REQ:
status = SystemUtilsReadAttrCB(handle); // is my private GATT sevice and character read call back function
break;
}
if (status == LEATT_ERR_CODE_NO_ERROR)
{
leatt_l2capHandler(l2capHdr); // continue to process GATT service
}
else
{ // status = LEATT_ERR_CODE_REQ_NOT_SUPPORTED
leatt_sendErrResponse(status , LEATT_OPCODE_READ_REQ, ??????); }
}
Show LessHi,
checking from the post Re: 20732 mac filtering possible?, the parameter 'advType' of function belcm_StartAdv can be used for specifying the type 'random'.
But how do I choose more specific address, ie. static, non-resolvable, resolvable, from this API?
Show LessHello,
has anybody experience in connecting two Tag3-boards via bluetooth.
I am looking for a function which I can use for establishing a bluetooth connection to a certain device. The function "bleprofile_Discoverable(HIGH_UNDIRECTED_DISCOVERABLE, NULL);" seems not the right one.
Best regards,
Christoph
Show LessHi,
This is the question following Changing BD_ADDR from the application
Regarding to victorz's description here
You shall not change device bdaddr on every reboot.
I don't see the same expression from the BT spec as below, which is cited from section 10.8.1 of Part C. of Volume 3.
A device may choose to initialize its static address to a new value after each
power cycle. A device shall not change its static address value once initialized
until the device is power cycled.
Note: If the static address of a device is changed then the address stored in
peer devices will not be valid and the ability to reconnect using the old address
will be lost.
So, if we need to change the BD address in every reboot, then what would be the limit of write cycle to EEPROM that storing the BD_ADDRESS, in case that we need to write it to '0xFFFFFFFFFFFF' before calling 'blecm_set_static_random_bd_addr'?
Show LessHow do I set up Eclipse to work with the WICED SDK on Linux?
I have SDK 2.2.0 working just fine on Linux from the commandline, including building and flashing sample apps. I also have Eclipse ("IDE for C/C++", Luna SR2) working fine (can build Linux native apps for example). But I am really not sure how to put the two together so as to get an experience similar to the Windows WICED IDE.
Thanks!
I'm sorry if this has been answered before or is somewhere in the docs.
Show LessFrom bleapptimer.h:
// This function will start a fine resolution timer. It should be used with care.
// The timeout is in ms unit.
void bleapptimer_startFineTimer( BLEAPP_TIMER_CB cb, INT16 timeOut);
I noticed a problem with timeOut:
for timeOut = 1000 callback is called about every 12 sec, for timeOut = 100 - every 1 sec.
Is this a bug in bleapptimer_startFineTimer ?
Show LessYou state that:
GPIOs that are output enabled will remain so and drive as configured in sleep/deep sleep in Sleep Deep_Sleep Explanation and Techniques
We tested this with our BCM20736 device and it looks like it does not work. We set one GPIO as output/high. As soon as the device enters deep sleep the GPIO goes low.
We are using SDK 2.1.1 and the following code snippet taken from etc_sample.c:
gpio_configurePin(0, 3, GPIO_OUTPUT_ENABLE, GPIO_PIN_OUTPUT_HIGH); | |
ble_trace1("Entering deep sleep. Will wake up in %d seconds...", 10000); |
gpio_configurePin(0, 0, 0x100, 0); |
// Configure the low power manager to enter deep sleep. | |
devLpmConfig.disconnectedLowPowerMode = DEV_LPM_DISC_LOW_POWER_MODES_HID_OFF; |
// Configure the wake time in mS. | |
devLpmConfig.wakeFromHidoffInMs = 10000; |
gpio_configurePin(0, 0, 0x100, 0); |
// Enter deep-sleep now. Will not return. | |
devlpm_enterLowPowerMode(); |
When the device is in deep sleep mode then GPIO P3 is low. But it should be high.
Why is this so?
Show Less