# AP Mode With WiFi Shield?

**URL:** <https://forums.openmv.io/t/ap-mode-with-wifi-shield/203>\
**Category:** OpenMV Boards\
**Created:** [February 17, 2017, 12:54pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203 "2017-02-17T12:54:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoombach](https://avatars.discourse-cdn.com/v4/letter/z/6de8d8/32.png) [@zoombach](https://forums.openmv.io/u/zoombach)\
**Post date:** [February 17, 2017, 12:54pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/1 "2017-02-17T12:54:00Z")

</div>

Looks like the hardware would support AP Mode but is it exposed to use in OpenMV MicroPython? Any plans to do so?

Thanks

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [February 17, 2017, 2:54pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/2 "2017-02-17T14:54:10Z")

</div>

Um, I remember Ibrahim talking about doing this but I don’t think it’s been implemented. I’ll let Ibrahim respond.

---

<div class="post-metadata">

**Author:** ![iabdalkader](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/iabdalkader/32/1169_2.png) [@iabdalkader](https://forums.openmv.io/u/iabdalkader)\
**Post date:** [February 17, 2017, 4:39pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/3 "2017-02-17T16:39:51Z")

</div>

Yes the HW supports AP mode but it’s not implemented yet, I’ll work on it ASAP.

---

<div class="post-metadata">

**Author:** ![zoombach](https://avatars.discourse-cdn.com/v4/letter/z/6de8d8/32.png) [@zoombach](https://forums.openmv.io/u/zoombach)\
**Post date:** [February 17, 2017, 5:07pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/4 "2017-02-17T17:07:47Z")

</div>

Thanks, that’s great. I’ll keep my eyes open for it!

---

<div class="post-metadata">

**Author:** ![schildroth](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@schildroth](https://forums.openmv.io/u/schildroth)\
**Post date:** [March 6, 2017, 12:04pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/5 "2017-03-06T12:04:57Z")

</div>

How is AP Mode coming along? I’m anxious to try it as well.

---

<div class="post-metadata">

**Author:** ![iabdalkader](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/iabdalkader/32/1169_2.png) [@iabdalkader](https://forums.openmv.io/u/iabdalkader)\
**Post date:** [March 7, 2017, 2:36am UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/6 "2017-03-07T02:36:30Z")

</div>

I’m working on it, I should have a testing image really soon.

---

<div class="post-metadata">

**Author:** ![schildroth](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@schildroth](https://forums.openmv.io/u/schildroth)\
**Post date:** [March 7, 2017, 3:27pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/7 "2017-03-07T15:27:15Z")

</div>

😃 Awesome! Thanks for the update.

---

<div class="post-metadata">

**Author:** ![iabdalkader](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/iabdalkader/32/1169_2.png) [@iabdalkader](https://forums.openmv.io/u/iabdalkader)\
**Post date:** [March 9, 2017, 9:15pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/8 "2017-03-09T21:15:32Z")

</div>

Hi,

AP mode is now supported!

If you can’t wait until the next release, you can use the dev firmware images here:

[https://github.com/openmv/openmv/tree/master/firmware](https://github.com/openmv/openmv/tree/master/firmware)

Here’s an example script:

[https://github.com/openmv/openmv/blob/master/usr/examples/14-WiFi-Shield/mjpeg\_streamer\_ap.py](https://github.com/openmv/openmv/blob/master/usr/examples/14-WiFi-Shield/mjpeg_streamer_ap.py)

Note WINC1500 AP mode has some limitations:

- Only one client can connect at a time, I guess that’s okay for a camera.
- It only supports OPEN or WEP security.
- There’s a bug in the FW, when the client disconnects any bound sockets are lost (they just stop working).  
As a workaround, I set a timeout for the server socket to force it to raise an exception and then reopen it.

---

<div class="post-metadata">

**Author:** ![schildroth](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@schildroth](https://forums.openmv.io/u/schildroth)\
**Post date:** [March 9, 2017, 9:42pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/9 "2017-03-09T21:42:36Z")

</div>

Excellent! I’ll try it out. Thanks!

---

<div class="post-metadata">

**Author:** ![schildroth](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@schildroth](https://forums.openmv.io/u/schildroth)\
**Post date:** [March 22, 2017, 12:49pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/10 "2017-03-22T12:49:45Z")

</div>

I’m not seeing how I update the firmware via the IDE. When I click on the ‘Firmware Version’ button in the lower right, it says I’m up to date and doesn’t give an option to load new firmware. Is there a way around this or do I need to use the STM DfuSe upgrade software?

---

<div class="post-metadata">

**Author:** ![iabdalkader](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/iabdalkader/32/1169_2.png) [@iabdalkader](https://forums.openmv.io/u/iabdalkader)\
**Post date:** [March 22, 2017, 1:47pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/11 "2017-03-22T13:47:16Z")

</div>

> [@](#):
>
> I’m not seeing how I update the firmware via the IDE. When I click on the ‘Firmware Version’ button in the lower right, it says I’m up to date and doesn’t give an option to load new firmware. Is there a way around this or do I need to use the STM DfuSe upgrade software?

Tools-\>Run Bootloader and then upload the firmware binary ( firmware.bin )

---

<div class="post-metadata">

**Author:** ![schildroth](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@schildroth](https://forums.openmv.io/u/schildroth)\
**Post date:** [March 22, 2017, 4:08pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/12 "2017-03-22T16:08:24Z")

</div>

That worked. Awesome! It is working great for a first run. Nice!

Only hiccup is that it freezes every 3 seconds or so. Freezes for about a second and then comes back. Did you see the same thing?

---

<div class="post-metadata">

**Author:** ![iabdalkader](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/iabdalkader/32/1169_2.png) [@iabdalkader](https://forums.openmv.io/u/iabdalkader)\
**Post date:** [March 22, 2017, 9:48pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/13 "2017-03-22T21:48:50Z")

</div>

> [@](#):
>
> That worked. Awesome! It is working great for a first run. Nice!
> 
> Only hiccup is that it freezes every 3 seconds or so. Freezes for about a second and then comes back. Did you see the same thing?

I don’t remember seeing this issue, but I used the Android app for testing. Try increasing the server and/or client timeout in line 76  
[https://github.com/openmv/openmv/blob/master/usr/examples/14-WiFi-Shield/mjpeg\_streamer\_ap.py#L76](https://github.com/openmv/openmv/blob/master/usr/examples/14-WiFi-Shield/mjpeg_streamer_ap.py#L76)

And line 35  
[https://github.com/openmv/openmv/blob/master/usr/examples/14-WiFi-Shield/mjpeg\_streamer\_ap.py#L35](https://github.com/openmv/openmv/blob/master/usr/examples/14-WiFi-Shield/mjpeg_streamer_ap.py#L35)

---

<div class="post-metadata">

**Author:** ![schildroth](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@schildroth](https://forums.openmv.io/u/schildroth)\
**Post date:** [March 22, 2017, 11:54pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/14 "2017-03-22T23:54:07Z")

</div>

Thanks for the quick reply. Increasing the timeouts helped, but doesn’t completely eliminate it. I’ll play around with it a bit.

---

<div class="post-metadata">

**Author:** ![iabdalkader](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/iabdalkader/32/1169_2.png) [@iabdalkader](https://forums.openmv.io/u/iabdalkader)\
**Post date:** [March 24, 2017, 2:17am UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/15 "2017-03-24T02:17:29Z")

</div>

> [@](#):
>
> Thanks for the quick reply. Increasing the timeouts helped, but doesn’t completely eliminate it. I’ll play around with it a bit.

I’ll also do some testing and get back to you.

---

<div class="post-metadata">

**Author:** ![iabdalkader](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/iabdalkader/32/1169_2.png) [@iabdalkader](https://forums.openmv.io/u/iabdalkader)\
**Post date:** [March 25, 2017, 8:27pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/16 "2017-03-25T20:27:25Z")

</div>

I did some testing and I’m not seeing the freeze, I’m testing with my Android phone.

---

<div class="post-metadata">

**Author:** ![zlite](https://avatars.discourse-cdn.com/v4/letter/z/c6cbf5/32.png) [@zlite](https://forums.openmv.io/u/zlite)\
**Post date:** [April 9, 2017, 11:00pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/17 "2017-04-09T23:00:55Z")

</div>

When connecting to the cam in WiFI AP mode via the Open Terminal, should we be using UDP or TCP mode? And what port number?

I tried both modes with port 8080 that’s used in the MPEG streaming demo, but that didn’t work.

Apologies if this is in the documentation somewhere. I looked by couldn’t find it

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [April 9, 2017, 11:23pm UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/18 "2017-04-09T23:23:23Z")

</div>

I’ll have to debug OpenMV IDE with open terminal for this. Might be some stuff broken that I have to get working. Apologies.

---

<div class="post-metadata">

**Author:** ![zlite](https://avatars.discourse-cdn.com/v4/letter/z/c6cbf5/32.png) [@zlite](https://forums.openmv.io/u/zlite)\
**Post date:** [April 11, 2017, 12:51am UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/19 "2017-04-11T00:51:35Z")

</div>

I assume the process is as follows:

1. OpenMV is running Mpeg AP streaming example
2. Connect to OpenMV AP via WiFi
3. Test the Mpeg stream in a browser at the given IP: 192.168.1.1:8080
4. Create a new Open Terminal using TCP at the same IP: 192.168.1.1:8080
5. Everything magically works

I’m fine up until step 5 😉

---

<div class="post-metadata">

**Author:** ![iabdalkader](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/iabdalkader/32/1169_2.png) [@iabdalkader](https://forums.openmv.io/u/iabdalkader)\
**Post date:** [April 11, 2017, 1:40am UTC](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203/20 "2017-04-11T01:40:10Z")

</div>

Note the shield doesn’t support multiple connections, only one at a time. Never really tested the terminal so not sure if it works.

[Next page](https://forums.openmv.io/t/ap-mode-with-wifi-shield/203.md?page=2)
