Skip to content

Conversation

@martinjaeger
Copy link
Member

This PR adds initial support for ThingSet requests via CAN using lishen2/isotp-c library (forked to Libre Solar github account.

Firmware has been tested with Linux can-utils and MPPT 2420 HC charge controller using Zephyr implementation. The Zephyr implementation needs these additional features to support messages with padding.

As ISO-TP standard suggests fixed bytes (0xDA) for the bits 16..23, the ThingSet message format had to be changed such that the function code (first byte of a request) is included in the data and not in the ID. The ThingSet spec has to be updated accordingly.

Open points for proper implementation:

  • Integrate with existing URI handler instead of sending regular requests
  • Device discovery on the CAN bus instead of using single hard-coded target address for MPPT
  • Automatic CAN address assignment (ThingSet approach still to be specified)

@martinjaeger
Copy link
Member Author

Thanks for the review @Gretel5X. Fixed the issues and will merge after CI has passed.

@martinjaeger martinjaeger merged commit 31514e8 into master Feb 26, 2021
@martinjaeger martinjaeger deleted the isotp branch April 21, 2021 05:43
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.

3 participants