Values with dots

My LCD Smartie Plugins
Wormi
New User
Posts: 8
Joined: Mon Mar 23, 2009 8:38 pm

Values with dots

Post by Wormi » Tue Mar 24, 2009 8:34 am

Hi,

I realize that it has been a long time ago since release of the plugin Netstuff.
I've found it very useful, but i have also a problem.
I cannot get values with dots, in my case i would like to get IP address, also i've checked other values with dots in string and plugin returned nothing.
Can You provide plugin able to extract such values or source code of it?

Regards
Wormi

User avatar
phil
Site Admin
Posts: 5147
Joined: Sun Apr 06, 2003 11:12 pm

Re: Values with dots

Post by phil » Tue Mar 24, 2009 11:06 am

I will try and have a look tonight.
Its been a while since I looked at this too, but I think its because values with dots are not returned as strings and NetStuff does not know how to deal with them.

Assuming I have such values on my device, I will attempt to figure out the problem and decode the values to the correct format.

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

Wormi
New User
Posts: 8
Joined: Mon Mar 23, 2009 8:38 pm

Re: Values with dots

Post by Wormi » Tue Mar 24, 2009 4:35 pm

Thank You !

I hope that won't be a problem for You :D

Regards
Wormi

User avatar
phil
Site Admin
Posts: 5147
Joined: Sun Apr 06, 2003 11:12 pm

Re: Values with dots

Post by phil » Wed Mar 25, 2009 2:22 am

Hi,

I've just made version 1.3 and put it on the downloads page.
Please try that, I think it now interprets the IPv4 addresses correctly.

I've not looked into IPv6 addresses but they are completely different anyway.

Let me know how you get on.

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

Wormi
New User
Posts: 8
Joined: Mon Mar 23, 2009 8:38 pm

Re: Values with dots

Post by Wormi » Wed Mar 25, 2009 9:20 am

Hi,

Thanx for quick reaction :D

I did preliminary test in work, at SNMP enabled WinXP, and noticed that some numbers are switched.
I.E. expected address was 10.143.211.48 but received 10.121.211.48
other examples:
expected 192.168.142.1 - received 84.168.125.1
expected 192.142.168.1 - received 84.125.168.1
expected 192.244.245.246 - received 84.244.81.246
Also checked few other numbers, i can post results if that can help :)

Edit:
It seems that it affects octets with values over 127 (74 of them).

Regards
Wormi

User avatar
phil
Site Admin
Posts: 5147
Joined: Sun Apr 06, 2003 11:12 pm

Re: Values with dots

Post by phil » Thu Mar 26, 2009 4:01 am

DOH!
Yes that makes sense!
I messed up and cast the 0-255 to a signed byte not an unsigned byte!
Try again with the new 1.4 :)

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

Wormi
New User
Posts: 8
Joined: Mon Mar 23, 2009 8:38 pm

Re: Values with dots

Post by Wormi » Thu Mar 26, 2009 7:44 am

Hi,

Now these 74 values seems to be bigger than 8bits in 1.5 :wink:
i.e.
128 in 1.4 = 172 ; 1.5 = 8364
130 in 1.4 = 26 ; 1.5 = 8218
132 in 1.4 = 30 ; 1.5 = 8222
133 in 1.4 = 38 ; 1.5 = 8230
134 in 1.4 = 32 ; 1.5 = 8224
135 in 1.4 = 33 ; 1.5 = 8225
...
189 in 1.4 = 221 ; 1.5 = 733
190 in 1.4 = 62 ; 1.5 = 318
191 in 1.4 = 124 ; 1.5 = 380
192 in 1.4 = 84 ; 1.5 = 340
...
254 in 1.4 = 99 ; 1.5 = 355
255 in 1.4 = 217 ; 1.5 = 729

Regards,
Wormi

User avatar
phil
Site Admin
Posts: 5147
Joined: Sun Apr 06, 2003 11:12 pm

Re: Values with dots

Post by phil » Thu Mar 26, 2009 10:29 pm

I presume you mean in 1.4 not 1.3 - there is no 1.5!
I will have to look at this a bit more closely - its clearly not as obvious an error as I first thought.

Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

Wormi
New User
Posts: 8
Joined: Mon Mar 23, 2009 8:38 pm

Re: Values with dots

Post by Wormi » Fri Mar 27, 2009 7:14 am

Yep, of course i meaned 1.3 and 1.4 not 1.4 and 1.5 :oops:

Thanks,
Wormi

User avatar
phil
Site Admin
Posts: 5147
Joined: Sun Apr 06, 2003 11:12 pm

Re: Values with dots

Post by phil » Sat Mar 28, 2009 2:21 am

Try again...
This time it is 1.5.

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

Wormi
New User
Posts: 8
Joined: Mon Mar 23, 2009 8:38 pm

Re: Values with dots

Post by Wormi » Sat Mar 28, 2009 8:26 am

Hi,

File not found.

Regards,
Wormi

User avatar
phil
Site Admin
Posts: 5147
Joined: Sun Apr 06, 2003 11:12 pm

Re: Values with dots

Post by phil » Sat Mar 28, 2009 4:19 pm

I guess it helps if I copy the file to the server before setting up the link!... :)
That will teach me to update it at silly times, while intoxicated and waiting for F1!

Now, what's the chances of it working!!!!
NOTE: I'm struggling to test it because I don't have any high numbers in my IP's here - its all 10.10.0.x. I hope you dont mind testing it for me each time!

I guess if this one does not work I can throw together a virtual machine with high numbers temporarily and try and connect SNMP to it...

Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

Wormi
New User
Posts: 8
Joined: Mon Mar 23, 2009 8:38 pm

Re: Values with dots

Post by Wormi » Sun Mar 29, 2009 10:14 am

Hi,

There is no problem at all to test new versions :)
I hope that You aren't tired with finding solution... because ver.1.5 seems working like 1.4 (feral values are bigger than 8bits - ie. 148 -> 8221, 255->729 )

Regards,
Wormi

User avatar
phil
Site Admin
Posts: 5147
Joined: Sun Apr 06, 2003 11:12 pm

Re: Values with dots

Post by phil » Sun Mar 29, 2009 5:24 pm

OK that kind of makes sense. I will have to get an IP address > 7bits to test with here I think.

What language Windows are you running? I think that may be related because SNMP IP address is returned as a string. On my UK English, the string is ANSI (each char is 1 byte, 0-255) and it works with higher IP's (I just tried it). I suspect it is probably broken on unicode languages that use 2bytes per character. I will try and recreate it and find a fix to read the returned "string" as the byte array it really is.

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

User avatar
phil
Site Admin
Posts: 5147
Joined: Sun Apr 06, 2003 11:12 pm

Re: Values with dots

Post by phil » Sun Mar 29, 2009 6:06 pm

Please try 1.6. I've changed it to use a structure rather than a string. So I hope this will work - it seems to work fine here with high IP's like, for example: 239.255.255.250

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest