Coder Social home page Coder Social logo

Comments (2)

spacehuhn avatar spacehuhn commented on June 19, 2024

Thanks!
You're absolutely right. I will update the source code

Edit: I confused this with your second issue #15

The spaces are intentional. Without it, you need to copy a lot more bytes back and forth. Slowing the whole thing down.

What you changed now will create a faulty beacon frame. Saying the SSID is shorter than the packet is (because I made it always 32chars long).

A better alternative could be to fill it with \0 instead of spaces, but then you also get some crazy behaviour on some devices. WiFi implementations are weird and you can expect different scan results on different devices.

from esp8266_beaconspam.

neilbrookins avatar neilbrookins commented on June 19, 2024

OK, I agree. So, there is not a perfect solution. I guess to make the SSID field truly variable length, you'd have to do a copy of the bytes in the beaconPacket after the SSID parameter forward or back based on the new length needed. I wouldn't think that would take very long, but I haven't tested it to measure the impact.

I wonder if the sending of longer SSID with trailing space padding (always 32 bytes) is also slower than sending a shorter SSID? If so, perhaps some of the extra time overhead of the copying bytes for a variable length beacon packet is regained back by sending fewer bytes over the air?

from esp8266_beaconspam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.