Skip to content

Conversation

@diescalo
Copy link
Member

@diescalo diescalo commented Dec 5, 2016

  • 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
    and disconnect.
  • 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

@diescalo diescalo added this to the cellular milestone Dec 5, 2016
* @see #setWiFiReceiveTimeout(int)
*/
public AccessPoint getAccessPoint(String ssid) throws XBeeException {
logger.debug("{}AS for '{}' access point.", toString(), ssid);
Copy link
Member

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.
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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.
*/
Copy link
Member

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.
*/
Copy link
Member

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 %.
*/
Copy link
Member

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.
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add @see #getSignalQuality().

@rubenmoral rubenmoral modified the milestones: wifi, cellular Dec 9, 2016
@rubenmoral rubenmoral assigned diescalo and unassigned rubenmoral Dec 9, 2016
- 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>
@diescalo diescalo force-pushed the diescalo/wifi_access_points branch from a0a3065 to 0f2b7db Compare December 12, 2016 11:40
@diescalo diescalo merged commit 0f2b7db into diescalo/XBJAPI-317 Dec 12, 2016
@diescalo diescalo deleted the diescalo/wifi_access_points branch December 12, 2016 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants