rich1111 / react-native-esptouch2

A React Native module for ESP8266 Smartconfig
4 stars 4 forks source link

Problem wifi connection #1

Open devr200 opened 5 years ago

devr200 commented 5 years ago

Hi, when i execute the code in react native project, i return this error "no wifi connection".

i don't understand how to pass the ssid of the wifi network to the start method.

This is my code: let connected_wifi_password = "mypassword"; let broadcast_type = 1; // 1: broadcast; 0: multicast RNEsptouch.startSmartConfig( connected_wifi_password , broadcast_type ).then((res) => {

        if (res.code == 200) {
            // ESPTouch success
            console.log(res)
            Alert.alert("ok " + res);
        } else {
            // ESPTouch failed
            console.info(res.msg)
            Alert.alert("error "+res.msg);
        }
    })

Thanks

rich1111 commented 4 years ago

hi, you don't need to specify the ssid, the plugin module use the current wifi ssid you connected!

lbyzju commented 1 year ago

have the same problem, "no wifi connection".