-
Notifications
You must be signed in to change notification settings - Fork 58
wifi: add support to discover and connect to access points #72
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
Conversation
| * @see #setWiFiReceiveTimeout(int) | ||
| */ | ||
| public AccessPoint getAccessPoint(String ssid) throws XBeeException { | ||
| logger.debug("{}AS for '{}' access point.", toString(), ssid); |
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.
Should we throw a NullPointerException if ssid == null?
| * @return The discovered access point with the given SSID, {@code null} | ||
| * if the timeout expires and the access point was not found. | ||
| * | ||
| * @throws InterfaceNotOpenException if the device is not open. |
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.
For consistency with other methods, write if this device connection is not open..
| * {@code getWiFiReceiveTimeout} method.</p> | ||
| * | ||
| * <p>Once the module is connected to the access point, you can issue | ||
| * the {@code writeSettings} method to save the connection settings. This |
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.
Maybe it's better to put {@link #writeChanges()} instead.
| * {@code getWiFiReceiveTimeout} method.</p> | ||
| * | ||
| * <p>Once the module is connected to the access point, you can issue | ||
| * the {@code writeSettings} method to save the connection settings. This |
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.
Maybe it's better to put {@link #writeChanges()} instead.
| * @throws NullPointerException if {@code ssid == null}. | ||
| * @throws TimeoutException if there is a timeout sending the connect | ||
| * commands. | ||
| * @throws XBeeException if the access point with the provided SSID is |
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.
Without seeing the code, I don't understand the first part of the sentence.
| * @throws NullPointerException if {@code ssid == null} or | ||
| * if {@code encryptionType == null}. | ||
| * | ||
| * @see com.digi.xbee.api.models.WiFiEncryptionType |
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.
Add @see #AccessPoint(String, WiFiEncryptionType).
| * Returns the operating channel of the access point. | ||
| * | ||
| * @return The operating channel of the access point. | ||
| */ |
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.
Add @see #setChannel(int).
| * Sets the new channel of the access point. | ||
| * | ||
| * @param channel The new channel of the access point. | ||
| */ |
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.
Add @see #getChannel().
| * Returns the signal quality with the access point in %. | ||
| * | ||
| * @return The signal quality with the access point in %. | ||
| */ |
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.
Add @see #setSignalQuality(int).
| * Sets the new signal quality with the access point. | ||
| * | ||
| * @param signalQuality The new signal quality with the access point. | ||
| */ |
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.
Add @see #getSignalQuality().
- Added a new enumerator (WiFiAssociationIndicationStatus) to list the possible encryption types for the Wi-Fi access points. - Added the AccessPoint class that represents an access point. - Added new methods to discover access points, get a specific one, connect, disconnect and check connection status. - Added new methods to get and set the Wi-Fi receive timeout, used to connect, disconnect and discover access points. - Written the unit tests for the new code and updated some others. Signed-off-by: Diego Escalona <diego.escalona@digi.com>
a0a3065 to
0f2b7db
Compare
possible encryption types for the Wi-Fi access points.
and disconnect.
connect, disconnect and discover access points.
Signed-off-by: Diego Escalona diego.escalona@digi.com