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

IM Data Cannot Set #557

Open
widavies opened this issue Jun 1, 2023 · 1 comment
Open

IM Data Cannot Set #557

widavies opened this issue Jun 1, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@widavies
Copy link

widavies commented Jun 1, 2023

In Proneta, when a device is assigned an IP suite, right clicking the device in the Graphical View, there is an optional to edit additional I&M data:

image
A dialog pops up with several options:
image

If I change any of these options and hit set, the Proneta request appears to do nothing.

The Wireshark trace shows that the AR connect request has been rejected with code "Error in Parameter ARType":

image

Here is the detailed connect packet from Proneta:
image

You can see that the ARType is 0x0006 DeviceAccess AR.

Tracking this down, the following function will reject any ARs that are not PF_ART_IOCAR_SINGLE:

int pf_cmdev_check_ar_type (uint16_t ar_type)
{
   int ret = -1;

   if (ar_type == PF_ART_IOCAR_SINGLE)
   {
      ret = 0;
   }

   return ret;
}

Are there any plans to support IM record updates or any easy way to enable them?

Thanks!

@pyhys
Copy link
Collaborator

pyhys commented Jun 22, 2023

Hi, thanks for the input.
I can make it work from Proneta with these changes:

in pf_cmdev_check_ar_type() replace

if (ar_type == PF_ART_IOCAR_SINGLE)

with

if (ar_type == PF_ART_IOCAR_SINGLE || ar_type == PF_ART_IOSAR)

and in pf_cmwrr_write()
replace

   if (
      (pf_cmdev_get_subslot_full (
          net,
          p_write_request->api,
          p_write_request->slot_number,
          p_write_request->subslot_number,
          &subslot) == 0) &&
      (((subslot->ownsm_state != PF_OWNSM_STATE_IOC) &&
        (subslot->ownsm_state != PF_OWNSM_STATE_IOS)) ||
       (subslot->owner != p_ar)))
   {
      p_result->pnio_status.error_code = PNET_ERROR_CODE_WRITE;
      p_result->pnio_status.error_decode = PNET_ERROR_DECODE_PNIORW;
      p_result->pnio_status.error_code_1 = PNET_ERROR_CODE_1_ACC_ACCESS_DENIED;
      p_result->pnio_status.error_code_2 = 0;
   }
   else if (p_write_request->index <= PF_IDX_USER_MAX)

with

(void)subslot;
if (p_write_request->index <= PF_IDX_USER_MAX)

I have not studied the consequences of making these changes.

@pyhys pyhys added the bug Something isn't working label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants