diff --git a/wpa_supplicant/binder/fi/w1/wpa_supplicant/INetwork.aidl b/wpa_supplicant/binder/fi/w1/wpa_supplicant/INetwork.aidl
index 08e5783..01c765a 100644
--- a/wpa_supplicant/binder/fi/w1/wpa_supplicant/INetwork.aidl
+++ b/wpa_supplicant/binder/fi/w1/wpa_supplicant/INetwork.aidl
@@ -25,6 +25,54 @@
 	const int ERROR_NETWORK_INVALID = 2;
 
 	/**
+	 * Constants used in Set/Get network params.
+	 */
+	/** Max length of SSID param. */
+	const int SSID_MAX_LEN = 32;
+
+	/** Length of BSSID param. */
+	const int BSSID_LEN = 6;
+
+	/** Min length of PSK passphrase param. */
+	const int PSK_PASSPHRASE_MIN_LEN = 8;
+
+	/** Max length of PSK passphrase param. */
+	const int PSK_PASSPHRASE_MAX_LEN = 63;
+
+	/** Max number of WEP keys param. */
+	const int WEP_KEYS_MAX_NUM = 4;
+
+	/** Max length of each WEP keys param. */
+	const int WEP_KEY_MAX_LEN = 16;
+
+	/** Possble mask of values for KeyMgmt param. */
+	const int KEY_MGMT_MASK_NONE = 0x01;
+	const int KEY_MGMT_MASK_WPA_PSK = 0x02;
+	const int KEY_MGMT_MASK_WPA_EAP = 0x04;
+	const int KEY_MGMT_MASK_IEEE8021X = 0xFF;
+
+	/** Possble mask of values for Proto param. */
+	const int PROTO_MASK_WPA = 0x01;
+	const int PROTO_MASK_RSN = 0x02;
+	const int PROTO_MASK_OSEN = 0x04;
+
+	/** Possble mask of values for AuthAlg param. */
+	const int AUTH_ALG_MASK_OPEN = 0x01;
+	const int AUTH_ALG_MASK_SHARED = 0x02;
+	const int AUTH_ALG_MASK_LEAP = 0x04;
+
+	/** Possble mask of values for GroupCipher param. */
+	const int GROUP_CIPHER_MASK_WEP40 = 0x01;
+	const int GROUP_CIPHER_MASK_WEP104 = 0x02;
+	const int GROUP_CIPHER_MASK_TKIP = 0x04;
+	const int GROUP_CIPHER_MASK_CCMP = 0x08;
+
+	/** Possble mask of values for PairwiseCipher param. */
+	const int PAIRWISE_CIPHER_MASK_NONE = 0x01;
+	const int PAIRWISE_CIPHER_MASK_TKIP = 0x02;
+	const int PAIRWISE_CIPHER_MASK_CCMP = 0x04;
+
+	/**
 	 * Retrieves the ID allocated to this network by wpa_supplicant.
 	 *
 	 * This is not the |SSID| of the network, but an internal identifier for
@@ -50,4 +98,125 @@
 	 *        instance.
 	 */
 	void RegisterCallback(in INetworkCallback callback);
+
+	/**
+	 * Setters for the various network params.
+	 * These correspond to elements of |wpa_sssid| struct used internally by
+	 * wpa_supplicant to represent each network.
+	 */
+	/** Set SSID for this network. Max length of |SSID_MAX_LEN|. */
+	void SetSSID(in byte[] ssid);
+
+	/**
+	 * Set the network to only connect to an AP with provided BSSSID.
+	 * Pass array of size 0 to clear this param.
+	 * Length of the value should be |BSSID_LEN|.
+	 */
+	void SetBSSID(in byte[] bssid);
+
+	/** Set whether to send Probe Requests for this network (hidden). */
+	void SetScanSSID(boolean enable);
+
+	/** Combination of |KEY_MGMT_MASK_*| values above. */
+	void SetKeyMgmt(int key_mgmt_mask);
+
+	/** Combination of |PROTO_MASK_*| values above. */
+	void SetProto(int proto_mask);
+
+	/** Combination of |AUTH_ALG_MASK_*| values above. */
+	void SetAuthAlg(int auth_alg_mask);
+
+	/** Combination of |GROUP_CIPHER_MASK_*| values above. */
+	void SetGroupCipher(int group_cipher_mask);
+
+	/** Combination of |PAIRWISE_CIPHER_MASK_*| values above. */
+	void SetPairwiseCipher(int pairwise_cipher_mask);
+
+	/**
+	 * Set passphrase for WPA_PSK network.
+	 * Min length of value is |PSK_PASSPHRASE_MIN_LEN|.
+	 * Max length of value is |PSK_PASSPHRASE_MAX_LEN|.
+	 */
+	void SetPskPassphrase(String psk);
+
+	/**
+	 * Set WEP key for WEP network.
+	 * Max length of each key is |WEP_KEY_MAX_LEN|.
+	 *
+	 * @param key_idx Index of wep key to be set.
+	 *                Max of |WEP_KEYS_MAX_NUM| keys.
+	 */
+	void SetWepKey(int key_idx, in byte[] wep_key);
+
+	/** Set default Tx key index for WEP network. */
+	void SetWepTxKeyIdx(int wep_tx_key_idx);
+
+	/** Set whether RequirePMF is enabled for this network. */
+	void SetRequirePMF(boolean enable);
+
+	/**
+	 * Getters for the various network params.
+	 */
+	/** Get SSID for this network. */
+	byte[] GetSSID();
+
+	/** Get the BSSID set for this network. */
+	byte[] GetBSSID();
+
+	/** Get whether Probe Requests are being sent for this network (hidden). */
+	boolean GetScanSSID();
+
+	/** Combination of |KEY_MGMT_MASK_*| values above. */
+	int GetKeyMgmt();
+
+	/** Combination of |PROTO_MASK_*| values above. */
+	int GetProto();
+
+	/** Combination of |AUTH_ALG_MASK_*| values above. */
+	int GetAuthAlg();
+
+	/** Combination of |GROUP_CIPHER_MASK_*| values above. */
+	int GetGroupCipher();
+
+	/** Combination of |PAIRWISE_CIPHER_MASK_*| values above. */
+	int GetPairwiseCipher();
+
+	/** Get passphrase for WPA_PSK network. */
+	String GetPskPassphrase();
+
+	/**
+	 * Get WEP key for WEP network.
+	 *
+	 * @param key_idx Index of wep key to be fetched.
+	 *                Max of |WEP_KEYS_MAX_NUM| keys.
+	 */
+	byte[] GetWepKey(int key_idx);
+
+	/** Get default Tx key index for WEP network. */
+	int GetWepTxKeyIdx();
+
+	/** Get whether RequirePMF is enabled for this network. */
+	boolean GetRequirePMF();
+
+	/**
+	 * Enable the network for connection purposes.
+	 *
+	 * This may trigger a connection to the network.
+	 *
+	 * @param no_connect Only enable the network, dont trigger a connect.
+	 */
+	void Enable(boolean no_connect);
+
+	/**
+	 * Disable the network for connection purposes.
+	 *
+	 * This may trigger a disconnection from the network, if currently
+	 * connected to this network.
+	 */
+	void Disable();
+
+	/**
+	 * Initiate connection to this network.
+	 */
+	void Select();
 }
