cnlohr / espusb

Software-only ESP8266 USB Device
Other
1.47k stars 230 forks source link

Wifi setting to Station Mode doesn't stay #54

Open bangity opened 4 years ago

bangity commented 4 years ago

Hello,

I am using the Wemos D1 Mini. I am able to connect via AP mode from device to the Wemos. I was able to connect to Station Mode to home WIFI. It stays for some time and when reset, it reverted back into AP mode.

Edit 1: After setting DHCP permanent IP in the router, I am able to connect. However, the HID function doesn't work. Mouse or keyboard. And the bluetooth keeps getting recognized/unrecognized in windows.

Edit 2: After connect to a different USB port (i.e. reset), it defaults back to AP Mode.

I used a 1k resistor. don't know if this is causing problem?

Thank you.

gahujipo commented 3 years ago

I am using a Lolin/Wemos D1 Mini too. And I have the same problem. I am able to join the WiFi station. When I save the settings the serial monitor shows me:

                                Switching to: "<SSID>"/"<pwd>" (15/25). BSSID_SET: 0 [1]
                                          -->'<SSID>'
                                                              -->'<pwd>'
                 Switching.
                           IGMP Joining: 9404a8c0 fb0000e0
                                                          STAT: 5
                                                                 IP: 192.168.4.148
       NM: 255.255.255.0
                        GW: 192.168.4.254
                                         WCFG: /<SSID>/<pwd>/
               IGMP Joining: 9404a8c0 fb0000e0

Then the board is reachable at this IP address.

But after a reset or power loss it shows:

esp8266 test usb driver
Reason: 00000006
                Exec  : 00000000
                                epc1  : 00000000
                                                epc2  : 00000000
                                                                epc3  : 00000000
     excvaddr:00000000
                      depc: 00000000
                                    Loading Settings: af / 0 / 69 / 69
                                                                      Settings Loaded: ESP_68EEF5 / Default
                                Opmode: 2
                                         Default SoftAP mode: "ESP_68EEF5":""
  Boot Ok.
          IGMP Joining: 0104a8c0 fb0000e0

I used the prebuilt binaries mentioned in the README. Any ideas?

beckmx commented 1 year ago

@gahujipo that usually happens if you didnt erase the flash with esptool or if the flash is already corrupted as you said, because of an electrical disconnection, happens frequently, the flash just gets corrupted