File tree Expand file tree Collapse file tree 4 files changed +67
-0
lines changed
Expand file tree Collapse file tree 4 files changed +67
-0
lines changed Original file line number Diff line number Diff line change 1+ / *
2+ * Copyright (c ) 2006 - 2019 , RT - Thread Development Team
3+ *
4+ * SPDX - License - Identifier : MIT License
5+ *
6+ * Change Logs :
7+ * Date Author Notes
8+ * 2019 - 06 - 13 SummerGift first version
9+ * /
10+
11+ import network
12+
13+ ap = network .WLAN (network .AP_IF )
14+ ap .config (essid = "hello_rt-thread" , password = "88888888" )
15+ ap .active (True )
16+ ap .config ("essid" )
Original file line number Diff line number Diff line change 1+ / *
2+ * Copyright (c ) 2006 - 2019 , RT - Thread Development Team
3+ *
4+ * SPDX - License - Identifier : MIT License
5+ *
6+ * Change Logs :
7+ * Date Author Notes
8+ * 2019 - 06 - 13 SummerGift first version
9+ * /
10+
11+ import network
12+
13+ wlan = network .WLAN (network .STA_IF )
14+ wlan .scan ()
15+ wlan .connect ("rtthread" ,"02188888888" )
16+ wlan .isconnected ()
Original file line number Diff line number Diff line change 1+ / *
2+ * Copyright (c ) 2006 - 2019 , RT - Thread Development Team
3+ *
4+ * SPDX - License - Identifier : MIT License
5+ *
6+ * Change Logs :
7+ * Date Author Notes
8+ * 2019 - 06 - 13 SummerGift first version
9+ * /
10+
11+ import usocket
12+
13+ s = usocket .socket (usocket .AF_INET ,usocket .SOCK_STREAM )
14+ s .connect (("192.168.10.110" ,6000 ))
15+ s .send ("micropython" )
16+ s .close ()
Original file line number Diff line number Diff line change 1+ / *
2+ * Copyright (c ) 2006 - 2019 , RT - Thread Development Team
3+ *
4+ * SPDX - License - Identifier : MIT License
5+ *
6+ * Change Logs :
7+ * Date Author Notes
8+ * 2019 - 06 - 13 SummerGift first version
9+ * /
10+
11+ import usocket
12+
13+ s = usocket .socket (usocket .AF_INET ,usocket .SOCK_STREAM ) # Create STREAM TCP socket
14+ s .bind (('192.168.12.32' , 6001 ))
15+ s .listen (5 )
16+ s .setblocking (True )
17+ sock ,addr = s .accept ()
18+ sock .recv (10 )
19+ s .close ()
You can’t perform that action at this time.
0 commit comments