# Disconnect from WiFi access point

**URL:** <https://discuss.blues.com/t/disconnect-from-wifi-access-point/1136>\
**Category:** Notecard API\
**Created:** [December 17, 2022, 6:49pm UTC](https://discuss.blues.com/t/disconnect-from-wifi-access-point/1136 "2022-12-17T18:49:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![markwkiehl](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/markwkiehl/32/622_2.png) [@markwkiehl](https://discuss.blues.com/u/markwkiehl)\
**Post date:** [December 17, 2022, 6:49pm UTC](https://discuss.blues.com/t/disconnect-from-wifi-access-point/1136/1 "2022-12-17T18:49:23Z")

</div>

The documentation for [card.wifi](https://dev.blues.io/reference/notecard-api/card-requests/#card-wifi) states that a WiFi connection can be cleared by sending the following command to the Notecard: {“req”:“card.wifi”,“ssid”:“-”,“password”:“-”}

My testing has revealed that if you have a successful WiFi connection and you are in ‘continuous’ mode, then if you issue the ‘card.wifi’ request, the connection is NOT cleared. What can I do other than a ‘card.restart’ request to clear the Notecard WiFi connection?

My Notecard has been updated to the latest firmware (as of this week).

The link below shows how I came up with a robust connection to WiFi using a Swan connected to a Notecarrier-F and a WiFi Notecard. Hope it helps someone.

[https://savvymicrocontrollersolutions.info/blues\_io.php?blog=blues-io-getting-started#wifi-notecard-arduino-sketch](https://savvymicrocontrollersolutions.info/blues_io.php?blog=blues-io-getting-started#wifi-notecard-arduino-sketch)

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [December 19, 2022, 2:19pm UTC](https://discuss.blues.com/t/disconnect-from-wifi-access-point/1136/2 "2022-12-19T14:19:09Z")

</div>

Hi @markwkiehl,

Your best bet is to set a different `mode` in a `hub.set` request (like `periodic` or `minimum`) and then reset the Wi-Fi credentials. While the Notecard is maintaining a continuous network connection, it won’t break that connection when the Wi-Fi AP information is changed/reset.

Rob

---

<div class="post-metadata">

**Author:** ![abari](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@abari](https://discuss.blues.com/u/abari)\
**Post date:** [January 26, 2023, 2:52pm UTC](https://discuss.blues.com/t/disconnect-from-wifi-access-point/1136/3 "2023-01-26T14:52:44Z")

</div>

Hey @markwkiehl thanks for posting that snippet, i was trying to decide whether to load different code for my wifi/cell cards but i like your (smarter) approach of determining it in the code…
