Skip to content

Commit

Permalink
Merge pull request #88 from AEFeinstein/master
Browse files Browse the repository at this point in the history
 esp82xx now uses SOFTAP_CHANNEL instead of a hardcoded 1
  • Loading branch information
cnlohr committed Nov 21, 2018
2 parents 9df8005 + 4286176 commit 6b2daaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fwsrc/commonservices.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,10 @@ CMD_RET_TYPE cmd_WiFi(char * buffer, int retsize, char * pusrdata, char *buffend
#endif

int chan = (bssid) ? safe_atoi(bssid) : config.channel;
if( chan == 0 || chan > 13 ) chan = 1;
if( chan == 0 || chan > 13 )
{
chan = SOFTAP_CHANNEL;
}
config.channel = chan;

//printf( "Mode now. %s %s %d %d %d %d %d\n", config.ssid, config.password, config.ssid_len, config.channel, config.authmode, config.max_connection );
Expand Down Expand Up @@ -840,7 +843,7 @@ static void ICACHE_FLASH_ATTR GoAP( int always )
config.ssid_len = ets_strlen(SETTINGS.DeviceName);
os_memcpy( &config.ssid, SETTINGS.DeviceName, config.ssid_len+1 );
os_memcpy( &config.password, "", 1 );
config.channel = 1;
config.channel = SOFTAP_CHANNEL;
config.authmode = 0;
config.ssid_hidden = 0;
config.max_connection = 4;
Expand Down
1 change: 1 addition & 0 deletions user.cfg.example
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ OPTS += -DUSE_OPTIMIZE_PRINTF
#OPTS += -DNET_TIMEOUT=3.0
#OPTS += -DDISABLE_NET_REFLASH #Saves about 196 bytes of iram.
OPTS += -DMFS_PAGE_OFFSET=$(MFS_PAGE_OFFSET)
OPTS += -DSOFTAP_CHANNEL=11

#If you need an extra 3kB of IRAM, you can force esp82xx to use the ROM
#symbols for some internal libgcc functions.
Expand Down

0 comments on commit 6b2daaf

Please sign in to comment.