1

I want to run the core simulator of https://github.com/P1sec/pycrate. And I want to run SERVER_ENB only, so configure like below and create a server.

from pycrate_corenet import Server

Server.CorenetServer.SERVER_HNB = {}
Server.CorenetServer.SERVER_ENB['IP'] = '127.0.0.1'
Server.CorenetServer.SERVER_ENB['GTPU'] = '127.0.0.1'

epc = Server.CorenetServer()

But, I got following error.

$ sudo /usr/local/anaconda3/bin/python EPC.py 
CorenetServer: loading all ASN.1 and NAS modules, be patient...
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/anaconda3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/local/anaconda3/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/anaconda3/lib/python3.6/site-packages/pycrate-0.3-py3.6.egg/pycrate_corenet/Server.py", line 345, in start
    self.GTPUd = self.__class__.GTPUd()
  File "/usr/local/anaconda3/lib/python3.6/site-packages/pycrate-0.3-py3.6.egg/pycrate_corenet/ServerGTPU.py", line 466, in __init__
    sk.bind((gtpip, self.GTP_PORT))
OSError: [Errno 99] Cannot assign requested address

How can I run the server? Could you give a usage for this pycrate corenet?

정도유
  • 559
  • 4
  • 6

2 Answers2

1

this port is probably occupied by something else (including the other instance on this server). If you're on Linux - you can check if it's already listen with netstat -anp | grep 36412. Then if something listed there you have to kill the app or change server's port in SERVER_ENB structure

1

I got a solution.

from pycrate.pycrate_corenet import Server, ServerGTPU

Server.CorenetServer.SERVER_HNB = {}
Server.CorenetServer.SERVER_ENB['IP'] = '127.0.0.1'
Server.CorenetServer.SERVER_ENB['GTPU'] = '127.0.0.1'

ServerGTPU.GTPUd.GTP_IF = ['127.0.0.1']  # set GTP IP

epc = Server.CorenetServer()
정도유
  • 559
  • 4
  • 6