hologram-io / hologram-python

Hologram device-side Python SDK - Send messages to the cloud in just 3 lines of code!
https://hologram.io/
MIT License
89 stars 47 forks source link

Implement Location for Nova M #38

Closed SethKitchen closed 4 years ago

SethKitchen commented 4 years ago

Is your feature request related to a problem? Please describe.

Location has not been implemented for NB-IoT/4G Nova.

https://github.com/hologram-io/hologram-python/blob/develop/Hologram/Network/Modem/NovaM.py

"raise NotImplementedError('The R404 and R410 do not support Cell Locate at this time')"

Describe the solution you'd like

Please implement or give suggestions to implement.

Describe alternatives you've considered

I tried to implement like Nova_U201 . but PDP mode is failing. See

 @property
def location(self):
    print('sending scan command')
    temp_loc = self.last_location
    if self._set_up_pdp_context():
        self.last_location = None
        ok, r = self.set('+ULOC','2,3,0,120,15,1')
        if ok!=ModemResult.OK:
          print('Location request failed')
          return None
        while self.last_location is None and self._is_pdp_context_active():
          self.checkURC()
    if self.last_location is None:
      self.last_location = temp_loc
    return self.last_location

but it seems the PDP mode doesn't work.

self._set_up_pdp_context

fails.

sending scan command
ERROR: PDP Context setup failed
ERROR: Failed PDP context setup

Additional context

Uses: https://www.u-blox.com/sites/default/files/SARA-R4_ATCommands_%28UBX-17003787%29.pdf CTL+F for "Cell Locate" https://www.u-blox.com/sites/default/files/GNSS-Implementation_AppNote_%28UBX-13001849%29.pdf "AT Examples"

image

DomAmato commented 4 years ago

I think I am goona close this with a won't fix due to the fact the R410 does not have this capability built in and thus would require the nova to be either redesigned to include a module or some other R410 board and in that case would just be a new modem class.

For anyone who is curious why this forum thread will explain why: https://community.hologram.io/t/locate-with-nova-r410-m/3840/12