Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    AP+STA mode

    Scheduled Pinned Locked Moved WiPy 2&3
    staap
    6 Posts 2 Posters 3.3k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      livius
      last edited by

      Hi,

      how to use both AP + STA mode
      I can start wifi in STA_AP
      i then can send data to the server
      but what i must do in
      while true: loop to add possibility to connect to AP?

      e.g. in loop i do

      while true:
        s.send(xxx)
        sleep_ms(100) # is this totally block current main thread?
        machine.idle() # is this enought to gain control to AP?
      

      think about people first, then computers

      1 Reply Last reply Reply Quote 0
      • L Offline
        livius
        last edited by

        i also have problem in AP+STA mode stability (1.6.1 firmware)
        it looks like:

        I (4660107) wifi: bcn_timout,ap_probe_send_start
        [UID=24:0a:c4:00:6e:c2] 2162, 27, 35, 0
        I (4662608) wifi: ap_probe_send over, resett wifi status to disassoc
        I (4662609) wifi: state: run -> init (1)
        I (4662609) wifi: n:9 0, o:9 2, ap:9 2, sta:9 2, prof:9
        

        think about people first, then computers

        1 Reply Last reply Reply Quote 0
        • C Offline
          Colateral
          last edited by

          WLAN.init has to be called for for STA_AP providing AP cfg
          then WLAN.connect() has to be called to connect as STA to an external Wifispot. Don't try to call connect several times... use connect then disconnect to be sure that everything was released. Once connected, check your firewall.

          I saw also that is working hazardous on WIndows10 ... you need to reboot computer in order to make it work.

          L 2 Replies Last reply Reply Quote 1
          • L Offline
            livius @Colateral
            last edited by livius

            @Colateral
            No, i have not problem to connect to router (STA part).
            My problem is thet i can not connect to AP.

            I can send data from Wipy to server and i see Wipy on list of avaiable networks.
            But i can not connect to it at network step. FTP is the next step.

            sumarize
            If i run Wipy in WLAN.STA no problem to connect to router
            If i run Wipy in WLAN.AP no ptoblem to connect to Wipy from computer
            If i run Wipy in WLAN.STA_AP no problem to connect to router but problem with connecting to Wipy from computer.

            But i did not tried this step:

            I saw also that is working hazardous on WIndows10 ... you need to reboot computer in order to make it work.

            I will try it in the evening and back with results.
            if it's true there is a terrible piece of junk implemented in Windows

            think about people first, then computers

            1 Reply Last reply Reply Quote 0
            • L Offline
              livius @Colateral
              last edited by

              @Colateral
              Tested - but i do not restart windows only disable wifi connection and reenable it after wipy changed to sta_ap mode and it work now :)
              Interesting that it work also if i now restart windows and during work change to sta_ap mode. It looks like this operation is needed only once per Windows...

              Thank you for tip about Windows issue - now i can change my dev comunication protocol strategy
              and have STA_AP instead changing from STA to AP and back to STA cycle :)

              think about people first, then computers

              C 1 Reply Last reply Reply Quote 0
              • C Offline
                Colateral @livius
                last edited by

                @livius Great that is working. I believe it is something nasty/delays with the Win10 routing table. Careful on closed loop: if you have your laptop wired/lan connected on the same Wifi router and your laptop connected to WiPy.

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • 1 / 1
                • First post
                  Last post

                Pycom on Twitter

                Pycom