-
Notifications
You must be signed in to change notification settings - Fork 205
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
New advertising flags: about 8 % shorter battery life? #87
Comments
There are more detailed diagrams. The typical cycle is roughly the same as the original version.
TX sending time is about 300 us. |
The main reason for the change is to force script "writers" to different "home system" ones to parse packets according to standard Bluetooth LE rules. PS: For example, take a look at these doodles: |
Ver 3.0 - Added toggle support for advertising package structures for third-party software written by unqualified authors. |
Thanks for adding this switch. This also helps to hide the sensors from average users. BTW: When calling other authors unqualified because they rely on published documentation than you could call another authors also unqualified that advertise data with the same UUID only changing length of the advertisments breaking compatibility with already published data format specification. |
I agree - I am not a programmer and I have nothing to claim. Just to make it work right.
How is compatibility broken? The size of the structure is different. Carmakers making big and small cars violate road compatibility :) |
@JsBergbau - I agree with you and remove the atc1441 format in new version (?) |
Sorry that is a missunderstanding. ATC format is fine. It is most powerefficient because it is shortest. Please keep it. |
If its just about the size a very short version can be implemented. Only 3byte MAC In the end that may not help anyone at all and just creates the need to support one more protocol |
Good idea. On the other hand with devices which have bad reception quality you don't know if data didn't change or it was because of bad reception. Thats why I changed to ATC format only. So every advertisment ATC format is transmitted giving 3times higher chance of receiving packet. You do a great job and I really appreciate it. My script was only created because at that time there didn't exist one (or at least I didn't find one easy usable script) and over time it has grown. Of course you're right with packet length and different format. I just didn't expect that. There was this UUID I checked and I thought that is enough to prevent accidentally decoding wrong data. I also like that you've implemented a PIN code proctetion and you and also send MI Like packets and encrypt your data so no one knows for example when you shower. Perhaps someday when I have more freetime I'll include all these features to make them easily usable and uintil that personally I find the ATC1441 format the best tradeoff between information and packet length. |
Most of these feature did @pvvx :) But thanks still for your words ! |
The mijia format has a dynamic packet size and data is positioned based on internal flags. If there is no correct parsing of packets, there is no possibility of extension or transition to Bluetooth 5 Extended Advertisements or Periodic Advertisements. To reduce the size, the duplicate MAC must be removed from the AD data. MAC are already conveyed in the header. |
Thanks for the hint. Changed program to parse the packet only if it is 13 Bytes in size.
What do you think about ATC1441_V2 Format? It is the same but without (duplicate) MAC. Instead of starting with Or we design a even shorter format. |
Significantly greater savings can be achieved by using the BT 5.2 standard. "Expanded advertising" is broadcast on one channel, not 3. This is already a 3-fold gain. PS: Integrated approach is required, not counting the bytes in a packet. In all cases, development is limited to supporting a third-party software product. The development of open-source BLE is just beginning. The open source "community" has done nothing for 10 years. I alone cannot reverse this situation. |
So does the sensor currently transmit (at default interval) every 2,5 on all 3 advertisment channels? Even with that it sometimes still takes some some seconds until all receivers got the packet with a higher sequence number and report it. I thought that is because of eventually listening channel and advertising channel were the same and thus the packet was sucessfully receceived.
That implies that the receiver reports back the received signal strength, right? So if I got you right it is not worth creating a ATC1441_V2 format with 8 bytes so save energy? 8 Bytes less because I had another idea to save 2 additional bytes. |
Reception of advertisements on JDY-10 (TLSR8266) or CC2540 USB Dongle. Raspberry Pi (2 model B), Ethernet internet connection, Mosquitto MQTT client, Messages per second 0.98 👎
6.704s / 100000 = 0.00006704 -> 67 us 👎
Yes. |
Hi @pvvx
thanks for you very energy efficient versions. I've found this very interesting picture https://pvvx.github.io/ATC_MiThermometer/CustPower.html
As you can see most energy is consumend during advertising.
New advertising with version 2.9 format is 35 bytes long instead of 32 Bytes for ATC1441 Frame. So 3 Bytes more transmitted which means 35 / 32 = 1,09375, so about 9 % longer trasmit time. Now take 1 % off because of baseline current that would mean 8 % shorter battery life. Am I wrong? Is there a possibility to enable old format again?
Update: Also with this new format device is displayed when you search for bluetooth devices in Android. You can tap and then it tells that there is an App required. This makes the device more visible to average users. When they see like 10 devices or so then they will try to find out what it is about. So I'd really prefer enabling old advertising behaviour where device is hidden in standard Android Bluetooth scan.
The text was updated successfully, but these errors were encountered: