Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconnecting PPP after disconnecting fails with route error #31

Closed
DomAmato opened this issue Apr 21, 2020 · 0 comments
Closed

Reconnecting PPP after disconnecting fails with route error #31

DomAmato opened this issue Apr 21, 2020 · 0 comments
Labels
bug for issues

Comments

@DomAmato
Copy link
Contributor

Describe the problem

2020-04-21 20:58:01,370 [INFO] Hologram.Network.Network (2990): Adding routes to Hologram cloud
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/pi/ftp/hologram/__main__.py", line 32, in <module>
    pinger.run()
  File "/home/pi/ftp/hologram/pinger.py", line 67, in run
    self.upload()
  File "/home/pi/ftp/hologram/pinger.py", line 101, in upload
    self.hologram.network.connect()
  File "/usr/local/lib/python3.7/dist-packages/Hologram/Network/Cellular.py", line 77, in connect
    self.__configure_routing()
  File "/usr/local/lib/python3.7/dist-packages/Hologram/Network/Cellular.py", line 170, in __configure_routing
    self._route.add('10.176.0.0/16', self.localIPAddress)
  File "/usr/local/lib/python3.7/dist-packages/Hologram/Network/Route.py", line 61, in add
    gateway=gateway)
  File "/usr/local/lib/python3.7/dist-packages/pyroute2/iproute/linux.py", line 1886, in route
    callback=callback)
  File "/usr/local/lib/python3.7/dist-packages/pyroute2/netlink/nlsocket.py", line 375, in nlm_request
    return tuple(self._genlm_request(*argv, **kwarg))
  File "/usr/local/lib/python3.7/dist-packages/pyroute2/netlink/nlsocket.py", line 867, in nlm_request
    callback=callback):
  File "/usr/local/lib/python3.7/dist-packages/pyroute2/netlink/nlsocket.py", line 378, in get
    return tuple(self._genlm_get(*argv, **kwarg))
  File "/usr/local/lib/python3.7/dist-packages/pyroute2/netlink/nlsocket.py", line 703, in get
    raise msg['header']['error']
pyroute2.netlink.exceptions.NetlinkError: (101, 'Network is unreachable')

Expected behavior

It should reestablish a connection without error

Actual behavior

the IP route in pyroute 2 is not removed, we tried work around in another branch because of an error reported in the forums but that still failed.

Steps to reproduce the behavior

disconnect from a PPP session and then try to reconnect

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Raspbian Buster
  • Python SDK installed via PyPI or GitHub: Develop
  • SDK version (use command below):
  • Python version: 3.7.3
  • Hardware (modem) model: Pi 3 Model B
@DomAmato DomAmato added the bug for issues label Apr 21, 2020
DomAmato added a commit that referenced this issue Apr 23, 2020
DomAmato added a commit that referenced this issue Apr 30, 2021
* Add Github Actions

* Update issue templates

use comments to hide extra details when preparing a report

