spacehuhn / esp8266_beaconSpam

Creates up to a thousand WiFi access points with custom SSIDs.
MIT License
1k stars 200 forks source link

Specifying a single channel only uses channel 1 #39

Open atom-smasher opened 2 years ago

atom-smasher commented 2 years ago

This line is causing problems:

  if (sizeof(channels) > 1) {

If I'm only wanting to use one channel, eg:

const uint8_t channels[] = {12};

That test for sizeof(channels) fails, and the only channel that's actually used is channel 1.

atom-smasher commented 2 years ago

I think changing this line in the // run-time variables section from:

uint8_t wifi_channel = 1;

to this:

uint8_t wifi_channel = channels[0];

might be the fix.

atom-smasher commented 2 years ago

Fixed with a few other things - https://github.com/atom-smasher/esp8266_beaconSpam