bluerange-io / bluerange-mesh

BlueRange Mesh (formerly FruityMesh) - The first completely connection-based open source mesh on top of Bluetooth Low Energy (4.1/5.0 or higher)
https://bluerange.io/
Other
288 stars 109 forks source link

Current consumption with DISCOVERY_OFF mode #113

Closed LeoEras closed 5 years ago

LeoEras commented 5 years ago

I'm having some issues understanding what the chip is doing in DISCOVERY_OFF mode. It does consume less power that way, but there is still some activity which won't let me get a desired amount of uA for my project. For what I see in with the nRF Power Profiler, it keeps advertising something, even if AdvertisingModule is not enabled, and the advertising interval is set to trigger each second. In my example I use the TimerEventHandler to switch from DISCOVERY_LOW to DISCOVERY_OFF every 5 seconds and viceversa, to consume less power. This is what I can capture from the Power Profiler: with the "smaller" red areas as the zones where the DISCOVERY_OFF mode is active. 5 What are those? This is a close-up of a section in DISCOVERY_OFF mode. 6

mariusheil commented 5 years ago

Hi, I think what you are seeing is the advertising of the MeshAccessModule. This module allows you to connect to the Mesh from another non-mesh capable device such as a Smartphone. It is also used to do enrollment over the mesh. Depending on your use-case, you can either remove the module in the featureset or you can change its configuration in the featureset. Then it will still be enabled but not advertising actively: u8 enableAdvertising = true; //Advertise the meshaccessPacket connectable u8 disableIfInMesh = false; //Once a mesh connection is active, disable advertising

If you need to check the advertising jobs, there is a command: "advjobs" which will show you all advertisings that are enabled.

The Discovery OFF only switches off the broadcasts of the Node Module by default, but leaves other functionality untouched.

Marius

LeoEras commented 5 years ago

I tested those configurations and got very good results. I still cannot get less than 750uA, even with most modules disabled. Even on DISCOVERY_OFF mode it seems to be advertising something.

mariusheil commented 5 years ago

Hi,

Just have a look for all modules that add an advertising job and check where it comes from. Or look at the binary message that you get when entering advjobs and check where it comes from. Also, you can enable logging of the FH tag using "debug fh". This will show you all sofdevice calls and whether advertising or scanning are enabled.

Leonardo Eras notifications@github.com schrieb am Mi., 28. Aug. 2019, 16:46:

I tested those configurations and got very good results. I still cannot get less than 750uA, even with most modules disabled. Even on DISCOVERY_OFF mode it seems to be advertising something.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mwaylabs/fruitymesh/issues/113?email_source=notifications&email_token=ABM62NEBZOJKCSRX3HUWSUTQG2FVRA5CNFSM4IPWCZ22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5LMBII#issuecomment-525779105, or mute the thread https://github.com/notifications/unsubscribe-auth/ABM62NDQ7JPSE7XFGEHGM7DQG2FVRANCNFSM4IPWCZ2Q .

LeoEras commented 5 years ago

Thanks! I'm now playing with some of the configuration values and enabling/disabling modules to see how to further reduce energy consumption. So far I've got about 350 uA, which is very good for me. I'll take a look at the advertising jobs too.