-
Notifications
You must be signed in to change notification settings - Fork 4
XER10-2389 : Gateway LED lite solid white in WFO mode while using XLE as backup mode #3
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -89,6 +89,27 @@ cpe_event_t ledmgr_get_event_from_str (char * event_str) | |
| } | ||
| return i; | ||
| } | ||
|
|
||
| bool is_remote_lte_up() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wan interface state change should be detected by respective component and set a sysevent for wan. From LED manager point of view, it should be just a "wan sysevent" irrespective of primary/backup interfaces. So check which component is subscribing for Device.X_RDK_WanManager.InterfaceActiveStatus. That component should check LTE status and set wan event |
||
| FILE *fp; | ||
| char buffer[512]; | ||
| CcspTraceError((" is_remote_lte_up called \n")); | ||
| fp = popen("dmcli eRT getv Device.X_RDK_WanManager.InterfaceActiveStatus", "r"); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use rbus API |
||
| if (!fp) return 0; | ||
|
|
||
| while (fgets(buffer, sizeof(buffer), fp)) { | ||
| if (strstr(buffer, "REMOTE_LTE,1")) { | ||
| pclose(fp); | ||
| CcspTraceError((" is_remote_lte_up returned true \n")); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use TraceInfo |
||
| return true; | ||
| } | ||
| } | ||
|
|
||
| pclose(fp); | ||
| CcspTraceError((" is_remote_lte_up returned false \n")); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use TraceInfo |
||
| return false; | ||
| } | ||
|
|
||
| #ifdef WAN_STATUS_LED_EVENT | ||
| static int parse_wan_event(char * event_str, char * wan_event) | ||
| { | ||
|
|
@@ -153,9 +174,26 @@ static int parse_wan_event(char * event_str, char * wan_event) | |
| (strcmp(led_wan_events[i].ipv6_event_value, led_wan_data->ipv6_event_value) == 0) && | ||
| (strcmp(led_wan_events[i].mapt_event_value, led_wan_data->mapt_event_value) == 0)) | ||
| { | ||
| strncpy(wan_event, led_wan_events[i].wan_event, BUFLEN_64-1); | ||
| if(strcmp(led_wan_events[i].wan_event,"rdkb_ipv4_only") == 0) | ||
| { | ||
| CcspTraceError((" wan_event is rdkb_ipv4_only \n")); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use TraceInfo |
||
| /*rdkb_ipv4_only - then it could be because of remote LTE completes WAN path*/ | ||
| if(is_remote_lte_up()){ | ||
| CcspTraceError(("Setting rdkb_wan_link_down as wan_event as is_remote_lte_up is true\n")); | ||
| /*if REMOTE_LTE_CHECK is true then local device is in WAN FAIL OVER MODE*/ | ||
| strncpy(wan_event,"rdkb_wan_link_down", BUFLEN_64-1); | ||
| } | ||
| else{ | ||
| strncpy(wan_event, led_wan_events[i].wan_event, BUFLEN_64-1); | ||
| } | ||
| } | ||
| else | ||
| { | ||
| strncpy(wan_event, led_wan_events[i].wan_event, BUFLEN_64-1); | ||
| } | ||
|
|
||
| CcspTraceError(("Final Wan Status Event: %s\n", led_wan_events[i].wan_event)); | ||
| free(led_wan_data); | ||
| free(led_wan_data); | ||
| return SUCCESS; | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LED manager is a generic code . Try to use HAL LED configuration file for interface specific LED settings