Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Implement endpoint_diagnose app for recording hardware information #688

Open
3 of 4 tasks
marktwtn opened this issue Jun 25, 2020 · 5 comments
Open
3 of 4 tasks

Implement endpoint_diagnose app for recording hardware information #688

marktwtn opened this issue Jun 25, 2020 · 5 comments
Assignees
Labels
A-endpoint Area - Endpoint of tangle-accelerator C-feature Category - feature

Comments

@marktwtn
Copy link
Contributor

marktwtn commented Jun 25, 2020

A new app is required to let the user have the endpoint and hardware status.
The naming of the app is endpoint_diagnose.

Goal:
Record or log the following information:

  • Signal strength
  • GPS
  • Timestamp
  • Transaction sending failure
@marktwtn marktwtn self-assigned this Jun 25, 2020
@splasky splasky added A-endpoint Area - Endpoint of tangle-accelerator C-feature Category - feature labels Jun 30, 2020
@marktwtn
Copy link
Contributor Author

marktwtn commented Jul 1, 2020

I am trying to use the API offered by Legato to get these informations.

To use the API, we must include the corresponding header file and modify the Component.cdef and the .adef file.

When I was trying to get the signal strength, everything went well.

  • Include le_mrc_interface.h
  • Component.cdef
    requires:
    {
      api:
      {
        modemServices/le_mrc.api
      }
    }
    
  • .adef
    bindings:
    {
      test.testComp.le_mrc -> modemService.le_mrc
    }
    

However, when I was trying to get the information of GPS, the app just hung there.
It did not start to execute at all.
I just add the following modification:

  • Component.cdef
    requires:
    {
      api:
      {
        modemServices/le_mrc.api
        positioning/le_gnss.api
      }
    }
    
  • .adef
    bindings:
    {
      test.testComp.le_mrc -> modemService.le_mrc
      test.testComp.le_gnss -> positioning.le_gnss
    }
    

I will try to figure out the problem.

@marktwtn
Copy link
Contributor Author

marktwtn commented Jul 3, 2020

The problem has been solved. Just replace positioning with positioningService in .adef file.

However, there are things to be mentioned:

  • Somehow the GPS information has latitude and longitude but no horizontal accuracy.
  • The minute and second of the time information are correct, and the others are wrong.

@marktwtn
Copy link
Contributor Author

After the hardware is connected to the network, the time is synchronized.
Check https://docs.legato.io/latest/howToSetUserTimebase.html.

However, the Linux command date is correct but the time APIs give the wrong time without considering the time zone.

marktwtn added a commit that referenced this issue Jul 14, 2020
Record the signal strength, GPS data and time in log.

TODO: Get the correct time with the consideration of time zone.

Related to #688.
marktwtn added a commit that referenced this issue Jul 16, 2020
Record the signal strength, GPS data and time in log.

TODO: Get the correct time with the consideration of time zone.

Related to #688.
marktwtn added a commit that referenced this issue Jul 16, 2020
Record the signal strength, GPS data and time in log.

TODO: Get the correct time with the consideration of time zone.

Related to #688.
marktwtn added a commit that referenced this issue Jul 16, 2020
Record the signal strength, GPS data and time in log.

TODO: Get the correct time with the consideration of time zone.

Related to #688.
@marktwtn
Copy link
Contributor Author

For the IPC between endpoint and diagnose app, I reference the Low-level Messaging API and add the corresponding APIs.
It does not work because of the lacking of the binding, which should be added in *.adef and *.cdef.

However, the rule to write the binding is not quite clear in the Legato document.

@splasky
Copy link
Contributor

splasky commented Jul 27, 2020

For communicate with two components in same executable, you can refer to the Extend helloWorld.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-endpoint Area - Endpoint of tangle-accelerator C-feature Category - feature
Projects
None yet
Development

No branches or pull requests

2 participants