Changes

Line 173: Line 173:     
===WAN IP address===
 
===WAN IP address===
 
+
----
 
Lets examine a different, more complex example by issuing a request for the router's '''WAN IP address'''. If you look at the '''[[Monitoring_via_Modbus#List_of_parameters|table]]''' above, you will see that the WAN IP address value is contained within the 139th and 140th registers. Therefore, we should specify the 139th address and read 2 registers from that address:
 
Lets examine a different, more complex example by issuing a request for the router's '''WAN IP address'''. If you look at the '''[[Monitoring_via_Modbus#List_of_parameters|table]]''' above, you will see that the WAN IP address value is contained within the 139th and 140th registers. Therefore, we should specify the 139th address and read 2 registers from that address:
   Line 194: Line 194:     
[[File:Configuration examples modbus ip reconstruction.png]]
 
[[File:Configuration examples modbus ip reconstruction.png]]
 +
 +
===Signal strength===
 +
----
 +
Yet another different example is '''Signal strength''' values, because they are negative. Lets examine an example of this to see how the values should be interpreted:
 +
 +
 +
[[File:Configuration examples modbus signal strength.png]]
 +
 +
 +
These are examples of converting an eight-bit two's complement number to decimal. To do this, you first check if the number is negative or positive by looking at the sign bit. If it is positive, simply convert it to decimal. If it is negative, make it positive by inverting the bits and adding one. Then, convert the result to decimal. The negative of this number is the value of the original binary.
 +
 +
    Interpret 11011011 as a two's complement binary number, and give its decimal equivalent.
 +
        First, note that the number is negative, since it starts with a 1.
 +
        Change the sign to get the magnitude of the number.