Hi guys,
I'm developing IoT project with arduino and cpp client socket. The arduino has ethernet shıeld w5100 and sd card. I'm stuck with some commands which are important for the project.
Arduino as a server and cpp socket client.
I need to find arduino's specifications and send it back parsable format like XML ,
another command is that ı need to send binary file to arduino and arduino upload that and execute it. It will be FTP kinda command. Can some help to me? I can only send and receive messages between arduino and cpp socket client right now. I researched the commands but I did not to reach success. I need some support. Thx.
More explanation about project,
Topic: Internet of Things
The project is to control small internet devices using a remote program upload and peripharel discovery. A listening program will run in the background and will listen for external commands.
Requirement: The program will listen to a port for external commands and requests. After receiving the command, the listener program will execute the request. It is possible to transfer data in/out the device if necessary. The commands will have a predefined structure whicl should be identifies during the project. The small device can be an Ardunio system although this is not a must.
COMMANDS:
• GET_INFO
This command is sent by an external system to the device. The listening program will collect information about the device it is running on, and using a parsebla format (like XML), it will send it back. Some items can be listed as :
o # of AD converters
o Clock Frequeny
o Chip Model
o # of timers
o Serial/ USB/CAN/I2C communication types
o Size of registers (8,16,32,64)
o ...etc.
• UPLOAD DATA
Using a predefined format, data needs to be passed to the device and a suitable location will be used to store the data. For example
o # of values to be stored
o Set of values
o Location ??? (dynamicly determined)
• DOWNLOAD DATA
Data generated after the running a program, will be transferred using a predefined protocol to external systems.
o Store the generated data to a predefined location. The data will uploaded to an external system upon request.
• UPLOAD/EXECUTE PROGRAM
This is to upload a program to the device. The program will be compiled externally using the info collected above. After receiving the program to a suitable region in the memory, the listener program will pass the control to the program. Using a timer, the listener program will wake up periodically and it may check the health of the running program and interrupt if necessary.
• INTERRUPT PROGRAM
This command will be used to stop the running program.