A demo for EasyLink in React Native.
You can find demo script in App.js.
- Include
EasyLink.jsfile into your code.
import EasyLink from './EasyLink';- Start EasyLink and watch callback data.
EasyLink.start(ssid, password, data => {
// print received data
/* the data is an object, here example:
{
client: 0,
data: {
IP: "192.168.1.2"
},
name: "MK3165_1(003753)"
}
*/
console.log("[EasyLink] callback", data);
// do your logic, such as update component render...
// remember stop EasyLink
EasyLink.stop();
});- Use IP address (get by step 2) to communicate with Firmware in LAN or do your custom logic.
Finished.
