Created
October 28, 2014 16:31
-
-
Save yosemitebandit/835799c3a4a1321236cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' communicating to openbts through zeromq | |
''' | |
import json | |
import zmq | |
address = 'tcp://127.0.0.1:45060' | |
context = zmq.Context() | |
socket = context.socket(zmq.REQ) | |
socket.connect(address) | |
payload = { | |
'target': 'openbts', | |
'command': 'config', | |
'action': 'read', | |
'key': '' | |
} | |
print 'request:', json.dumps(payload) | |
socket.send(json.dumps(payload)) | |
response = socket.recv() | |
print 'response:', response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment