Beispiel #1
0
 def test_rrcConnectionEstablishmentSuccessSubsequentRrcCompleteIgnored(
         self):
     self.enbResult = None
     temporaryCrnti = 0
     uplinkGrant = 34
     rrcTransactionIdentifier = 0
     interface, channelInfo, message = rrcConnectionRequest(
         temporaryCrnti, "randomValue", 3434, "moSignaling")
     self.enbProcedure.handleRrcEstablishmentMessage(
         (localhost(), 9001), interface, channelInfo, message, {
             "temporaryCrnti": temporaryCrnti,
             "uplinkGrant": uplinkGrant,
             "rrcTransactionIdentifier": rrcTransactionIdentifier
         })
     time.sleep(0.2)
     interface, channelInfo, message = rrcConnectionSetupComplete(
         rrcTransactionIdentifier, 28001,
         {"nasMessageType": "attachRequest"})
     self.enbProcedure.handleRrcEstablishmentMessage(
         (localhost(), 9001), interface, channelInfo, message)
     self.assertEqual(self.enbResult,
                      EnbRrcConnectionEstablishmentProcedure.Success)
     time.sleep(0.2)
     self.enbResult = None
     self.enbProcedure.handleRrcEstablishmentMessage(
         (localhost(), 9001), interface, channelInfo, message)
     time.sleep(0.2)
     self.assertEqual(self.enbResult, None)
Beispiel #2
0
 def test_noRrcConnectionSetupCompleteReceived(self):
     time.sleep(0.1)
     temporaryCrnti = 0
     self.ueIoServices[0].sendMessage(
         (localhost(), 9000),
         *rrcConnectionRequest(temporaryCrnti, "randomValue", 3434,
                               "moSignaling"))
     time.sleep(2.5)  # more than 3* 0.5 = 1.5 seconds  + 0.5 seconds
Beispiel #3
0
 def test_singleUeRrcEstablishmentSuccess(self):
     time.sleep(0.1)
     temporaryCrnti = 0
     rrcTransactionIdentifier = 0
     self.ueIoServices[0].sendMessage((localhost(), 9000), *rrcConnectionRequest(
         temporaryCrnti, "randomValue", 3434, "moSignaling"))
     self.ueIoServices[0].sendMessage((localhost(), 9000), *rrcConnectionSetupComplete(
         rrcTransactionIdentifier, 28001, {"nasMessageType": "attachRequest"}))
     time.sleep(0.1) # ensure the enb call back is not waiting for rrc complete
     self.assertEqual(self.enb.state.uePool.numUes(), 1)
Beispiel #4
0
 def test_nUeRrcEstablishmentSuccess(self):
     time.sleep(0.1)
     for temporaryCrnti, s in enumerate(self.ueIoServices):
         s.sendMessage((localhost(), 9000), *rrcConnectionRequest(
             temporaryCrnti, "randomValue", 3434, "moSignaling") )
         time.sleep(0.1)  # need this to solve issue of synch
     for rrcTransactionIdentifier, s in enumerate(self.ueIoServices):
         s.sendMessage((localhost(), 9000), *rrcConnectionSetupComplete(
             rrcTransactionIdentifier, 28001, {"nasMessageType": "attachRequest"}))
         time.sleep(0.1)
     time.sleep(0.1) # need this to solve issue of synch
     self.assertEqual(self.enb.state.uePool.numUes(), self.numUes)
Beispiel #5
0
 def __sendRrcConnectionRequest__(self):
     interface, channelInfo, message = rrcConnectionRequest(self.temporaryCrnti, self.rrcEstablishmentInputParameters["ueIdentityType"],
                                                            self.rrcEstablishmentInputParameters["ueIdentityValue"],
                                                            self.rrcEstablishmentInputParameters["rrcEstablishmentCause"])
     self.ioService.sendMessage(self.enbAddress, interface, channelInfo, message)
     self.rrcConnectionRequestMessage = message # need to store this to compre with macCRI
     self.waitForRrcConnectionSetupTimerT300 = self.ioService.createTimer(
         self.procedureParameters["rrcConnectionSetupTimeoutT300"], self.__onRrcConnectionSetupTimeout__)
     self.waitForRrcConnectionSetupTimerT300.start()
     self.waitForMacContentionResolutionTimer = self.ioService.createTimer(
         self.procedureParameters["macContentionResolutionTimeout"], self.__onContentionResolutionTimeout__)
     self.waitForMacContentionResolutionTimer.start()
Beispiel #6
0
 def test_noRrcConnectionSetupCompleteReceived(self):
     self.enbResult = None
     temporaryCrnti = 0
     uplinkGrant = 34
     rrcTransactionIdentifier = 0
     interface, channelInfo, message = rrcConnectionRequest(temporaryCrnti, "randomValue", 3434, "moSignaling")
     self.enbProcedure.handleRrcEstablishmentMessage((localhost(), 9001),  interface, channelInfo, message, {
         "temporaryCrnti": temporaryCrnti,
         "uplinkGrant": uplinkGrant, 
         "rrcTransactionIdentifier": rrcTransactionIdentifier
     })
     time.sleep(1.7) # more than 3 * 0.5 = 1.5 seconds
     self.assertEqual(self.enbResult,
         EnbRrcConnectionEstablishmentProcedure.ErrorNoRrcConnectionCompleteMessage)
Beispiel #7
0
 def test_nUeRrcEstablishmentSuccess(self):
     time.sleep(0.1)
     for temporaryCrnti, s in enumerate(self.ueIoServices):
         s.sendMessage((localhost(), 9000),
                       *rrcConnectionRequest(temporaryCrnti, "randomValue",
                                             3434, "moSignaling"))
         time.sleep(0.1)  # need this to solve issue of synch
     for rrcTransactionIdentifier, s in enumerate(self.ueIoServices):
         s.sendMessage((localhost(), 9000),
                       *rrcConnectionSetupComplete(
                           rrcTransactionIdentifier, 28001,
                           {"nasMessageType": "attachRequest"}))
         time.sleep(0.1)
     time.sleep(0.1)  # need this to solve issue of synch
     self.assertEqual(self.enb.state.uePool.numUes(), self.numUes)
Beispiel #8
0
 def test_singleUeRrcEstablishmentSuccess(self):
     time.sleep(0.1)
     temporaryCrnti = 0
     rrcTransactionIdentifier = 0
     self.ueIoServices[0].sendMessage(
         (localhost(), 9000),
         *rrcConnectionRequest(temporaryCrnti, "randomValue", 3434,
                               "moSignaling"))
     self.ueIoServices[0].sendMessage(
         (localhost(), 9000),
         *rrcConnectionSetupComplete(rrcTransactionIdentifier, 28001,
                                     {"nasMessageType": "attachRequest"}))
     time.sleep(
         0.1)  # ensure the enb call back is not waiting for rrc complete
     self.assertEqual(self.enb.state.uePool.numUes(), 1)
Beispiel #9
0
 def test_rrcConnectionEstablishmentSuccess(self):
     self.enbResult = None
     temporaryCrnti = 0
     uplinkGrant = 34
     rrcTransactionIdentifier = 0
     interface, channelInfo, message = rrcConnectionRequest(temporaryCrnti, "randomValue", 3434, "moSignaling")
     self.enbProcedure.handleRrcEstablishmentMessage((localhost(), 9001),  interface, channelInfo, message, {
         "temporaryCrnti": temporaryCrnti,
         "uplinkGrant": uplinkGrant, 
         "rrcTransactionIdentifier": rrcTransactionIdentifier
     })
     time.sleep(0.2)
     interface, channelInfo, message = rrcConnectionSetupComplete(rrcTransactionIdentifier, 28001, {"nasMessageType": "attachRequest"})
     self.enbProcedure.handleRrcEstablishmentMessage((localhost(),9001),  interface, channelInfo, message)
     self.assertEqual(self.enbResult,
         EnbRrcConnectionEstablishmentProcedure.Success)
Beispiel #10
0
 def test_noRrcConnectionSetupCompleteReceived(self):
     self.enbResult = None
     temporaryCrnti = 0
     uplinkGrant = 34
     rrcTransactionIdentifier = 0
     interface, channelInfo, message = rrcConnectionRequest(
         temporaryCrnti, "randomValue", 3434, "moSignaling")
     self.enbProcedure.handleRrcEstablishmentMessage(
         (localhost(), 9001), interface, channelInfo, message, {
             "temporaryCrnti": temporaryCrnti,
             "uplinkGrant": uplinkGrant,
             "rrcTransactionIdentifier": rrcTransactionIdentifier
         })
     time.sleep(1.7)  # more than 3 * 0.5 = 1.5 seconds
     self.assertEqual(
         self.enbResult, EnbRrcConnectionEstablishmentProcedure.
         ErrorNoRrcConnectionCompleteMessage)
Beispiel #11
0
 def test_noRrcConnectionSetupCompleteReceived(self):
     time.sleep(0.1)
     temporaryCrnti = 0
     self.ueIoServices[0].sendMessage((localhost(), 9000), *rrcConnectionRequest(temporaryCrnti, "randomValue", 3434, "moSignaling"))
     time.sleep(2.5) # more than 3* 0.5 = 1.5 seconds  + 0.5 seconds