Modify

Opened 9 years ago

Last modified 7 weeks ago

#3206 reopened enhancement

Add openrrcp package

Reported by: Andrew Nording <andrew@…> Owned by: developers
Priority: low Milestone:
Component: packages Version:
Keywords: Cc:

Description

OpenRRCP is a toolset to manage RRCP-capable Ethernet switches.
OpenWRT makefile is here: http://openrrcp.org.ru/download/openwrt/openwrt-openrrcp.tar.gz
More information about OpenRRCP is here: http://openrrcp.org.ru/

Attachments (2)

Makefile-openwrt-openrrcp (953 bytes) - added by Andrew Nording <andrew@…> 9 years ago.
Makefile-openwrt-openrrcp.2 (953 bytes) - added by Andrew Nording <andrew@…> 9 years ago.
corrected MD5SUM - use this, please

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by Andrew Nording <andrew@…>

Changed 9 years ago by Andrew Nording <andrew@…>

corrected MD5SUM - use this, please

comment:1 Changed 9 years ago by florian

  • Resolution set to fixed
  • Status changed from new to closed

Added in [10560], thanks !

comment:2 Changed 7 weeks ago by velinreal@…

  • Resolution fixed deleted
  • Status changed from closed to reopened

There's a problem.

Currently the OpenRRCP package is written for Little Endian Machines.
However there's a strange behavior on MIPS related to the endianess.

The rtl83xx simply could not communicate with the switch device. It is sending and receiving properly the RRCP query frames, but it is not able to decode the received frames properly.
It seems the problematic file is
rrcp_io.c

I've tried to debug this part on line 312 in function rtl83xx_scan:

...
if (len>14 && (memcmp(pktr.ether_dhost,my_mac,6)==0) &&
		pktr.ether_type==htons(0x8899) &&
		pktr.rrcp_proto==0x01 &&
		pktr.rrcp_opcode==0x00 &&
		pktr.rrcp_isreply==1 &&
		pktr.rrcp_authkey==htons(authkey)){
.......

and by modifying it like that:

...
if (len>14 && (memcmp(pktr.ether_dhost,my_mac,6)==0) &&
		pktr.ether_type==0x8899 &&
		pktr.rrcp_proto==0x40 &&
		pktr.rrcp_opcode==0x01 &&
		pktr.rrcp_isreply==0x00 &&
		pktr.rrcp_authkey==authkey){
.......

I was able to get positive results from scanning. What I did was to remove htons() which basically swaps the bytes order.
I think it should be changed the way pktr.rrcp_isreply, pktr.rrcp_opcode and pktr.rrcp_proto are build

Could some one fix this issue please?

comment:3 Changed 7 weeks ago by anonymous

Ok.
I;ve managed to fix the query frame decoding by switching the places of rrcp_opcode and rrcp_isreply in rrcp_packet.h :

Before

struct rrcp_packet_t{
....
  uint8_t  rrcp_opcode:7;              /* 0x00 = hello, 0x01 = get, 0x02 = set */
  uint8_t  rrcp_isreply:1;             /* 0 = request to switch, 1 = reply from switch */
....
};

struct rrcp_helloreply_packet_t
{
....
  uint8_t  rrcp_opcode:7;              /* 0x00 = hello, 0x01 = get, 0x02 = set */
  uint8_t  rrcp_isreply:1;             /* 0 = request to switch, 1 = reply from switch */
....
};

After

struct rrcp_packet_t{
....
  uint8_t  rrcp_isreply:1;             /* 0 = request to switch, 1 = reply from switch */
  uint8_t  rrcp_opcode:7;              /* 0x00 = hello, 0x01 = get, 0x02 = set */
....
};

struct rrcp_helloreply_packet_t
{
....
  uint8_t  rrcp_isreply:1;             /* 0 = request to switch, 1 = reply from switch */
  uint8_t  rrcp_opcode:7;              /* 0x00 = hello, 0x01 = get, 0x02 = set */
....
};

However I've another problem. It is related with the proper reading of the registers of the switch. I guess they're red properly, but just cannot be decoded right.

Any help here?

Add Comment

Modify Ticket

Action
as reopened .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.