* wait for the process to be terminated (#17)

* Properly handle when parsing other types of SMS PDUs (#16)

* Add chunking for messeages over 512 bytes (#15)

* Update test_Modem.py

* check python and pip versions (#19)

* simplify version check

* check python and pip version for update too

* call super.disconnect instead of connect (ensures event network.disconnected broadcast) (#22)

* remove extraneous parenthesis (#24)

* include token

* remove extraneous parenthesis (#26)

* remove travis and rename actions

* use pytest instead of coverage

* only test on 3.7 for now

* Allow sending raw AT commands to the modem (#28)

* Fix PPP Errors with disconnect and routing (#32)

Fix #30 and #31

* Concat to bytes not str (#33)

* properly convert bytestring ascii value

* convert from ascii int value to int

* make it possible to renable at sockets (#36)

* include support for Huawei Modem E372 (#21)

* include support for Huawei Modem E372 and actually works with Ubuntu and Raspbian10

* add support in class for E372 modem

Co-authored-by: Hector Mendez <[email protected]>

* Add BG96 Support (#37)

* add bg96 to modems

* update description and enable at sockets

* Update BG96.py

* check if active

* send the right permutation

* decode and use command

* wait for socket to open and handle other actions

* better urc handling

* more logging

* handle attribute errors too

* handle urc types better

* better socket state handling

* bg96 is send ok not ok

* log more info

* use set instead of command

* add send ok as possible results

* handle send ok in process response

* close properly and update read_socket

* handle recv response from urc

* fix missing imports

* clean up logging a bit

* remove another logging instance

* fix merge conflict

* fix copy pasta

* try adding config on develop

* add some more github actions (#41)

* add dependency label to config

* Dont encode buffer (#39)

* add more info to release

* Bump actions/setup-python from v1 to v2.0.2 (#51)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from v1 to v2.0.2.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v1...7a69c2b)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update psutil requirement from ~=5.6.3 to ~=5.7.2 (#50)

Updates the requirements on [psutil](https://github.com/giampaolo/psutil) to permit the latest version.
- [Release notes](https://github.com/giampaolo/psutil/releases)
- [Changelog](https://github.com/giampaolo/psutil/blob/master/HISTORY.rst)
- [Commits](giampaolo/psutil@release-5.6.3...release-5.7.2)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update hjson requirement from ~=3.0.0 to ~=3.0.1 (#48)

Updates the requirements on [hjson](https://github.com/hjson/hjson-py) to permit the latest version.
- [Release notes](https://github.com/hjson/hjson-py/releases)
- [Changelog](https://github.com/hjson/hjson-py/blob/master/history.md)
- [Commits](hjson/hjson-py@v3.0.0...v3.0.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update pyudev requirement from ~=0.21.0 to ~=0.22.0 (#45)

Updates the requirements on [pyudev](https://github.com/pyudev/pyudev) to permit the latest version.
- [Release notes](https://github.com/pyudev/pyudev/releases)
- [Changelog](https://github.com/pyudev/pyudev/blob/develop-0.22/CHANGES.rst)
- [Commits](pyudev/pyudev@v0.21.0...v0.22)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update requests requirement from ~=2.22.0 to ~=2.24.0 (#44)

Updates the requirements on [requests](https://github.com/psf/requests) to permit the latest version.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md)
- [Commits](psf/requests@v2.22.0...v2.24.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add section for dependencies

* fix broken python actions

* Update psutil requirement from ~=5.7.2 to ~=5.8.0 (#70)

Updates the requirements on [psutil](https://github.com/giampaolo/psutil) to permit the latest version.
- [Release notes](https://github.com/giampaolo/psutil/releases)
- [Changelog](https://github.com/giampaolo/psutil/blob/master/HISTORY.rst)
- [Commits](giampaolo/psutil@release-5.7.2...release-5.8.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update pyusb requirement from ~=1.0.2 to ~=1.1.0 (#59)

Updates the requirements on [pyusb](https://github.com/pyusb/pyusb) to permit the latest version.
- [Release notes](https://github.com/pyusb/pyusb/releases)
- [Commits](pyusb/pyusb@v1.0.2...v1.1.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update requests requirement from ~=2.24.0 to ~=2.25.1 (#67)

Updates the requirements on [requests](https://github.com/psf/requests) to permit the latest version.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md)
- [Commits](psf/requests@v2.24.0...v2.25.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update pyserial requirement from ~=3.4.0 to ~=3.5 (#72)

Updates the requirements on [pyserial](https://github.com/pyserial/pyserial) to permit the latest version.
- [Release notes](https://github.com/pyserial/pyserial/releases)
- [Changelog](https://github.com/pyserial/pyserial/blob/master/CHANGES.rst)
- [Commits](pyserial/pyserial@v3.4...v3.5)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Strip AT command result prefix when issued command ends with ? or % (#6)

* Strip AT command result prefix when issued command ends with ? or %

* Simplify strip of characters from AT command result

* Fix type for BG96 (#77)

* allow setting APN (#79)

* properly handle bytes when reading from an open socket (#74)

* Update pyusb requirement from ~=1.1.0 to ~=1.1.1 (#75)

Updates the requirements on [pyusb](https://github.com/pyusb/pyusb) to permit the latest version.
- [Release notes](https://github.com/pyusb/pyusb/releases)
- [Commits](pyusb/pyusb@v1.1.0...v1.1.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: akumlehn <[email protected]>
Co-authored-by: Héctor <[email protected]>
Co-authored-by: Hector Mendez <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Pethtel <[email protected]>
Co-authored-by: Reuben Balik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug for issues
Projects
None yet
Development

No branches or pull requests

1 participant