Skip to content

Conversation

@ShardulNalegave
Copy link

  • Check if connected to non-WiFi (i.e. ethernet and thread) networks
  • New menuconfig option to be selected when using thread
  • Has not yet been tested

Description

Insights currently only works on WiFi for sending data, this PR adds checks for ethernet and Thread networks to allow data to be transmitted over them too.

Changes include:-

  1. Added separate functions for checking wifi, ethernet, thread connectivity
  2. In is_insights_active, if any one is active then return true
  3. Added a menuconfig option to be set when using Thread

Related

Fixes #51

Testing

This hasn't yet been properly tested.


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

- Check if connected to non-WiFi (i.e. ethernet and thread) networks
- New menuconfig option to be selected when using thread
- Has not yet been tested
list(APPEND priv_req esp_wifi)
endif()

if(CONFIG_ESP_INSIGHTS_THREAD_ENABLED)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not create on the new config for thread enabled. We can use the global one.

bool wifi_connected = is_wifi_connected();
bool ethernet_connected = is_ethernet_connected();
bool is_thread_with_br = is_thread_with_br_connected();

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be more clear, let's add new variable named, bool is_connected_to_internet = wifi_connected || ethernet_connected || is_thread_with_br;

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

Successfully merging this pull request may close these issues.

Insights not send data without WiFi connection

2 participants