endaga / openbts-python

python client for OpenBTS
http://openbts.org/documentation/
3 stars 5 forks source link

IP addr and data usage api #17

Closed yosemitebandit closed 9 years ago

yosemitebandit commented 9 years ago

PTAL -- creates an API for getting the IP addr and GPRS data usage rates for a subscriber (or for all subs)

subscribers had ipaddr and port attributes already, but those are really their openbts_ipaddr and openbts_port, so I changed those names accordingly.

shaddi commented 9 years ago

Oh snap! Exciting. Question: what happens when an IMSI shows up multiple times in the MS list, and what happens if the IMSI has multiple IPs associated with it?

yosemitebandit commented 9 years ago

would loooove to get the output of gprs list for edge cases like these so I can add it to the tests. Currently, the parsing would still work, but it would be "last IMSI or listed IP wins"

yosemitebandit commented 9 years ago

I can play around with GPRS too to try and generate these odd results.

shaddi commented 9 years ago

I'll be doing some GPRS testing this week w/ a full-scale CCN1 so I'll see if I can generate that for you.

yosemitebandit commented 9 years ago

awesome, I was unable to generate any GPRS weirdness last night, but I was just testing with one phone so that's to be expected. (On the plus side this openbts-python lib did seem to be working, it was fetching GPRS data from the live instance.)

more files like this one would be fantastic.

shaddi commented 9 years ago

Got it, how was that generated, OpenBTSCLI -c "gprs list ms -v"?

yosemitebandit commented 9 years ago

I'm just getting the full output: OpenBTSCLI -c "gprs list"

shaddi commented 9 years ago

Ok, got it!

yosemitebandit commented 9 years ago

what do you think about merging this now and then doing a PR later when we get weird gprs list logfiles?

shaddi commented 9 years ago

sgtm!