کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی
کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی

decode SMS-DELIVER


پیامک دریافتی 



SMS DELIVER:
SCA-PDU TYPE-OA-PID-DCS-SCTS-UDL-UD


07917238010010F5040BC87238880900F100009930925161958003C16010


-SCA : 07917238010010F5

--Length: 07 in hex (2byte:2digits)

--10010001 : 91 ( + ) International code

including EXT,TON,NPI

TON ( Type of number ) :bit 6,5,4

000 Unknown

001 International number

010 National number

100 Subscriber number
101 Alphanumeric, (coded according to 3GPP TS 23.038 [9] GSM 7-bit default alphabet)
110 Abbreviated number

NPI ( Numbering plan ) bit 3,2,1,0

0000 Unknown
0001 ISDN/telephone numbering plan (E.164/E.163)
0011 Data numbering plan (X.121)
0100 Telex numbering plan

1000 National numbering plan

1001 Private numbering plan

--7238010010F5
---Ext:1;TON:001;NPI:0001

---Reverse number 2byte from the left

27831000015

So Address is ... +27831000015

-PDU Type : 04 in hex 

MTI :

00         MS>SC SMS-DELIVER-REPORT

00         SC>MS SMS-DELIVER

01         MS>SC SMS-SUBMIT

01        SC>MS SMS-SUBMIT-REPORT

10        MS>SC SMS-COMMAND

10        SC>MS SMS-STATUS-REPORT

11        any           Reserved        


--00000100 ( bit7....bit0 )

---bit0,1 : 00 : SMS-DELIVER

---bit2 : 1 : MMS (0=More message)

---bit3 : 0

---bit5 : 0 : SRI (Status report indication)

---bit6 : 0 : UDHI

---bit7 : 0 : RP(Reply path) 

-OA : 0BC87238880900F1

From this address issued

--Length : 0B in hex

--11001000 : C8

Including EXT,TON,NPI

bit3..0 : NPI : 1000 :national numbering

bit6.4 : TON : 100 : Subscriber number

bit7 : EXT : 1 : Extension

--7238880900F1

---Reverse number 2byte from the left 

27838890001

-PID : 00

-DCS : 00

-SCTS : 99309251619580

Time stamp

2099/03/29 15:16:59 08

-UDL : 03

UD : C16010


Decoding UD (user data)


-Reverse hex

10 60 C1

-Hex to binary (octet : 8bit)

00010000 01100000 11000001

-Remove Extra zero from the left

[int(3×(7÷8))+1]×8-3×7=3

10000 01100000 11000001

-set 7bit binary

1000001 1000001 1000001

-Binary to hex

41 41 41

-Revers hex (Bring the hexes in order from end to first)

41 41 41

-Hex to string

AAA




Finally decided done successfully




00040A91890100358500001230205181020C074374589EA6E701


-4374589EA6E701

01 E7 A6 9E 58 74 43

00000001 11100111 10100110

10011110 01011000 01110100

01000011


[int(7×7/8)+1]×8-7×7=7


00000001 11100111 10100110

10011110 01011000 0111010



1111001 1110100 1101001

1110010 1100001 1101000

1000011


01111001 01110100 01101001

01110010 01100001 01101000

01000011


-79 74 69 72 61 68 43


-43 68 61 72 69 74 79


hex to string (43686172697479)


----------------------------------

-Example 

Encoding :

69 Character Or 69 Hex

7bit>8bit ... Add Zero

[int(69×(7÷8))+1]×8-69×7=5

61×8-69×7=5

Decoding :

61 Hex

8bit>7bit ... Remove zero

61×8-int(61×8/7)=5

61×8-69×7=5

----------------------------------


-Encode following hexes


5a6f6f647461722062696120696e6a

6120756e6a61206e612e




Reverse Hex :

2e 61 6e 20 61 6a 6e 75 20 61 6a 6e

69 20 61 69 62 20 72 61 74 64 6f 6f

5a

Hex to ninary , only 7bit from right

0101110 1100001 1101110 0100000

1100001 1101010 1101110 1110101

0100000 1100001 1101010 1101110

1101001 0100000 1100001 1101001

1100010 0100000 1110010 1100001

1110100 1100100 1101111 1101111

1011010

Add Zero to the left

Hex or chararter count : 25

[int(25×(7÷8))+1]×8-25×7=

22×8-25×7=1

0 0101110 1100001 1101110 0100000

1100001 1101010 1101110 1110101

0100000 1100001 1101010 1101110

1101001 0100000 1100001 1101001

1100010 0100000 1110010 1100001

1110100 1100100 1101111 1101111

1011010

8bit

00101110 11000011 10111001

00000110 00011101 01011011

10111010 10100000 11000011

10101011 01110110 10010100

00011000 01110100 11100010 01000001 11001011 00001111

01001100 10011011 11110111

11011010

Binary to hex

 00101110 11000011 10111001

2e c3 b9

00000110 00011101 01011011

06 1d 5b

10111010 10100000 11000011

ba a0 c3

10101011 01110110 10010100

ab 76 94

00011000 01110100 11100010

18 74 e2

01000001 11001011 00001111

41 cb 0f

01001100 10011011 11110111

4c 9b f7

11011010

da

Reverse hex

da f7 9b 4c 0f cb 41 e2 74 18 94 76 ab

c3 a0 ba 5b 1d 06 b9 c3 2e


25 (character)  to hex : 25÷16=1,Reminder=9>>19

00040A91890100358500003220208080120819daf79b4c0fcb41e274189476abc3a0ba5b1d06b9c32e



decoding

da f7 9b 4c 0f cb 41 e2 74 18 94 76 ab c3 a0 ba 5b 1d 06 b9 c3 2e

Reverse hex and convert to binary

00101110 11000011 10111001

00000110 00011101 01011011

10111010 10100000 11000011

10101011 01110110 10010100

00011000 01110100 11100010 01000001 11001011 00001111

01001100 10011011 11110111

11011010

Remove zero

Hex_Count=22

22×8-25×7=1

00101110 11000011 10111001

00000110 00011101 01011011

10111010 10100000 11000011

10101011 01110110 10010100

00011000 01110100 11100010 01000001 11001011 00001111

01001100 10011011 11110111

11011010


0101110 11000011 10111001

00000110 00011101 01011011

10111010 10100000 11000011

10101011 01110110 10010100

00011000 01110100 11100010 01000001 11001011 00001111

01001100 10011011 11110111

11011010

-7bit to hex (can add zero to each 7bit then convert to hex)

0101110 1100001 1101110

2e 61 6e

0100000 1100001 1101010

20 61 6a

1101110 1110101 0100000

6e 75 20

1100001 1101010 1101110

61 6a 6e

1101001 0100000 1100001

69 20 61

1101001 1100010 0100000

69 62 20

1110010 1100001 1110100

72 61 74

1100100 1101111 1101111

64 6f 6f

1011010

5a


2e 61 6e 20 61 6a 6e 75 20 61 6a 6e

69 20 61 69 62 20 72 61 74 64 6f 6f

5a

Reverse hex and convert to string

5a6f6f647461722062696120696e6a

6120756e6a61206e612e