Welcome, Guest
You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 893
» Latest member: Xebulon
» Forum threads: 2,046
» Forum posts: 2,216

Full Statistics

Online Users
There are currently 19 online users.
» 0 Member(s) | 19 Guest(s)

Latest Threads
Installation for S100
Forum: User Manual for Tank Chassis
Last Post: smartarduino
03-10-2017, 11:39 AM
» Replies: 0
» Views: 2,932
ESPduino Code for WiFi Ta...
Forum: ESPDuino=ESP8266+Arduino
Last Post: smartarduino
11-16-2016, 08:35 AM
» Replies: 0
» Views: 5,590
ESP32 Chip Documents
Forum: ESP32 Chip
Last Post: smartarduino
10-11-2016, 04:11 AM
» Replies: 0
» Views: 8,022
DataSheet for WiFi Grove ...
Forum: WiFi Grove kit based on ESP8266
Last Post: smartarduino
06-08-2016, 06:52 AM
» Replies: 0
» Views: 7,113
Some documents about Ai60...
Forum: Ai6060H
Last Post: smartarduino
05-26-2016, 01:03 AM
» Replies: 0
» Views: 7,096
Manual for 2-way motor & ...
Forum: 2-way motor & 16-way servo shield board for Arduino
Last Post: smartarduino
05-10-2016, 10:42 AM
» Replies: 0
» Views: 7,496
NodeMcu Firmware 1.4
Forum: NodeMcu
Last Post: smartarduino
05-10-2016, 06:24 AM
» Replies: 0
» Views: 9,226
User Manual for DoArm S7
Forum: DoArm
Last Post: smartarduino
04-25-2016, 10:07 AM
» Replies: 0
» Views: 6,228
Video for DoArm
Forum: DoArm
Last Post: smartarduino
04-14-2016, 04:01 AM
» Replies: 0
» Views: 1,783
Manual for DoArm S6
Forum: DoArm
Last Post: smartarduino
04-13-2016, 09:50 AM
» Replies: 0
» Views: 1,621

 
Thumbs Up CLOUD coding protocal
Posted by: smartarduino - 05-28-2015, 08:20 AM - Forum: NodeMcu Cloud Coding - No Replies

Principle:
Lua source code edited on the cloud is transferred to the node and runned on the node.
The node communicates with server via TCP protocal(Server IP: 198.199.94.16@port:7500)

Here is protocal:

Code:
1, Define your node's name  (such as "doitCar")
cmd=subscribe&topic=doitCar\r\n


Code:
2, When a lua file is edited and needed to be downloaded at the node:
     2.1 Server sends [color=#ff9933]"__B__"[/color] to the node. the node open a file,and send [color=#ff9933]"cmd=next\r\n"[/color] to server as responce string. Once the node recievs "__B__", it should know that a new source code file is prepared to be transferred. 
     2.2 Server will send the source code in sevaral package. The node recieves and store the package one by one, and sends [color=#ff66ff]"cmd=next\r\n"[/color] to the server every package.
     2.3 Server send [color=#ff9933]"__E__"[/color] when the transfering is finished. The node recieves the finishing string, saves the source code, closes the opened file. compiles the file,and dofile it.


Code:
3, Send [color=#ff9933]"cmd=keep\r\n"[/color] every 3 minitus to keep the tcp link alive.


The CLOUD coding website:http://cloud.doit.am

A tutorial was posted at here:http://bbs.smartarduino.com/showthread.php?tid=3&pid=3#pid3     that's really simple and easy.
Have fun!

A chinese protocal can be found here:
http://bbs.doit.am/forum.php?mod=viewthread&tid=44&extra=page%3D1

You can get the tutorial code at github:
https://github.com/SmartArduino/COULD-coding-with-NodeMCU


Cool Angel Huh Idea Dodgy Tongue

Print this item