-
Notifications
You must be signed in to change notification settings - Fork 56
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
Implemented 3G USB dongle setup CLI command #1597
base: master
Are you sure you want to change the base?
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @rwaldron (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Resolves #541 |
1 similar comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great start! 👏 I have a few suggestions to match the coding style of this repo and expected command interface based on the existing t2 wifi
and t2 ap
commands.
Do you know if you are able to connect to the 3g network and start an access point at the same time?
I can help out with creating some tests for this command if you're new to nodeunit.
Let me know if you have any questions
@@ -0,0 +1,119 @@ | |||
var Tessel = require('./tessel'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the use of var
in this file to const
? Those variables are never reassigned so we can optimize with the use of const
.
return this.configure3gDongle(apn, dialnumber, username, password); | ||
}); | ||
}).catch(() => { | ||
return this.configure3gDongle(apn. dialnumber, username, password); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There appears to be a typo here.
return this.configure3gDongle(apn. dialnumber, username, password); | |
return this.configure3gDongle(apn, dialnumber, username, password); |
var off = options.off; | ||
var status = options.status; | ||
|
||
if (config) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the wifi
and ap
commands, I would expect configuration to be the default mode of the 3g
command. For example:
t2 3g --apn="" --dialnumber="" --username="" --password=""
I would expect that command alone to configure the Tessel to connect to that 3g network and be enabled.
If none of those configuration options are passed in, i.e. t2 3g
, I would expect to see the current configuration and status of 3g mode. Just like if you use t2 wifi
, the cli will return the current details of the Tessel's wifi connection (if it is connected).
This commit implements a simple way of configuring 3G USB dongles which automatically gets detected by OpenWrt. It has been tested with a HUAWAI E173.
You can use the command like this: