jeelabs / esp-link

esp8266 wifi-serial bridge, outbound TCP, and arduino/AVR/LPC/NXP programmer
Other
2.82k stars 720 forks source link

Possible to choose/compile other ssid than ESP_xxxxxx ? #521

Open zuidwijk opened 3 years ago

zuidwijk commented 3 years ago

I'm wondering, is it possible to choose another name as ssid? Of course by comping your own firmware... I'm search through the code yet I can't find if possible, and where (if indeed it's possible).

uzi18 commented 3 years ago

It should be possible

zuidwijk commented 3 years ago

Yeah ... but how/where? I've search through the whole code (did also searched with grep through the code)

uzi18 commented 3 years ago

@zuidwijk here: https://github.com/jeelabs/esp-link/blob/cf329e8b84a55a05afa04df971d9abd9793c9130/Makefile#L24-L41

zuidwijk commented 3 years ago

Nice! Gonna try that later today ☺️

zuidwijk commented 3 years ago

Just tried it, unfortunately it doesn't work ....

# The SOFTAP configuration can be hard-coded here, the minimum parameters to set are AP_SSID && AP_PASS
# The AP SSID has to be at least 8 characters long, same for AP PASSWORD
# The AP AUTH MODE can be set to:
#  0 = AUTH_OPEN, 
#  1 = AUTH_WEP, 
#  2 = AUTH_WPA_PSK, 
#  3 = AUTH_WPA2_PSK, 
#  4 = AUTH_WPA_WPA2_PSK
# SSID hidden default 0, ( 0 | 1 ) 
# Max connections default 4, ( 1 ~ 4 )
# Beacon interval default 100, ( 100 ~ 60000ms )
#
AP_SSID ?=testname
AP_PASS ?=testname
AP_AUTH_MODE ?=0
AP_SSID_HIDDEN ?=0
AP_MAX_CONN ?=4
AP_BEACON_INTERVAL ?=100

AP_SSID & AP_PASS are set as they're minimum required

uzi18 commented 3 years ago

What does it mean, ap is not shown with your name or password does not work?

zuidwijk commented 3 years ago

What does it mean, ap is not shown with your name or password does not work?

It doesn't matter what I use, ... it keeps popping up with ESP_xxxxxx

uzi18 commented 3 years ago

Did you check after complete wipe flash?

zuidwijk commented 3 years ago

Yeah I always wipe before flash. I git cloned it to another directory and then could successfully change the ssid. Yet the other settings in config.h (or .c, one off those two) now don't apply... guess have to play further with the settings.

uzi18 commented 3 years ago

make clean command is your friend, try it in old dir

So it work for you now?

zuidwijk commented 3 years ago

Yeah I'll try that later (probably tomorrow)

I'm compiling via docker, so how do I make a "make clean" there?

mamert commented 3 years ago

Well, the initial SSID is NOT "ESP_whatever", the initial SSID is "what was last used before you flashed esp-link". Flashing esp-link doesn't change existing wifi settings, sadly.

So, as part of the flashing procedure, you could:

  1. build a small firmware (espressif or arduino) with command to start an AP with the creds you choose
  2. flash that
  3. press reset to run that code
  4. flash esp-link