Skip to content
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

Add 'no MRPC' version of switchtec_open function #260

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

xyan264
Copy link
Collaborator

@xyan264 xyan264 commented Apr 8, 2021

This new function opens a device without issuing MRPC command, so the contents in gas MRPC region is intact after the call.

This new function opens a device without issuing MRPC command, so the contents in gas MRPC region is intact after calling this function
@lsgunth
Copy link
Collaborator

lsgunth commented Apr 8, 2021

Why?

@xyan264
Copy link
Collaborator Author

xyan264 commented Apr 9, 2021

We've seen requests to fix the 'gas read/write' command issues like PR #259 .

The issue is caused by switchtec_open sending MRPC command during initialization, overwriting contents in MRPC GAS region (0x0-0x1000).

This new switchtec_open_no_mrpc function does not issue MRPC command, so it can be a good workaround for this issue, if needed.

@lsgunth
Copy link
Collaborator

lsgunth commented Apr 9, 2021

People should simple not do that. In fact, I think the proper thing to do is to disallow access to the MRPC region of the gas entirely.

There's no way to know if you're stepping on someone's toes if you try to do MRPC through the GAS and there are much better ways to do it. (See the examples folder). So just say no.

@maquefel
Copy link

This pull request solves some issues with gas read/write - at least i could get temperature (i replaced every switchtec_open with switchtec_open_no_mrcp). But using modified tool with ChipLink hanged both host with PAX 42100 and slave connected to it. So @lsgunth is right it us a really dangerous thing.

On the other hand is it supposed that configuration should be done only by serial or ethernet terminal (that still uses gas read/write but in other form) ? This is quite dissapointing.

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