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

    Wi-Fi functions

    Scheduled Pinned Locked Moved Firmware
    wifiwipyfipyesp32enhancement
    7 Posts 5 Posters 786 Views 6 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.
    • I Offline
      ingframin
      last edited by

      Hi all,
      I am a Ph.D. student in telecommunications and for my research, I am planning to use the FiPy.
      Until now, I used to work with an ESP8266 programmed in C. The cool thing of the FiPy, is that I can use Micro Python and that it has all the wireless interfaces I need in a very compact package.
      The problem is that I need to access the following functions from the ESP32 API:

      esp_err_t esp_wifi_80211_tx(wifi_interface_tifx, const void *buffer, int len, bool en_sys_seq)

      esp_err_t esp_wifi_scan_start(constwifi_scan_config_t *config, bool block)

      I am willing to rebuild Micro Python myself, but I need some guidance on how to do it without breaking the current release, so that I don't lose access to the other modules.

      What I need to do is:

      1. Modify the WLAN.scan() function to accept a few parameters (the channel that I need to scan and the time to be spent per channel).

      2. Add a function to send "free" beacons (I need it for my custom MAC protocol).

      Can anyone help me with this?
      The scan function is this one, STATIC mp_obj_t wlan_scan(mp_obj_t self_in) , at line 743 of modwlan.c.
      The other one is not used anywhere (or at least I cannot find it), so I may very well write my own.

      • What I do not understand is, once I modify the C code, how do I link it to Micro Python?
      • Where is the Micro Python source code? (except on the website of Micro Python).
      • (as an alternative) Can I build a "standard" Micro Python with my custom C code and then add the missing libraries to make the FiPy work?
      • Is anyone interested in having the final result (or cooperate with me)? My code will be open source anyway when it will be complete.
      J robert-hhR 2 Replies Last reply Reply Quote 0
      • J Offline
        jcaron @ingframin
        last edited by

        @ingframin Have you already tried rebuilding the firmware from source, without any modifications, and flashing that new firmware to the board?

        I 1 Reply Last reply Reply Quote 0
        • robert-hhR Offline
          robert-hh @ingframin
          last edited by

          @ingframin The source code is here https://github.com/pycom/pycom-micropython-sigfox
          Including instructions to set up the build environment. Follow the instructions carefully.

          1 Reply Last reply Reply Quote 2
          • I Offline
            ingframin
            last edited by

            Thanks for pointing me in the right direction. I am looking at the documentation of MicroPython at the moment and trying to build the environment without adding anything.
            I have some troubles with the xtensa kit, but I can figure out myself what's missing.
            I decided however, not to modify the standard library but to add my own module.
            It seems simpler and does not disrupt what is already there.
            Also, I don't want to risk to brick the modules.
            I'll post updates here when I am through with the build process.

            P 1 Reply Last reply Reply Quote 0
            • P Offline
              Paul Thornton @ingframin
              last edited by

              @ingframin Good luck. Feel free to post any querys here and ill get them answered ASAP.

              1 Reply Last reply Reply Quote 0
              • I Offline
                ingframin @jcaron
                last edited by

                @jcaron Yes, and it works!
                Now I am trying to figure out where to put my module.
                In the ESP8266 version there is a file called ESP8266.ld which contains the list of C files.
                Where is the equivalent for ESP32? If there is no equivalent, what shall I look for?

                1 Reply Last reply Reply Quote 0
                • G Offline
                  GMB124
                  last edited by

                  @ingframin Did you manage to modify the firmware? I would like to have a Wi-Fi advertising per 100 milliseconds; default LoPy-4 seem to send an advertising only if requested by a station.

                  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