uw-ictd / colte

Community LTE Project
MIT License
59 stars 27 forks source link

"coltedb add" command should include apn #81

Closed infrared0 closed 3 years ago

infrared0 commented 3 years ago

"coltedb add" on the command line currently doesn't allow an apn setting, and some phones require this to attach. I would like to add this functionality. (In particular, some phones strangely require the hardcoded string 'ims' as the apn name.)

spencersevilla commented 3 years ago

1) Current behavior is that coltedb sets a default APN of "internet" for each subscriber that it adds.

2) Are you sure these phones require the "ims" APN even for basic data/Internet access? In the past, for the data channel, every phone I've seen either uses a default APN of "internet" or will send an APN request for whatever value you configure. The behavior you're describing is familiar to me, but only for IMS/VoLTE connecting (e.g. one default APN "internet" and a second APN "ims").

3) Specifically which phone models require "ims" for data? I'm super curious here. If it's a ton of phones, I might have to rethink my position.

4) In general, I'm not thrilled with adding an additional option. As open5gs has stabilized, CoLTE's kind of shifted into easy-to-use tools to help network admins quickly get setup with open5gs. I see your problem, but am trying to weigh this against adding complexity and explaining what an APN is, requiring the same value typed for each user, etc. My goal was to have coltedb be super simple basics, the bare minimum needed for a network operator (i.e. keys and IP addresses), and more complex or telecom-specific options to be managed using the open5gs web interface (which you can always use to set or change APNs). As a suggestion, if you add it as a "secret" or optional option (e.g. if they leave it blank the default val is "internet" but if they add a line like apn="ims" it changes) I'm much more ok with it.

infrared0 commented 3 years ago

For the LG G8 ThinQ phone, "ims" is the only APN value that works to get the phone to attach at all unfortunately, and this is one of the cheapest CBRS phones available right now so I think it is important. But I'll try out different values with other phones (eg Pixel 4) and see if the behavior is the same. APN is a value you often have to set with smaller mobile carriers anyway, so I don't think it's that hard to explain (especially if it's required to get the phone on the network).

Broadly I agree that the web interface should be used instead, but I have found it to be less stable than I need, and sometimes database updates just fail. I think we do need a "bulk add" option for operators to make network startup easier.

spencersevilla commented 3 years ago

This is very true about the open5gs web interface. Would love to fix that but hate digging into someone else's web-code. Agree 100% about bulk-add; that's one of the main uses (in my eyes) of coltedb, you can script it.

Still not convinced that we need to make APN a first-class citizen. You're correct that many small mobile operators have to set APN themselves (until you get big enough to issue a PR against https://android.googlesource.com/device/sample/+/master/etc/apns-full-conf.xml) but this is not the case for any fixed wireless devices, to my understanding - they just attach with whatever APN they're given. When I talk about not introducing additional complexity thats actually the specific demographic I'm envisioning - network operators who speak IP and keys, but not APN. Even though I don't want it required for every entry, I'm super on board for it as an optional setting (which is then bulk scriptable via copy-paste). Maybe both it and msisdn should be optional since fixed-wireless devices obviously don't have phone numbers.

@matt9j @sudheesh001 thoughts?

infrared0 commented 3 years ago

I'd agree with making it and msisdn optional, but given how the code is written now (msisdn as 2nd argument), it's not as simple as making them both optional based on number-of-arguments logic since you can't specify which arguments you've included vs left out. If we could include option flags (ie "-m" or something) the order wouldn't matter. For now I'm ok to make the minimal necessary change to make apn possible to specify optionally and keep msisdn required, but this is something I'd like to potentially come back to.