Creating a Wireless Network with Raspberry Pi Pico W: AP Mode Walkthrough (Part 1)

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 มิ.ย. 2024
  • Support these videos here: www.buymeacoffee.com/mmshilleh
    Learn how to create your own WiFi network using the Raspberry Pi Pico W in AP Mode. Connect and send information to up to five devices with WiFi without the Internet! This can be used to host web servers that devices can access as long as the network is running, and can later be used to send information between Pico W's without access to the global Internet!
    Link to Medium Article:
    / c896211f2bd6
    Buy Raspberry Pi and Arduino Sensors and Parts:
    shillehtek.com
    Link to Blog Post and Code:
    shillehtek.com/blogs/news/cre...
    TIMESTAMPS:
    00:00 Introduction
    02:00 Code Setup
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 76

  • @mattkojetin8198
    @mattkojetin8198 11 หลายเดือนก่อน +3

    So it can serve as a web server and an a access point at the same time. That is really a powerful concept.

    • @mmshilleh
      @mmshilleh  11 หลายเดือนก่อน +2

      Yeah, I was surprised to find this out myself to be honest. I have been very impressed with the Pico W probably one of the best microcontrollers on the market for its size and cost.

  • @christianjensen1846
    @christianjensen1846 9 หลายเดือนก่อน +1

    Very clear and easy to follow. Thanks for the great vid !

    • @mmshilleh
      @mmshilleh  9 หลายเดือนก่อน

      Glad you liked it! I am still having issues with part 2 but hopefully, in the future, I will pursue that. Hope you stick around regardless :)

  • @user-ty8my9ts9l
    @user-ty8my9ts9l 3 หลายเดือนก่อน +1

    Thank You Man it so long to find this video series Many thanks

    • @mmshilleh
      @mmshilleh  3 หลายเดือนก่อน

      Wow so happy to help hope you can subscribe as well!!

  • @mmshilleh
    @mmshilleh  11 หลายเดือนก่อน +2

    If you have not, please like, comment, and subscribe! Also, consider donating to the channel would be awesome to support the content here www.buymeacoffee.com/mmshilleh

  • @woolfy02
    @woolfy02 10 หลายเดือนก่อน +1

    Awesome project! I've always heard of that but never really understood how to build one haha. Looking forward to part 2

    • @mmshilleh
      @mmshilleh  10 หลายเดือนก่อน +1

      Glad you liked it I have not had time to worm on P2 yet hopefully soon, thanks for your support

  • @keithlohmeyer
    @keithlohmeyer 11 หลายเดือนก่อน +2

    That was quick.
    Looking forward to part 2
    Thanks.

    • @mmshilleh
      @mmshilleh  11 หลายเดือนก่อน

      Glad you enjoyed it. Your concern is sending messages between Picos in AP mode, correct?

    • @keithlohmeyer
      @keithlohmeyer 11 หลายเดือนก่อน +1

      ​@@mmshilleh I can get one in AP mode and one in Station mode and they start communicating then they just stop after less than a minute of use. I am interested in what code differences might be causing problems. I think the station one is still sending requests but the AP one stops receiving them.

    • @mmshilleh
      @mmshilleh  11 หลายเดือนก่อน

      @@keithlohmeyer I think I may know what is going on, could be you exceeded the maximum amount of connections to the Pico W in AP mode. But I will be happy to look at this tomorrow as I plan to have a video about this soon! Thanks for your feedback and for inspiring me to make this video.

    • @mmshilleh
      @mmshilleh  10 หลายเดือนก่อน +1

      @@keithlohmeyer Hey again, funny because I am in the midst of making part 2 but I am running into the same problem you are highlighting here. Seems like the connection initially works then has issues when I try to reconnect despite me closing the socket. Must be something weird with the socket library where it is creating more than one connection and keeping it open. I will look into this more but just thought of our discussion and wanted to share where I am at

    • @keithlohmeyer
      @keithlohmeyer 10 หลายเดือนก่อน

      @@mmshilleh Thanks. I am just a hobbyist but I can usually get example code running but this was a problem. I will stay tuned to see if you figure it out. Thanks.

  • @DanMcCreary
    @DanMcCreary 9 หลายเดือนก่อน +1

    Thanks for this awesome video. I have students that wanted to sync their costumes with LED strips and now we have a way to do this!
    Next up: Swarm robots!

    • @mmshilleh
      @mmshilleh  9 หลายเดือนก่อน

      Yeah pretty cool would love to see the outcome of that project. Really happy to hear this is helping real people out !

  • @Neil264Hoskins
    @Neil264Hoskins หลายเดือนก่อน +1

    Thanks for this, it opens up a world of possibilities. It works perfectly on a PC browser, but on my mobile phone browser, it works only if I turn off the sim card. I suppose otherwise it's looking for that IP address on the mobile network.

    • @mmshilleh
      @mmshilleh  หลายเดือนก่อน

      Yeah it gets more complicated off of the local network. You are correct its looking for a different IP and there are probably other firewall issues and networking problems associated with expanding the scope like that

  • @anthonyrussano
    @anthonyrussano 10 หลายเดือนก่อน +1

    this is legit, thank you

    • @mmshilleh
      @mmshilleh  10 หลายเดือนก่อน

      Of course happy to help ! Please do not forget to subscribe. Thanks!

  • @mattkojetin8198
    @mattkojetin8198 11 หลายเดือนก่อน +1

    Great, Thank You!

    • @mmshilleh
      @mmshilleh  11 หลายเดือนก่อน +1

      Appreciate your support buddy :)

  • @damc7456
    @damc7456 11 หลายเดือนก่อน +2

    This is awesome. I've made it as far as setting up, connecting to, and pinging a SSID on a Pico W from watching other videos, but the webpage portion is new. It would be great to see how to make the webpage include some sort of on/off loop, and set up a second Pico W to blink its onboard LED after connecting.
    Ideally, I'm trying to set up a 4-device Pico W network where the two endpoints are each connected via WiFi to one of the two middle devices and the two middle devices are connected via LoRa with RYLR896 modules. I've got two Pico W's transmitting and receiving messages. The part I'm stuck on now is how to take the received message and put it in micropython code so that it does something, like blinking an LED.

    • @mmshilleh
      @mmshilleh  11 หลายเดือนก่อน +1

      Yeah, I think others have the same concern as well. In my next video, I will do something along those lines. But it strikes me as surprising given that you got messages to relay back and forth that you could not get the LED to blink from a message. Seems like you are 99 percent of the way there. Is there another challenge I am not understanding? Let me know :)

    • @damc7456
      @damc7456 11 หลายเดือนก่อน +1

      @@mmshilleh I was referring to sending a message back and forth between Pico W's over LoRa, not WiFi. The Pico W connects to the LoRa module via a uart. I'm still using mostly AT commands, but have come across the uart.any() query. I think I might be able to figure out how to set it up so that one device (base station) broadcasts a message every two seconds or so. Then on the other device I could set it up so that when uart.any() comes back >0 the Pico W switches the onboard LED on for 0.5 seconds, reads the message (empties the 32 byte uart FIFO buffer), then loops back into checking uart.any() for >0 every 0.2 seconds or so. End result, the LED blinks for 0.5 seconds every 2 seconds as long as the receiver is picking up the transmitter's broadcast. This would be a good way to test the range, moving the receiver to various locations and adjusting the various LoRa settings then seeing how those changes affect the blinking. reyax.com//upload/products_download/download_file/LoRa%20AT%20Command%20RYLR40x_RYLR89x_EN.pdf

    • @damc7456
      @damc7456 11 หลายเดือนก่อน +2

      @@mmshilleh My end goal is sending messages back and forth between 1 & 4 in a network like this: (PicoW1) (PicoW2) (PicoW3) (PicoW4)

  • @robakers6127
    @robakers6127 10 หลายเดือนก่อน +1

    Thank you

    • @mmshilleh
      @mmshilleh  10 หลายเดือนก่อน

      Gladly! Hope you can subscribe ✌🏼

  • @user-zu6wg9wt8m
    @user-zu6wg9wt8m 7 หลายเดือนก่อน +1

    wow thanks

    • @mmshilleh
      @mmshilleh  7 หลายเดือนก่อน

      Happy to help! Dont forget to subscribe I would appreciate the support ✌🏼

  • @artukanal3791
    @artukanal3791 7 หลายเดือนก่อน +2

    How to make static ip?

    • @mmshilleh
      @mmshilleh  7 หลายเดือนก่อน

      I am posting a quick video on how to do this, good question. Dont forget to subscribe :)

  • @negrit00
    @negrit00 10 หลายเดือนก่อน +1

    What about if i want to transfer Internet GPRS connection throught raspberry pi pico w from a SIM800L module?

    • @mmshilleh
      @mmshilleh  10 หลายเดือนก่อน +1

      Cant say I have used that module mate, sorry :(

  • @animations1889
    @animations1889 8 หลายเดือนก่อน +1

    I have seen some examples on ESP32 microcontrollers that after connecting to the AP phone it automatically opens an HTML page.
    Can that be added to this code?
    Maybe it only works on phones?

    • @mmshilleh
      @mmshilleh  8 หลายเดือนก่อน +1

      I am going to make another video on how to do this with the ESP32 and I will try to see if I can add that. Great suggestion thanks for your useful comments :)

  • @cinar_celik_keskin
    @cinar_celik_keskin 10 หลายเดือนก่อน +1

    Hello! I'm having problems connecting to my raspberry pi pico w. I copy the IP add. from the shell and paste it into chrome, but i cannot connect to my pico(ERR_CONNECTION_TIMED_OUT).
    edit: Checked my ports, 80 (http) port is open still can't connect.

    • @mmshilleh
      @mmshilleh  10 หลายเดือนก่อน

      If you are running the same code this should work, try to use the correct formatting and protocol (http not https). Id you are trying to connect from another Pico this code will not work and still trying to figure that out.

  • @jackrowland1652
    @jackrowland1652 2 หลายเดือนก่อน +1

    Is there a way to run code while not connected to the html page? I'd love to be able to use this as a control panel but have i t run independently when not connected. I was able to get this to work on my PC, but not on my phone. Are there extra steps on a phone? I was able to find the Pico on the phone and log in, but not connect to the page.

    • @mmshilleh
      @mmshilleh  2 หลายเดือนก่อน

      You would probably just want to build a React app at that point! Have some videos on my channel with React native apps that can be used with MQTT to control the Pico W.
      If you are confused and want to consult I also offer that on my buymeacoffee link on my channel. Thanks for your question Jack!

  • @xgamer_98x32
    @xgamer_98x32 9 หลายเดือนก่อน +1

    Hi, do you know a way to make a USB-Tethering Hotspot with the raspberry pi pico w. I have a rock pi 3a that does not have wifi and I dont want to use my phone as hotspot. Sry if this is a dumb question. Thanks in advance.

    • @mmshilleh
      @mmshilleh  9 หลายเดือนก่อน

      Never tried that mate, sounds like an interesting application however! Best of luck sorry I am no help there :/

  • @btigenie
    @btigenie 6 หลายเดือนก่อน +1

    Is there any way to get past the 4 connection limit with AP mode? I have a project where I need 7 micro controllers to all be able to communicate with a central micro controller and for that central micro controller to communicate with each of the other 7 micro controllers. I though of using ESP32 with ESPNOW but I really like the pico w and would love to come up with a solution. Awesome video - love it!

    • @mmshilleh
      @mmshilleh  6 หลายเดือนก่อน +1

      Hey buddy, I am very happy you are watching the content and I hope you can subscribe to support :)
      I would definitely use MQTT for this scenario it is lightweight, free, and easy to use. You can use the HiveMQ broker and I have a video on that. It is scalable and centralized. I do not think AP mode is a good way to scale devices and I am not a huge fan of it personally, it seems like there are some bugs in MicroPython getting it to work constantly, hence why I never made another video discussing how to connect devices using AP mode.
      Short answer, look into HiveMQ and let me know if you have any questions I will be happy to help you. We also have memberships on the channel where I can offer you in-depth consulting to guide you in detail.

    • @btigenie
      @btigenie 6 หลายเดือนก่อน +1

      @@mmshillehcan MQTT run completely local without the need to connect to internet or cloud? I'd like this project to run completely local without any cloud services.

    • @mmshilleh
      @mmshilleh  6 หลายเดือนก่อน +1

      @@btigenie yes you can also do that easily if you install Mosquitto MQTT on your computer. It will run in a terminal or process on your computer! I have a video on it but it pertains to the Raspberry Pi 4. The process should be similar and should work with the Pico W

    • @btigenie
      @btigenie 6 หลายเดือนก่อน +1

      @@mmshillehdo you have the ability to charge for projects or hour blocks for consulting? I'd love to just run my project by you and get your thoughts.

    • @mmshilleh
      @mmshilleh  6 หลายเดือนก่อน

      Yes I do, please contact me on my email on the channel mahmoodmustafashilleh@gmail.com we can discuss details would be happy to help@@btigenie

  • @basslagter1
    @basslagter1 4 หลายเดือนก่อน +1

    Since the page served is http you will get all sorts of security warnings from the browser. Would be nice if you got a vid on how to serve https

    • @mmshilleh
      @mmshilleh  4 หลายเดือนก่อน +1

      I will look into that, that is a great idea and did not think about it

  • @matiasdg01
    @matiasdg01 8 หลายเดือนก่อน +1

    Can I use it as a wifi repeater? Thanks!

    • @mmshilleh
      @mmshilleh  8 หลายเดือนก่อน +1

      Hey, I read into that for a little and it does not look like it is possible unless you use another module perhaps on top of it. Either way, it would be a garbage wifi repeater haha :)

  • @Keeping_IT_Simple
    @Keeping_IT_Simple 4 หลายเดือนก่อน +1

    Any news on further parts please?

    • @mmshilleh
      @mmshilleh  4 หลายเดือนก่อน

      Hey Buddy sorry about that. I actually tried quite a bit but creating a system of Pico Ws connected in AP mode has a lot of issues I couldnt figure out in MicroPython. Short answer is that I couldnt get that to work! Sorry mate ! Hope you stick around and subscribe regardless :)

  • @AlfaToTheOmega
    @AlfaToTheOmega 4 หลายเดือนก่อน +1

    6:15 I think that "an internet" would still be the correct term, right? It's just not the Internet (with a capital letter). Just like how we can talk about the Moon or a moon.

    • @mmshilleh
      @mmshilleh  4 หลายเดือนก่อน +1

      Fair point, I think so as well. I guess I meant to say this is different than THE Internet haha. But the premise of how the internet was built is similar. You are smart my friend

  • @MaggieRen-ck5um
    @MaggieRen-ck5um 9 หลายเดือนก่อน +1

    Do you have a Arduino version of the script? Thanks!

    • @mmshilleh
      @mmshilleh  9 หลายเดือนก่อน

      No sir i do not, sorry

  • @diegoflores4587
    @diegoflores4587 2 หลายเดือนก่อน +1

    It works for me, but the range is very shorts around 4 metters any one this problem too??

    • @mmshilleh
      @mmshilleh  2 หลายเดือนก่อน

      Thats weird I did not have that issue at all, unless anyone can attest otherwise

  • @BlueDolphinBlues
    @BlueDolphinBlues 24 วันที่ผ่านมา +1

    anyone find any bugs in this where the ssid doesn't set properly and the access point doesn't let you log in?

    • @mmshilleh
      @mmshilleh  23 วันที่ผ่านมา

      I have not, been a while they could have changed somethings in the library

    • @BlueDolphinBlues
      @BlueDolphinBlues 23 วันที่ผ่านมา

      @@mmshilleh I found a bug. I think it's because I originally set it up for STA mode then I tell it to switch to AP mode if it loses connection. The problem is that it won't set ssid correctly or let me log on. It seems to work fine if I set it up in AP mode from the start.

  • @peterevans7480
    @peterevans7480 9 หลายเดือนก่อน

    I keep getting a name error ssid isn't defined when I try to put the ssid and password ap.mode

    • @mmshilleh
      @mmshilleh  9 หลายเดือนก่อน

      Hello Peter,
      You need to pass the function both of those parameters so that the local code within the function can utilize them.
      In Python you can run
      ap_mode("your internet name", "your internet password")

  • @halilxtan
    @halilxtan 5 หลายเดือนก่อน +1

    Hi, i want to remove password but i can't. i removed all "password"s but it didn't work still asking me password and the password is PASSWORD. Please help

    • @mmshilleh
      @mmshilleh  5 หลายเดือนก่อน

      Confused, you should add a simple password and it should work. Try again

    • @halilxtan
      @halilxtan 5 หลายเดือนก่อน +1

      ⁠@@mmshillehbut i want to remove. Why i am adding ?

    • @basslagter1
      @basslagter1 4 หลายเดือนก่อน +2

      Add security=0 as param to the ap.config()

    • @halilxtan
      @halilxtan 4 หลายเดือนก่อน +1

      thank you❤

  • @r_v_t
    @r_v_t 7 หลายเดือนก่อน +1

    I am always a bit saddened that these examples are in python… :( the SDK is so nice of the pico and deserves more attention.

    • @mmshilleh
      @mmshilleh  7 หลายเดือนก่อน +1

      You are saying you want a version of this in C++? Personally, I found it a headache to use C++ on the device but my C++ knowledge is minimal so I am speaking out of ignorance.

    • @r_v_t
      @r_v_t 7 หลายเดือนก่อน

      ​@@mmshillehthe examples in the SDK are good , so I am good to go.. personally but perhaps for others? I usually write java, so c++ is for me 9 out of 10 good to follow.

  • @yatharth1997
    @yatharth1997 8 หลายเดือนก่อน +1

    Part 2???

    • @mmshilleh
      @mmshilleh  8 หลายเดือนก่อน

      I had a lot of issues trying to setup part 2 and will revisit it in the future, really sorry about that. It seems like there is a bug when I try to communicate between two pico w's more than once and after a lot of research it is not clear why :/