diff --git a/wpa_supplicant/binder/iface.cpp b/wpa_supplicant/binder/iface.cpp
index d5a6502..280e191 100644
--- a/wpa_supplicant/binder/iface.cpp
+++ b/wpa_supplicant/binder/iface.cpp
@@ -12,6 +12,17 @@
 
 namespace wpa_supplicant_binder {
 
+#define RETURN_IF_IFACE_INVALID(wpa_s)                                         \
+	{                                                                      \
+		if (!wpa_s) {                                                  \
+			return android::binder::Status::                       \
+			    fromServiceSpecificError(                          \
+				ERROR_IFACE_INVALID, "wpa_supplicant does "    \
+						     "not control this "       \
+						     "interface.");            \
+		}                                                              \
+	} // #define RETURN_IF_IFACE_INVALID(wpa_s)
+
 Iface::Iface(struct wpa_global *wpa_global, const char ifname[])
     : wpa_global_(wpa_global), ifname_(ifname)
 {
@@ -21,13 +32,7 @@
 {
 	// We could directly return the name we hold, but let's verify
 	// if the underlying iface still exists.
-	struct wpa_supplicant *wpa_s = retrieveIfacePtr();
-	if (!wpa_s) {
-		return android::binder::Status::fromServiceSpecificError(
-		    ERROR_IFACE_INVALID,
-		    "wpa_supplicant does not control this interface.");
-	}
-
+	RETURN_IF_IFACE_INVALID(retrieveIfacePtr());
 	*iface_name_out = ifname_;
 	return android::binder::Status::ok();
 }
@@ -36,11 +41,7 @@
     android::sp<fi::w1::wpa_supplicant::INetwork> *network_object_out)
 {
 	struct wpa_supplicant *wpa_s = retrieveIfacePtr();
-	if (!wpa_s) {
-		return android::binder::Status::fromServiceSpecificError(
-		    ERROR_IFACE_INVALID,
-		    "wpa_supplicant does not control this interface.");
-	}
+	RETURN_IF_IFACE_INVALID(wpa_s);
 
 	struct wpa_ssid *ssid = wpa_supplicant_add_network(wpa_s);
 	if (!ssid) {
@@ -62,11 +63,7 @@
 android::binder::Status Iface::RemoveNetwork(int network_id)
 {
 	struct wpa_supplicant *wpa_s = retrieveIfacePtr();
-	if (!wpa_s) {
-		return android::binder::Status::fromServiceSpecificError(
-		    ERROR_IFACE_INVALID,
-		    "wpa_supplicant does not control this interface.");
-	}
+	RETURN_IF_IFACE_INVALID(wpa_s);
 
 	int result = wpa_supplicant_remove_network(wpa_s, network_id);
 	if (result == -1) {
@@ -88,11 +85,7 @@
     android::sp<fi::w1::wpa_supplicant::INetwork> *network_object_out)
 {
 	struct wpa_supplicant *wpa_s = retrieveIfacePtr();
-	if (!wpa_s) {
-		return android::binder::Status::fromServiceSpecificError(
-		    ERROR_IFACE_INVALID,
-		    "wpa_supplicant does not control this interface.");
-	}
+	RETURN_IF_IFACE_INVALID(wpa_s);
 
 	struct wpa_ssid *ssid = wpa_config_get_network(wpa_s->conf, network_id);
 	if (!ssid) {
@@ -116,11 +109,8 @@
     const android::sp<fi::w1::wpa_supplicant::IIfaceCallback> &callback)
 {
 	struct wpa_supplicant *wpa_s = retrieveIfacePtr();
-	if (!wpa_s) {
-		return android::binder::Status::fromServiceSpecificError(
-		    ERROR_IFACE_INVALID,
-		    "wpa_supplicant does not control this interface.");
-	}
+	RETURN_IF_IFACE_INVALID(wpa_s);
+
 	BinderManager *binder_manager = BinderManager::getInstance();
 	if (!binder_manager ||
 	    binder_manager->addIfaceCallbackBinderObject(ifname_, callback)) {
diff --git a/wpa_supplicant/binder/network.cpp b/wpa_supplicant/binder/network.cpp
index 000204d..6e14328 100644
--- a/wpa_supplicant/binder/network.cpp
+++ b/wpa_supplicant/binder/network.cpp
@@ -12,6 +12,17 @@
 
 namespace wpa_supplicant_binder {
 
+#define RETURN_IF_NETWORK_INVALID(wpa_ssid)                                    \
+	{                                                                      \
+		if (!wpa_ssid) {                                               \
+			return android::binder::Status::                       \
+			    fromServiceSpecificError(                          \
+				ERROR_NETWORK_INVALID, "wpa_supplicant does "  \
+						       "not control this "     \
+						       "network.");            \
+		}                                                              \
+	} // #define RETURN_IF_NETWORK_INVALID(wpa_ssid)
+
 Network::Network(
     struct wpa_global *wpa_global, const char ifname[], int network_id)
     : wpa_global_(wpa_global), ifname_(ifname), network_id_(network_id)
@@ -20,26 +31,14 @@
 
 android::binder::Status Network::GetId(int *network_id_out)
 {
-	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
-	if (!wpa_ssid) {
-		return android::binder::Status::fromServiceSpecificError(
-		    ERROR_NETWORK_INVALID,
-		    "wpa_supplicant does not control this network.");
-	}
-
+	RETURN_IF_NETWORK_INVALID(retrieveNetworkPtr());
 	*network_id_out = network_id_;
 	return android::binder::Status::ok();
 }
 
 android::binder::Status Network::GetInterfaceName(std::string *ifname_out)
 {
-	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
-	if (!wpa_ssid) {
-		return android::binder::Status::fromServiceSpecificError(
-		    ERROR_NETWORK_INVALID,
-		    "wpa_supplicant does not control this network.");
-	}
-
+	RETURN_IF_NETWORK_INVALID(retrieveNetworkPtr());
 	*ifname_out = ifname_;
 	return android::binder::Status::ok();
 }
@@ -47,12 +46,7 @@
 android::binder::Status Network::RegisterCallback(
     const android::sp<fi::w1::wpa_supplicant::INetworkCallback> &callback)
 {
-	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
-	if (!wpa_ssid) {
-		return android::binder::Status::fromServiceSpecificError(
-		    ERROR_NETWORK_INVALID,
-		    "wpa_supplicant does not control this network.");
-	}
+	RETURN_IF_NETWORK_INVALID(retrieveNetworkPtr());
 	BinderManager *binder_manager = BinderManager::getInstance();
 	if (!binder_manager ||
 	    binder_manager->addNetworkCallbackBinderObject(
@@ -64,6 +58,198 @@
 	return android::binder::Status::ok();
 }
 
+android::binder::Status Network::SetSSID(const std::vector<uint8_t> &ssid)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::SetBSSID(const std::vector<uint8_t> &bssid)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::SetScanSSID(bool enable)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::SetKeyMgmt(int32_t key_mgmt_mask)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::SetProto(int32_t proto_mask)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::SetAuthAlg(int32_t auth_alg_mask)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::SetGroupCipher(int32_t group_cipher_mask)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::SetPairwiseCipher(int32_t pairwise_cipher_mask)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::SetPskPassphrase(const std::string &psk)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status
+Network::SetWepKey(int key_idx, const std::vector<uint8_t> &wep_key)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::SetWepTxKeyIdx(int32_t wep_tx_key_idx)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::SetRequirePMF(bool enable)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::GetSSID(std::vector<uint8_t> *ssid)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::GetBSSID(std::vector<uint8_t> *bssid)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::GetScanSSID(bool *enable)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::GetKeyMgmt(int32_t *key_mgmt_mask)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::GetProto(int32_t *proto_mask)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::GetAuthAlg(int32_t *auth_alg_mask)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::GetGroupCipher(int32_t *group_cipher_mask)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status
+Network::GetPairwiseCipher(int32_t *pairwise_cipher_mask)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::GetPskPassphrase(std::string *psk)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status
+Network::GetWepKey(int key_idx, std::vector<uint8_t> *wep_key)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::GetWepTxKeyIdx(int32_t *wep_tx_key_idx)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::GetRequirePMF(bool *enable)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::Enable(bool no_connect)
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::Disable()
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
+android::binder::Status Network::Select()
+{
+	struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
+	RETURN_IF_NETWORK_INVALID(wpa_ssid);
+	return android::binder::Status::ok();
+}
+
 /**
  * Retrieve the underlying |wpa_ssid| struct pointer for
  * this network.
diff --git a/wpa_supplicant/binder/network.h b/wpa_supplicant/binder/network.h
index ae47639..8a28aae 100644
--- a/wpa_supplicant/binder/network.h
+++ b/wpa_supplicant/binder/network.h
@@ -42,6 +42,43 @@
 	android::binder::Status RegisterCallback(
 	    const android::sp<fi::w1::wpa_supplicant::INetworkCallback>
 		&callback) override;
+	android::binder::Status
+	SetSSID(const std::vector<uint8_t> &ssid) override;
+	android::binder::Status
+	SetBSSID(const std::vector<uint8_t> &bssid) override;
+	android::binder::Status SetScanSSID(bool enable) override;
+	android::binder::Status SetKeyMgmt(int32_t key_mgmt_mask) override;
+	android::binder::Status SetProto(int32_t proto_mask) override;
+	android::binder::Status SetAuthAlg(int32_t auth_alg_mask) override;
+	android::binder::Status
+	SetGroupCipher(int32_t group_cipher_mask) override;
+	android::binder::Status
+	SetPairwiseCipher(int32_t pairwise_cipher_mask) override;
+	android::binder::Status
+	SetPskPassphrase(const std::string &psk) override;
+	android::binder::Status
+	SetWepKey(int key_idx, const std::vector<uint8_t> &wep_key) override;
+	android::binder::Status SetWepTxKeyIdx(int32_t wep_tx_key_idx) override;
+	android::binder::Status SetRequirePMF(bool enable) override;
+	android::binder::Status GetSSID(std::vector<uint8_t> *ssid) override;
+	android::binder::Status GetBSSID(std::vector<uint8_t> *bssid) override;
+	android::binder::Status GetScanSSID(bool *enable) override;
+	android::binder::Status GetKeyMgmt(int32_t *key_mgmt_mask) override;
+	android::binder::Status GetProto(int32_t *proto_mask) override;
+	android::binder::Status GetAuthAlg(int32_t *auth_alg_mask) override;
+	android::binder::Status
+	GetGroupCipher(int32_t *group_cipher_mask) override;
+	android::binder::Status
+	GetPairwiseCipher(int32_t *pairwise_cipher_mask) override;
+	android::binder::Status GetPskPassphrase(std::string *psk) override;
+	android::binder::Status
+	GetWepKey(int key_idx, std::vector<uint8_t> *wep_key) override;
+	android::binder::Status
+	GetWepTxKeyIdx(int32_t *wep_tx_key_idx) override;
+	android::binder::Status GetRequirePMF(bool *enable) override;
+	android::binder::Status Enable(bool no_connect) override;
+	android::binder::Status Disable() override;
+	android::binder::Status Select() override;
 
 private:
 	struct wpa_ssid *retrieveNetworkPtr();
