通过wifi从手机向任何wifi设备(智能开关)发送数据

时间:2021-07-27 20:50:31

I am trying to build an application that controls the smart switch wifi device. As far now i have created an app that lists the nearby wifi networks (it even displays the wifi signal of the smart switch device) and connects to them. I need to know the basic syntax to send any data to at least switch on or off the device from the app. Also please let me know about any APIs that can be used.

我正在尝试构建一个控制智能交换机wifi设备的应用程序。到目前为止,我已经创建了一个应用程序,列出附近的WiFi网络(它甚至显示智能开关设备的wifi信号)并连接到它们。我需要知道发送任何数据的基本语法,以至少从应用程序打开或关闭设备。另请告诉我任何可以使用的API。

1 个解决方案

#1


0  

For Sending Data between connected wifi device, you have to use socket programming. Below link showing the example for sending data

要在连接的wifi设备之间发送数据,您必须使用套接字编程。下面的链接显示了发送数据的示例

https://examples.javacodegeeks.com/android/core/socket-core/android-socket-example/

#1


0  

For Sending Data between connected wifi device, you have to use socket programming. Below link showing the example for sending data

要在连接的wifi设备之间发送数据,您必须使用套接字编程。下面的链接显示了发送数据的示例

https://examples.javacodegeeks.com/android/core/socket-core/android-socket-example/