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

Make wvdial integration more robust #122

merged 16 commits into from Jan 21, 2019


None yet
3 participants
Copy link

commented Jan 21, 2019

See #116

Previously the wvdial and usb_modeswitch configurations were generated as part of the setup script. This could lead to incorrectly configured systems, e.g. when the files were deleted or incorrectly created. With this change, the generation of the configuration files is moved into Python which gives us more control to generate the correct files at the required time.

@c-w c-w requested a review from adamsclafani Jan 21, 2019


This comment has been minimized.

Copy link

commented Jan 21, 2019

Codecov Report

Merging #122 into master will decrease coverage by 0.27%.
The diff coverage is 41.4%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #122      +/-   ##
- Coverage   68.41%   68.13%   -0.28%     
  Files          20       26       +6     
  Lines        1453     1494      +41     
+ Hits          994     1018      +24     
- Misses        459      476      +17
Impacted Files Coverage Δ
opwen_email_client/webapp/ 45.86% <ø> (ø) ⬆️
opwen_email_client/domain/modem/ 100% <100%> (ø)
opwen_email_client/domain/modem/ 100% <100%> (ø)
opwen_email_client/domain/sim/ 100% <100%> (ø)
opwen_email_client/domain/modem/ 100% <100%> (ø)
opwen_email_client/webapp/ 100% <100%> (ø) ⬆️
opwen_email_client/webapp/forms/ 42.85% <25%> (+2.04%) ⬆️
opwen_email_client/domain/sim/ 30.76% <30.76%> (ø)
opwen_email_client/webapp/ 35.78% <34.69%> (+1.33%) ⬆️
opwen_email_client/domain/modem/ 38.09% <38.09%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b307cf5...53fc594. Read the comment docs.


This comment has been minimized.

Copy link
Member Author

commented Jan 21, 2019

@adamsclafani The wvdial parts of this code have been tested against a modem, but unfortunately I don't currently have access to a modem that requires usb_modeswitch. Could you please test the PR against one of your modems? Thanks in advance.

Here's the snippet that I used to verify the code against the hardware without having to set up the entire Lokole stack:

from opwen_email_client.webapp.actions import StartInternetConnection
from time import sleep

internet = StartInternetConnection('./modeswitch', './wvdial', 'Hologram_World')

print('starting connection')
with internet():
    print('connection established')
    sleep(5)  # verify that the modem's connection light is solid during these seconds
    print('connection shut down')

@c-w c-w force-pushed the wvdial branch from e66cbb0 to 10f4349 Jan 21, 2019

@c-w c-w force-pushed the wvdial branch from f73951f to b7e2e1f Jan 21, 2019


This comment has been minimized.

Copy link

commented Jan 21, 2019

Everything looks good! My modem doesn't need usb_modeswitch anymore.

One thing to note is that my wvdial config is different and my modem doesn't work with the default hologram wvdial config. We'll need to add a new config type for as well.


This comment has been minimized.

Copy link

commented Jan 21, 2019

After this is done we can add:

while not _dialer_is_connected(
     if connection.poll() is not None:
          raise Exception(...)

This will catch wvdial errors right away as wvdial will exit when there is a wonky config

@c-w c-w merged commit f920763 into master Jan 21, 2019

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed
Details No dependencies with known security vulnerabilities.

@c-w c-w deleted the wvdial branch Jan 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.