beta
Hello developer. Login with your existing account. New to Vodafone Developer? Register your account.

+ Login or create an account

0

Dear all

am trying to use the STk To get the NMR..we are sponsored By vodafone-EG
so if you have any idea reagrding this issue kindly share
B.R

3 Answers:

0
Hii all i'm working on a similar project. Could you tell me how could you get the NMR ??? I would be thankful. i've searched a lot online...i'm confused :(
0
Hi Yousef, The object returned is defined in GSM 04.08. as quoted below.... [ 10.5.2.20 Measurement Results The purpose of the Measurement Results information element is to provide the results of the measurements made by the mobile station on the serving cell and the neighbour cells. The Measurement Results information element is coded as shown in figure 10.5.47/3GPP TS 04.08 and table 10.5.47/3GPP TS 04.08. The Measurement Results is a type 3 information element with 17 octets length. 8 7 6 5 4 3 2 1 +-----------------------------------------------+ ? ? Measurement Results IEI ? octet 1 +-----+-----------------------------------------? ? BA- ? DTX ? RXLEV-FULL-SERVING-CELL ? octet 2 ? USED?USED ? ? +-----+-----+-----------------------------------? ? 0 ?MEAS-? RXLEV-SUB-SERVING-CELL ? octet 3 ?spare?VALID? ? +-----+-----------------------------------------? ? 0 ? ? ? NO- ? ?spare? ? ?NCELL? ? ? RXQUAL-FULL ? RXQUAL-SUB ? M ? octet 4 ? ? SERVING-CELL ? SERVING-CELL ?(high? ? ? ? ?part)? +-----------------------------------------------? ?NO-NCELL-M ? ? octet 5 ?(low part) ? RXLEV-NCELL 1 ? +-----------------------------------------------? ? BCCH-FREQ-NCELL 1 ? BSIC-NCELL 1 ? octet 6 ? ? (high part) ? +-----------------------------------------------? ? BSIC-NCELL 1 ? RXLEV-NCELL 2 ? octet 7 ? (low part) ? (high part) ? +-----------------------------------------------? ?RXLEV? ? ? ?NCELL? ?BSIC-NCELL ? octet 8 ? 2 ? BCCH-FREQ-NCELL 2 ? 2 ? ?(low ? ?(high part)? ?part)? ? ? +-----+-----------------------------+-----------? +-----------------------+-----------------------? ? BSIC-NCELL 2 ? RXLEV-NCELL 3 ? octet 9 ? (low part) ? (high part) ? +-----------------------------------------------? ? RXLEV- ? ?BSIC-? ? NCELL 3 ? ?NCELL? ? ? BCCH-FREQ-NCELL 3 ? 3 ? octet 10 ? (low part)? ?(high? ? ? ?part)? +-----------------------------------------------? ? BSIC-NCELL 3 ? RXLEV-NCELL 4 ? octet 11 ? (low part) ? (high part) ? +-----------------------------------------------? ? RXLEV-NCELL 4 ? BCCH-FREQ-NCELL 4 ? octet 12 ? (low part) ? ? +-----------------------------------------------? ? ?RXLEV-NCELL? ? BSIC-NCELL 4 ? 5 ? octet 13 ? ?(high part)? +-----------------------------------------------? ? RXLEV-NCELL 5 ? BCCH-FREQ-NCELL 5 ? octet 14 ? (low part) ? (high part) ? +-----------------------------------------------? ?BCCH-? ?RXLEV? ?FREQ-? ?NCELL? ?NCELL? BSIC-NCELL 5 ? 6 ? octet 15 ?5(low? ?(high? ?part)? ?part)? +-----------------------------------------------? ? RXLEV-NCELL 6 ?BCCH-FREQ-NCELL 6? octet 16 ? (low part) ? (high part) ? +-----------------------------------------------? ?BCCH-FREQ- ? ? octet 17 ? NCELL 6 ? BSIC-NCELL 6 ? ?(low part) ? ? +-----------------------------------------------+ Figure 10.5.47/3GPP TS 04.08: Measurement Results information element (continued) Table 10.5.47/3GPP TS 04.08: Measurement Results information element BA-USED (octet 2), the value of the BA-IND field of the neighbour cells description information element or elements defining the BCCH allocation used for the coding of BCCH-FREQ-NCELL fields. Range 0 to 1. DTX-USED (octet 2) This bit indicates whether or not the mobile station used DTX during the previous measurement period. Bit 7 0 DTX was not used 1 DTX was used RXLEV-FULL-SERVING-CELL and RXLEV-SUB-SERVING-CELL, (octets 2 and 3) Received signal strength on serving cell, measured respectively on all slots and on a subset of slots (see 3GPP TS 05.08) The RXLEV-FULL-SERVING-CELL and RXLEV-SUB-SERVING-CELL fields are coded as the binary representation of a value N. N corresponds according to the mapping defined in 3GPP TS 05.08 to the received signal strength on the serving cell. Range: 0 to 63 MEAS-VALID (octet 3) This bit indicates if the measurement results for the dedicated channel are valid or not Bit 7 0 The measurement results are valid 1 the measurement results are not valid RXQUAL-FULL-SERVING-CELL and RXQUAL-SUB-SERVING-CELL (octet 4) Received signal quality on serving cell, measured respectively on all slots and on a subset of the slots (see TS. 3GPP TS 05.08) (continued...) Table 10.5.47/3GPP TS 04.08: Measurement Results information element (continued) CELL fields are coded as the binary representation of the received signal quality on the serving cell. Range: 0 to 7 (See 3GPP TS 05.08) NO-NCELL-M, Number of neighbouring cell measurements (octets 4 and 5) Bits 1 8 7 0 0 0 No neighbour cell measurement result 0 0 1 1 " " " " 0 1 0 2 " " " " 0 1 1 3 " " " " 1 0 0 4 " " " " 1 0 1 5 " " " " 1 1 0 6 " " " " 1 1 1 Neighbour cell information not available for serving cell RXLEV-NCELL i, Received signal strength on the i'th neighbouring cell (octet 5, 7, 8, 9, 10, 11, 12, 13, 14, 15 and 16) The RXLEV-NCELL field is coded as the binary representation of a value N. N corresponds according to the mapping defined in TS. 3GPP TS 05.08 to the received signal strength on the i'th neighbouring cell. See note 1 & 2. Range: 0 to 63. BCCH-FREQ-NCELL i, BCCH carrier of the i'th neighbouring cell (octet 6, 8,10, 12, 14, 15, 16 and 17) The BCCH-FREQ-NCELL i field is coded as the binary representation of the position, starting with 0, of the i'th neighbouring cells BCCH carrier in the BCCH channel list. The BCCH channel list is composed of one or two BCCH channel sub lists, each sub list is derived from the set of frequencies defined by reference neighbour cells description information element or elements. In the latter case the set is the union of the two sets defined by the two neighbour cells description information elements. In each BCCH channel sub list the absolute RF channel numbers are placed in increasing order of ARFCN, except that ARFCN 0, if included in the set, is put in the last position in the sub list. The BCCH channel list consists either of only the sub list derived from the neighbour cells description information element(s) in System Information 2/5 (and possible 2bis/5bis) or of that sub list immediately followed by the sub list derived from the neighbour cells description information element in System Information 2ter/5ter for the case System Information 2ter/5ter is also received. If the set of ARFCNs defined by the reference neighbour cells description information element or elements includes frequencies that the mobile station does not support then these ARFCNs shall be included in the list. The notation 2/5 etc. means that the rules above apply to the neighbour cells description information elements received in System Information 2, 2bis and 2ter and to those received in System Information 5, 5bis and 5ter separately. See note 1 & 2. Range: 0 to 31. BSIC-NCELL i, Base station identity code of the i'th neighbouring cell (octet 6, 7, 8, 9, 10, 11, 13, 15 and 17) The BSIC-NCELL i field is coded as the binary representation of the base station identity code of the i'th neighbouring cell. See note 1 & 2. Range: 0 to 63. NOTE 1: If the field extends over two octets the highest numbered bit of the lowest numbered octet is the most significant and the lowest numbered bit of the highest numbered octet is the least significant. NOTE 2: If NO-NCELL-M < 6 the remaining RXLEV-NCELL i, BS-FREQ-NCELL i and BSIC-NCELL i fields (NO-NCELL-M < i <= 6) shall be coded with a "0" in each bit. ] Quote from 3GPP TS 04.08 version 7.1.0 I have created a STK application that sends this information to a web page as variable nmr= below is my code to decode certain aspects of this field:- NOTE: This code is supplied as is, it has no support and you run it fully at your own risk. If you do not want to take this risk then DO NOT USE IT! [ ASP code for decoing certain aspects of NMR <%@ LANGUAGE="VBSCRIPT" %> <wml> <% ' First get the raw query string as the automated method fail when a "00" is part of the string! RequestRawStr = Request.QueryString RequestRawStrLen = Len(RequestRawStr) ' Undo the URL coding ' Clear and set the return to a string RequestDecodedStr="" 'Inspect each byte to decode URL encoded string For i = 1 to RequestRawStrLen TempStr = Mid(RequestRawStr,i,1) 'If the current character is a % then decode If TempStr = "%" then ' Convert the Hex byte (the next two characters) into a character ' Setup a variable for hex to Decimal convertion HextoDecReference="0123456789ABCDEF" ' Set the upper and lower nibles to variables UpperNibbleHex = Mid(RequestRawStr,i+1,1) UpperNibbleDec = 0 LowerNibbleHex = Mid(RequestRawStr,i+2,1) LowerNibbleDec = 0 ' Find their decimal equivelents For convertcount = 0 To 15 If Mid(HextoDecReference,convertcount+1,1) = UpperNibbleHex Then UpperNibbleDec = convertcount If Mid(HextoDecReference,convertcount+1,1) = LowerNibbleHex Then LowerNibbleDec = convertcount Next RequestDecodedStr = RequestDecodedStr + Chr(UpperNibbleDec*16 + LowerNibbleDec) ' Move the pointer on as the next two characters have already been decoded i=i+2 Else 'If not then just add the character to the rest RequestDecodedStr = RequestDecodedStr + TempStr End If Next ' Convert entire string to hex RequestRawHexStr="" RequestDecodedStrLen = Len(RequestDecodedStr) HexChar = "FF" For RequestRawHexLoop = 1 to RequestDecodedStrLen HexChar = Hex(Asc(Mid(RequestDecodedStr,RequestRawHexLoop,1))) If Len(HexChar) = 1 Then RequestRawHexStr = RequestRawHexStr + "0" End If RequestRawHexStr = RequestRawHexStr + HexChar Next ' Extract BCCH information ' Find the keyword "nmr=" and move the pointer on by the length of "nmr=" LocationInfoCharStart = Instr(RequestDecodedStr,"nmr=") + 4 ' Double the result to find the position in the Hex version - fiddle factor LocationInfoHexStart = (LocationInfoCharStart * 2) - 1 'Coded NMR string in hex NMRHex = Mid(RequestRawHexStr,LocationInfoHexStart,len(RequestRawHexStr)) ' ******************************************************************************** ' Start decoding the NMR ' DTX is on if bit 7 in byte 1 is set ' DTX = "On" if at least the following NMR - 40 DTXUppernibble = mid(RequestRawHexStr,LocationInfoHexStart,1) Select Case DTXUppernibble Case "4","5","6","7","c","d","e","f" DTX = "on" Case Else DTX = "off" End Select ' Find RXLEV - Full for serving cell => bits 1 to 6 in byte 1 ' First convert value for byte 1 to decimal ' Setup a variable for hex to Decimal convertion HextoDecReference="0123456789ABCDEF" ' Set the upper and lower nibles to variables UpperNibbleHex = mid(RequestRawHexStr,LocationInfoHexStart,1) UpperNibbleDec = 0 LowerNibbleHex = mid(RequestRawHexStr,LocationInfoHexStart+1,1) LowerNibbleDec = 0 ' Find their decimal equivelents For convertcount = 0 To 15 If Mid(HextoDecReference,convertcount+1,1) = UpperNibbleHex Then UpperNibbleDec = convertcount If Mid(HextoDecReference,convertcount+1,1) = LowerNibbleHex Then LowerNibbleDec = convertcount Next RequestDecodedDec = UpperNibbleDec*16 + LowerNibbleDec ' Select only relevent bits for RxLev - bits 1 to 6 ' Mask is 00111111 = 63 ServRxLevFullDec = RequestDecodedDec And 63 ' Convert level into actual signal level as per GSM05.08 If ServRxLevFullDec <= 0 Then ServRxLevFullDbm = "less than -110" ElseIf ServRxLevFullDec >= 63 Then ServRxLevFullDbm = "greater than -48" Else ServRxLevFullDbm =ServRxLevFullDec-110 End If ' Find RXQual - Full for serving cell => bits 5 to 7 in byte 3 ' First convert value for byte 3 to decimal ' Setup a variable for hex to Decimal convertion HextoDecReference="0123456789ABCDEF" ' Set the upper and lower nibles to variables UpperNibbleHex = mid(RequestRawHexStr,LocationInfoHexStart+4,1) UpperNibbleDec = 0 LowerNibbleHex = mid(RequestRawHexStr,LocationInfoHexStart+5,1) LowerNibbleDec = 0 ' Find their decimal equivelents For convertcount = 0 To 15 If Mid(HextoDecReference,convertcount+1,1) = UpperNibbleHex Then UpperNibbleDec = convertcount If Mid(HextoDecReference,convertcount+1,1) = LowerNibbleHex Then LowerNibbleDec = convertcount Next RequestDecodedDec = UpperNibbleDec*16 + LowerNibbleDec ' Select only relevent bits for RxQual - bits 5 to 7 ' Mask is 01110000 = 112 ServRxQualFullDec = RequestDecodedDec And 112 ' shift bits right 4 places ServRxQualFullDec = ServRxQualFullDec \\ 8 ' Convert level into actual BER level as per GSM05.08 If ServRxQualFullDec <= 0 Then ServRxQualFullBER = "less than 0.1" ElseIf ServRxQualFullDec >= 7 Then ServRxQualFullBER = "greater than 15.0" Else ServRxQualFullBER =(2^ServRxQualFullBER)/10 End If ' Find the number of neighbouring cell measurements ' This is bit 1 of Byte 3 and bits 8,7 of Byte 4 ' Get Lower nibble of byte 3 LowerNibbleNCMHex = mid(RequestRawHexStr,LocationInfoHexStart+5,1) LowerNibbleNCMDec = 0 ' Get Upper Nibble of byte 4 UpperNibbleNCMHex = mid(RequestRawHexStr,LocationInfoHexStart+6,1) UpperNibbleNCMDec = 0 ' Find their decimal equivelents For convertcount = 0 To 15 If Mid(HextoDecReference,convertcount+1,1) = UpperNibbleNCMHex Then UpperNibbleNCMDec = convertcount If Mid(HextoDecReference,convertcount+1,1) = LowerNibbleNCMHex Then LowerNibbleNCMDec = convertcount Next ' Get the Bit 1 value of the Upper Nibble ' Mask 00000001 = 1 NCMbit1 = LowerNibbleNCMDec And 1 ' Get Bits 8 and 7 (from upper nibble) ' Mask 1100 = 12 NCMbit87 = UpperNibbleNCMDec And 12 ' number of neighbouring cell measurements = NCMbit1 shifted left 2 places + NCMbit87 Shifted right 2 places NeighbourNum = (NCMbit1 * 4) + (NCMbit87 \\ 4) %> NMR coded: <%= NMRHex %> Serving Cell:- DTX <%= DTX %> RXlev= <%= ServRxLevFullDec %> ( <%= ServRxLevFullDbm %> dBm) RXQual= <%= ServRxQualFullDec %> ( <%= ServRxQualFullBER %> %BER) Number of neighbour mesurements :- <%= NeighbourNum %> </wml> regards, Tim
0
hi i found a way to getthe NMR from the sim using sim tool kit but it;s in hex format smth like 00 00 00 67 00 b5....up to 16 bytes so if anyone can help in a way to decode this into some recognizable form it will be great :D

Login and answer the question