Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AT example (iBeacon mode) is not wokring when only power is given to TB-02 module #7

Open
himsashu opened this issue May 12, 2021 · 5 comments

Comments

@himsashu
Copy link

I have flash the TB-02 module with at example and set this module to MODE 2. It started working a iBeacon when I connect the 3.3V, GND, RX and TX by TTL to USB converter.
The module is not working in iBeacon mode if I connect this module with a 3.3V battery (only 3.3v and GND is connected).

@ospanic
Copy link
Contributor

ospanic commented May 13, 2021

Yeath,It is a Bug,Check this file: Telink_825X_SDK/example/at/app_uart.c 95 line

@himsashu
Copy link
Author

@ospanic
Thanks for your reply. Can I remove the while(1) loop? Will it solve the issue.

I have one more question. I flash the iBeacon example code to TB-02 but module is only broadcasting the Bluetooth ID. The module is not broadcasting data in iBeacon protocol. The UIID, Major & Minor is not showing. Can you explain what data packet format this module is broadcasting.

Which code is more battery efficient (AT example in Mode 2 or iBeacon example) if I only wanted to use this module as a Beacon?

@ospanic
Copy link
Contributor

ospanic commented May 13, 2021

If you just want TB02 work as a Beacon, you can see Telink_825X_SDK/study/01_Advertise/app.c

and modify the u8 tbl_advData[] = { 0x05, 0x09, 'A', 'B', 'C', 'D'}; //要广播的数据

attribute_data_retention u8 ibeacon_adv_data[30] =
{
0x02, 0x01, 0x05,
0x1A, 0xFF,
0x4C, 0x00, //公司的标志 (0x004C == Apple)
0x02, 0x15, //iBeacon advertisement indicator
0xB9, 0x40, 0x7F, 0x30, 0xF5, 0xF8, 0x46, 0x6E, 0xAF, 0xF9, 0x25, 0x55, 0x6B, 0x57, 0xFE, 0x6D, // iBeacon proximity uuid
0x00, 0x01, // major
0x00, 0x01, // minor
0xc5, // calibrated Tx Power
};

@himsashu
Copy link
Author

I have done as you suggested and module is started working as ibeacon but the power consumption is very high.
I have loaded 01_Advertise and iBeacon example in two TB02 module and directly connected CR2032 battery (+) and (-) terminal with the modules. The 01_Advertise firmware only run for 12 hours whereas iBeacon example run for more than 24 hours with this battery. Why there is so much difference in battery consumption in both firmware?

Can you help me in the setting/configuration of 01_Advertise example so that I will get maximum battery backup. I don't want good signal strength from TB-02. The 2 meter of signal coverage is more than enough in my case.

@ospanic
Copy link
Contributor

ospanic commented May 18, 2021

Maybe the answer you want is here : Telink_825X_SDK/blob/master/example/iBeacon/app.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants