Exemplo n.º 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)
Exemplo n.º 2
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)
Exemplo n.º 3
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)
Exemplo n.º 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)
Exemplo n.º 5
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)
Exemplo n.º 6
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)
Exemplo n.º 7
0
 def __sendRrcConnectionSetupComplete__(self):
     self.ioService.sendMessage(self.enbAddress, *rrcConnectionSetupComplete(self.rrcTransactionIdentifier, 
         self.rrcEstablishmentInputParameters["selectedPlmnIdentity"], self.rrcEstablishmentInputParameters["initialNasMessage"]))