1
0
Fork 0

ussd: Add nokia registerSS message not handled by NITB

This commit is contained in:
Holger Hans Peter Freyther 2016-08-15 21:13:50 +02:00
parent 4cd403960d
commit 91ef01ca73
1 changed files with 20 additions and 10 deletions

View File

@ -28,6 +28,10 @@ FakeBTS.OpenBSCTest subclass: USSDTest [
16r0C 16r06 16r1B 16r01 16r7F 16r01 16r00]
]
USSDTest class >> nokiaRegisterSS [
^#[11 123 28 13 161 11 2 1 3 2 1 14 48 3 4 1 33 127 1 0]
]
USSDTest class >> interrogateSS [
^#[16r1B 16r7B 16r1C 16r0D 16rA1 16r0B 16r02
16r01 16r01 16r02 16r01 16r0E 16r30 16r03
@ -35,19 +39,21 @@ FakeBTS.OpenBSCTest subclass: USSDTest [
]
startTest [
"1. Connect to the BTS"
" bts := self createBTS.
bts btsId: '106/0/0'.
bts connect: '192.168.46.1'.
bts waitForBTSReady."
self createAndConnectBTS: '1234/0/0'.
self createAndConnectBTS: '1801/0/0'.
self
testUSSDMessage
]
expect: aClass from: aLchan [
| msg |
msg := GSM48MSG decode: aLchan nextSapi0Msg readStream.
(msg isKindOf: aClass)
ifFalse: [^self error: 'Got wrong type wanted ', aClass name asString, ' got ', msg class asString].
]
testUSSDMessage [
| tmsi cm lchan |
| tmsi cm lchan msg |
tmsi := self allocateTmsi: '901010000001111'.
@ -59,10 +65,13 @@ FakeBTS.OpenBSCTest subclass: USSDTest [
cm mi tmsi: tmsi.
lchan sendGSM: cm toMessage.
"4. USSD messages"
lchan sendGSM: self class interrogateSS sapi: 3.
self expect: GSM48CMServiceAccept from: lchan.
stdin next.
"4. USSD messages"
lchan sendGSM: self class nokiaRegisterSS sapi: 0.
"5. Read message"
self expect: GSM48SSReleaseComplete from: lchan.
]
]
@ -73,4 +82,5 @@ Eval [
startTest;
stopBts;
yourself.
ObjectMemory quit: 23
]