Ad Widget

Collapse

Snmp --> Item --> Hexadecimal

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nisbo
    Junior Member
    • Jun 2017
    • 8

    #1

    Snmp --> Item --> Hexadecimal

    Hello,

    I am reading some date via SNMP, the problem is that the answer is hexadecimal (from right to left) so I get answers like 00 00 10 42

    In Java I am doing this to get the correct value

    Code:
    	static String hex2StringRightToLeft(String octetString) {
    		octetString = octetString.replace(":", "");
    		
    		String s = "";
    	    for (int i = 0; i < octetString.length(); i++) {
    	    	s = octetString.substring(i,i+2) + s;
    	    	i++;
    	    }
    	   
    		return String.valueOf(Float.intBitsToFloat(Integer.parseInt(s, 16)));
    	}
    Attached Files
  • pa5nt
    Junior Member
    • Dec 2019
    • 11

    #2
    Hi . i am also using many Hytera RD985 dmr repeaters. can you share your template ?

    i am using version 4.4

    Regards Joost .

    Comment

    Working...