CN106708436B - Wireless storage system based on microcontroller and control method thereof - Google Patents

Wireless storage system based on microcontroller and control method thereof Download PDF

Info

Publication number
CN106708436B
CN106708436B CN201611165903.0A CN201611165903A CN106708436B CN 106708436 B CN106708436 B CN 106708436B CN 201611165903 A CN201611165903 A CN 201611165903A CN 106708436 B CN106708436 B CN 106708436B
Authority
CN
China
Prior art keywords
pin
resistor
module
client
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611165903.0A
Other languages
Chinese (zh)
Other versions
CN106708436A (en
Inventor
黄继伟
柯玉山
陈阿辉
黎源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuzhou University
Original Assignee
Fuzhou University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuzhou University filed Critical Fuzhou University
Priority to CN201611165903.0A priority Critical patent/CN106708436B/en
Publication of CN106708436A publication Critical patent/CN106708436A/en
Application granted granted Critical
Publication of CN106708436B publication Critical patent/CN106708436B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention relates to a wireless storage system based on a microcontroller and a control method thereof, wherein the wireless storage system comprises a server side and a client side; the server side includes: the system comprises a server-side main control module, and a server-side WiFi wireless communication module, a power module and a storage module which are respectively connected with the server-side main control module; the client module includes: the system comprises a client side main control module and a client side WiFi wireless communication module. The client and the server communicate in a wireless mode, the file is transmitted based on a TFTP protocol, and the file name and the control command use a simple data exchange language and simultaneously support the functions of uploading and downloading. The invention provides a wireless storage system and a control method thereof based on a microcontroller, and the wireless storage system is simple and practical in structure and has good expansibility and convenience.

Description

Wireless storage system based on microcontroller and control method thereof
Technical Field
The invention relates to the technical field related to storage, in particular to a wireless storage system based on a microcontroller and a control method thereof.
Background
At present, most of the existing storage technologies connect a storage server and a storage device through a wired manner, and with the arrival of the era of mobile internet, people increasingly use mobile devices, and increasingly demand wireless storage and multi-user access and storage downloading. The operation of the existing storage system adopting the wired connection mode is very complicated. Compared with a personal computer which has a large-capacity hard disk, the portable equipment can not directly expand a large amount of capacity from the aspects of cost and practicality. Therefore, the development of wireless storage systems is very important.
Disclosure of Invention
The invention aims to provide a wireless storage system based on a microcontroller and a control method thereof, so as to overcome the defects in the prior art.
In order to realize the purpose, the technical scheme of the invention is as follows: a wireless storage system based on a microcontroller comprises a server end and a client end; the server side includes: the system comprises a server-side main control module, and a server-side WiFi wireless communication module, a power module and a storage module which are respectively connected with the server-side main control module; the client module comprises: the system comprises a client side main control module and a client side WiFi wireless communication module.
In an embodiment of the present invention, the client is an intelligent handheld terminal.
In an embodiment of the present invention, the main control module includes a CC3200; a PIN21/SOP2 PIN of the CC3200 is connected with one end of a first resistor (R13) and is connected to one end of a first phase of a three-phase switch; the SOP1 pin of the CC3200 is connected with one end of a second resistor (R12) and is connected into one end of a second phase of the three-phase switch; the SOP0 pin of the CC3200 is connected with one end of a third resistor (R11) and is connected into one end of a third phase of the three-phase switch; the other end of the first resistor (R13), the other end of the second resistor (R12) and the other end of the third resistor (R11) are all grounded; the other ends of the first phase, the second phase and the third phase of the three-phase switch are connected to a 3.3V power supply end of the power module through a fourth resistor (R10); a VDD _ ANA2 pin of the CC3200 is connected with a 3.3V power supply end of the power supply module; a VCC pin of the CC3200 is connected with a VBAT _ CC end of the power module; the nReset pin of the CC3200 is connected to a reset circuit.
In an embodiment of the present invention, the server further includes an OLED display; the first PIN of the OLED display screen is grounded, the second PIN is connected to the 3.3V power supply end of the power module, the third PIN is connected with the PIN05 PIN of the CC3200, the fourth PIN is connected with the PIN07 PIN of the CC3200, the fifth PIN is connected with the PIN50 PIN of the CC3200, and the sixth PIN is connected with the PIN45 PIN of the CC 3200.
In an embodiment of the present invention, the storage module adopts an SD card; a DAT0_ DO PIN of the SD card is connected to a PIN64 PIN of the CC3200 through one end of a first resistor in a first resistor (R21); the VSS pin of the SD card is grounded; the VDD of the SD card is connected to a 3.3V power supply end of the power module; the CLK _ SCLH PIN of the SD card is connected into the PIN01 PIN of the CC3200 through one end of a second resistor in the first resistor pack; a CMD _ DI PIN of the SD card is connected to a PIN02 PIN of the CC3200 through one end of a third resistor in the first resistor bank; the other ends of the first resistor to the third resistor in the first resistor bank are connected to a 3.3V power supply end of the power supply module; and a PAD1 pin, a PAD2 pin, a PAD3 pin and a PAD4 pin of the SD card are all grounded.
In an embodiment of the present invention, the system further comprises the main control module further connected to a radio frequency module; the radio frequency module comprises an NRF24L01; the CE PIN of the NRF24L01 is connected into the PIN63 PIN of the CC3200 through one end of a first resistor in a second resistor bank (R24); the SCK PIN of the NRF24L01 is connected into the PIN05 PIN of the CC3200 through one end of a second resistor in a second resistor bank; the MISO PIN of the NRF24L01 is connected into the PIN06 PIN of the CC3200 through one end of a third resistor in a second resistor bank; the CSN PIN of NRF24L01 is connected into the PIN08 PIN of the CC3200 through one end of a first resistor in a third resistor (R25); the MOSI PIN of the NRF24L01 is connected to the PIN07 PIN of the CC3200 through one end of a second resistor in a third resistor pack; the IRQ PIN of the NRF24L01 is connected into the PIN62 PIN of the CC3200 through one end of a third resistor in a third resistor bank; the other ends of the first resistor to the third resistor in the second resistor bank are connected to a 3.3V power supply end of the power supply module; and the other ends of the first resistor to the third resistor in the third resistor array are connected to the 3.3V power supply end of the power supply module.
In an embodiment of the present invention, the present invention further includes a temperature and humidity sensor DTH11; a VDD end of the temperature and humidity sensor DTH11 is connected with a 3.3V power supply end of the power module, an SDA end is connected to a PIN18 PIN of the CC3200 through one end of a fourth resistor, and a GND end is grounded; the other end of the fourth resistor is connected with the 3.3V power supply end of the power supply module.
Further, a control method of the wireless storage system based on the microcontroller is also provided, and the control method is realized according to the following steps:
step S1: the server side initializes a clock, a serial port and an SD card pin;
step S2: the server side initializes a file system stored in the storage module;
and step S3: the server side initializes a task processing function of a real-time operating system carried in the server side main control module, starts task processing, starts the server side WiFi wireless communication module and waits for an interaction request of the client side;
and step S4: the client side main control module initializes an uploading UI control, a deleting UI control, a downloading UI control, a listing file UI control and a renaming UI control;
step S5: creating a socket, wherein the protocol type is UDP, and the adopted port is a first communication port for transmitting a file name or a control command;
step S6: the client side main control module binds a processing function corresponding to the UI control and an active reporting processing function of UDP data;
step S7: the client WiFi wireless communication module carries out JSON conversion on the transmission file name or the control command generated by the client main control module, converts the transmission file name or the control command into a JSON character string and sends the JSON character string to the server through the first communication port;
step S8: the WiFi wireless communication module of the server side responds to the request of the client side, receives the JSON character string, analyzes the JSON character string and acquires corresponding instruction content; the server side main control module judges whether the client side has the operation authority or not according to the account identity provided in the instruction content; if yes, judging the instruction type and executing the corresponding task according to the instruction content, generating a response instruction, performing JSON conversion, converting the JSON conversion into a JSON character string, and issuing the JSON character string to the client.
In an embodiment of the present invention, if a file uploading instruction is uploaded through the uploading UI control, the client main control module creates a WRQ message for transmission, and uploads the WRQ message to the server according to the steps S5 to S8; after receiving the WRQ message, the server side main control module sends a response message to the client side if the client side is judged to be the client side with the operation authority; and the client receives the response message, confirms the file data to be uploaded, reads the file data to be uploaded, calls a second communication port for file transmission by adopting a TFTP protocol, uploads the file data to be uploaded to the server according to the step S7, and stores the file data.
In an embodiment of the present invention, if the file downloading instruction is uploaded through the downloading UI control, the client main control module first creates an RRQ packet for transmission, and uploads the RRQ packet to the server according to the steps S5 to S8; after receiving the RRQ message, if the client is determined to be a client with an operation right, the server-side main control module obtains corresponding file data to be downloaded according to a file download instruction, and issues the file data to be downloaded to the client according to step S8; the client receives and stores the file data to be downloaded, and when receiving the file data to be downloaded, the client main control module sends a response instruction to the server.
Compared with the prior art, the invention has the following beneficial effects: the invention provides a wireless storage system based on a microcontroller and a control method thereof, wherein the microcontroller is used for realizing a wireless storage, a server is used for realizing three tasks, namely a command analysis task, a permission identification task and a file uploading and downloading task, the file of the server can be visually managed on a client in an interface interaction mode, and storage media are flexibly and variously selected and can be freely selected according to actual requirements and cost. The user can conveniently upload and download the file. The file sharing method and the file sharing system can also share files with other people quickly, and in addition, the introduction of user permission also provides guarantee for safely managing the wireless storage system.
Drawings
FIG. 1 is a schematic diagram of a microcontroller-based wireless memory system according to an embodiment of the present invention.
Fig. 2 is a circuit diagram of a server-side main control module according to an embodiment of the present invention.
Fig. 3 is a circuit diagram of an OLED display panel according to an embodiment of the invention.
FIG. 4 is a circuit diagram of an SD card according to an embodiment of the present invention.
Fig. 5 is a circuit diagram of an rf module according to an embodiment of the invention.
Fig. 6 is a circuit diagram of a temperature and humidity sensor according to an embodiment of the invention.
Fig. 7 is a circuit diagram of a restart circuit according to an embodiment of the present invention.
Fig. 8 is a circuit diagram of an ADC according to an embodiment of the invention.
FIG. 9 is a circuit diagram of a UART circuit according to an embodiment of the present invention.
Fig. 10 is a circuit diagram of a power module according to an embodiment of the invention.
Fig. 11 is a flowchart of a procedure of the server-side main control module according to an embodiment of the present invention.
Fig. 12 is a flowchart of a client-side host control module process according to an embodiment of the present invention.
FIG. 13 is a flowchart of a file uploading procedure in an embodiment of the invention.
FIG. 14 is a flowchart of a file downloading procedure according to an embodiment of the present invention.
Detailed Description
The technical scheme of the invention is specifically explained below with reference to the accompanying drawings.
The invention provides a wireless storage system based on a microcontroller, which comprises a server end and a client end as shown in figure 1; the server side includes: the system comprises a server-side main control module, a server-side WiFi wireless communication module, a power supply module and a storage module, wherein the server-side WiFi wireless communication module, the power supply module and the storage module are respectively connected with the server-side main control module and are used for being wirelessly connected with a client; the client module includes: the system comprises a client side main control module and a client side WiFi wireless communication module.
Further, in this embodiment, the client is an intelligent handheld terminal or other types of intelligent handheld terminals.
Further, in this embodiment, as shown in fig. 2, the main control module includes a CC3200; a PIN21/SOP2 PIN of the CC3200 is connected with one end of a first resistor (R13) and is connected to one end of a first phase of a three-phase switch; the SOP1 pin of the CC3200 is connected with one end of a second resistor (R12) and is connected into one end of a second phase of the three-phase switch; the SOP0 pin of the CC3200 is connected with one end of a third resistor (R11) and is connected into one end of a third phase of the three-phase switch; the other end of the first resistor (R13), the other end of the second resistor (R12) and the other end of the third resistor (R11) are all grounded; the other ends of the first phase, the second phase and the third phase of the three-phase switch are connected to a 3.3V power supply end of the power module through a fourth resistor (R10); a VDD _ ANA2 pin of the CC3200 is connected with a 3.3V power supply end of the power supply module; a VCC pin of the CC3200 is connected with a VBAT _ CC end of the power module; the nReset pin of CC3200 is connected to a reset circuit. In this embodiment, the three-phase switch is a mode selection switch.
Further, in this embodiment, as shown in fig. 3, the server further includes an OLED display screen; as shown in fig. 3, a first PIN of the OLED display screen is grounded, a second PIN is connected to a 3.3V power supply terminal of the power module, a third PIN is connected to PIN05 of CC3200, a fourth PIN is connected to PIN07 of CC3200, a fifth PIN is connected to PIN50 of CC3200, and a sixth PIN is connected to PIN45 of CC 3200.
Further, in this embodiment, as shown in fig. 4, the storage module adopts an SD card; a DAT0_ DO PIN of the SD card is connected into a PIN64 PIN of the CC3200 through one end of a first resistor in a first resistor (R21); the VSS pin of the SD card is grounded; the VDD of the SD card is connected to a 3.3V power supply end of the power module; a CLK _ SCLH PIN of the SD card is connected into a PIN01 PIN of the CC3200 through one end of a second resistor in a first resistor (R21); a CMD _ DI PIN of the SD card is connected to a PIN02 PIN of the CC3200 through one end of a third resistor in the first resistor; the other ends of the first resistor to the third resistor in the first resistor bank are connected to a 3.3V power supply end of the power supply module; the PAD1 pin, the PAD2 pin, the PAD3 pin and the PAD4 pin of the SD card are all grounded. In addition, a hard disk may be used as a storage object.
Further, in this embodiment, as shown in fig. 5, the main control module is further connected to a radio frequency module; the radio frequency module comprises an NRF24L01; the CE PIN of NRF24L01 is connected into the PIN63 PIN of CC3200 through one end of a first resistor in a second resistor (R24); the SCK PIN of NRF24L01 is connected into the PIN05 PIN of CC3200 through one end of a second resistor in a second resistor array; a MISO PIN of the NRF24L01 is connected into a PIN06 PIN of the CC3200 through one end of a third resistor in the second resistor bank; the CSN PIN of NRF24L01 is connected into the PIN08 PIN of CC3200 through one end of a first resistor in a third resistor (R25); the MOSI PIN of NRF24L01 is connected to the PIN07 PIN of CC3200 through one end of a second resistor in a third resistor pack; an IRQ PIN of the NRF24L01 is connected into a PIN62 PIN of the CC3200 through one end of a third resistor in a third resistor bank; the other ends of the first resistor to the third resistor in the second resistor bank are connected to the 3.3V power supply end of the power supply module; the other ends of the first resistor to the third resistor in the third resistor array are connected to the 3.3V power supply end of the power supply module.
Further, in the present embodiment, as shown in fig. 6, a temperature and humidity sensor DTH11 is further included; the VDD end of the temperature and humidity sensor DTH11 is connected with the 3.3V power supply end of the power module, the SDA end is connected to the PIN18 PIN of the CC3200 through one end of a fourth resistor (R20), and the GND end is grounded; the other end of the fourth resistor is connected with the 3.3V power supply end of the power supply module.
Further, in this embodiment, as shown in fig. 7, the restart circuit includes a fifth resistor (R14), a light emitting diode (D11), and a key (S11) connected in sequence. The other end of the fifth resistor is connected with a 3.3V power supply end of the power supply module; the two ends of the key are also connected with a first capacitor (C15) in parallel, and the other end of the key is grounded.
Further, in this embodiment, as shown in fig. 8, an ADC circuit is further included, where the ADC circuit includes a photoresistor (R23); one end of the photo resistor is grounded, and the other end is connected to one end of a sixth resistor (R22) and is connected to PIN60 of CC 3200. Through this photo resistance, can acquire illumination information, its effect is the environmental information who acquires the controller and locate together with temperature and humidity sensor, and the developer can conveniently acquire, can provide alarm information when environmental condition changes probably to the hardware damage. The data in the memory is secured.
Further, in this embodiment, as shown in fig. 9, a UART circuit is further included, a first PIN of the UART circuit is connected to the 5V power supply terminal of the power module, a second PIN is connected to the PIN17/TDO PIN of the CC3200, a third PIN is connected to the PIN57 PIN of the CC3200, a fourth PIN is connected to the PIN16/TDI PIN of the CC3200, a fifth PIN is connected to the PIN55 PIN of the CC3200, a sixth PIN is connected to the PIN20/TMS PIN of the CC3200, a seventh PIN is grounded, and an eighth PIN is connected to the PIN19/TCK PIN of the CC 3200. The UART circuit contacts the serial port and the JTAG module and plays a role in downloading and debugging programs for developers to use.
Further, in this embodiment, as shown in fig. 10, the power module includes an AMS1117; the VIN pin of the AMS1117 is accessed to VCC _ IN _5V through an SS14 and is grounded through a second capacitor (C10); the G pin of the AMS1117 is grounded; a VOUT pin of the AMS1117 is connected with another VOUT pin, and is respectively connected with one end of a third capacitor (C11) and one end of a fourth capacitor (C12) to serve as a 3.3V power supply end, the other end of the third capacitor (C11) and the other end of the fourth capacitor (C12) are grounded, and are also connected with one end of a fifth capacitor (C13) and one end of a sixth capacitor (C14) to serve as a VBAT _ CC end, and the other end of the fifth capacitor (C13) and the other end of the sixth capacitor (C14) are grounded.
Further, in this embodiment, the server side is composed of a hardware portion and system software, wherein the hardware portion includes a main control module, a wireless communication module, a storage module and a power module. The server-side software system is developed based on an embedded operating system. The client and the server communicate in a wireless mode, wherein the file is transmitted based on a TFTP protocol, and the file name and the control command use a simple data exchange language and simultaneously support the functions of uploading and downloading. And short instructions are adopted to carry out operation command and transmission, so that the whole storage system has interactivity. The system receives and transmits files through a TFTP protocol, and five modes of messages in the TFTP protocol are involved in file uploading and downloading. The system program also judges the operation authority of the user according to the identity of the user. A real-time operating system RTOS adopted by a main control module of the server side is divided into three task schedules, one is responsible for uploading and downloading files, and the other is responsible for converting and analyzing JSON instructions. And the other is responsible for judging the authority the user has. The server side main control module also comprises a user identification module which is used for judging the identity of the user, identifying according to the identity of the logged account, giving the corresponding operation authority to the user, not allowing the user who does not obtain the authority to perform related operation, and ensuring the normal access and the data security.
The client program is composed of application software installed on the handheld mobile terminal, is realized by utilizing QT, can compile different software according to different mobile terminals, and has extremely high expansibility. A port is provided between the client and the server for transmitting command data, the communication instruction is carried out by JSON character strings, and the JSON provides a key value pair form which is very suitable for application in the occasion. And performing JSON conversion and transmission during sending, analyzing the JSON character string after the receiving end receives the data, and then performing corresponding operation.
The TFTP task is to process the uploading and downloading of files. The command parsing task is to process JSON instructions transmitted from the client to the server, namely converting the commands into JSON character strings and performing inverse parsing on the JSON character strings into the commands.
The communication instruction of the client and the server is carried out by JSON character strings, the form of key value pairs provided by JSON is very suitable for the occasion, the JSON is transmitted after JSON conversion is carried out on the transmitted command, the JSON character strings are analyzed after the receiving end receives data, and then corresponding operation is carried out.
Further, a control method of a wireless storage system based on a microcontroller is also provided, as shown in fig. 11 to 14, which is implemented according to the following steps:
step S1: initializing a clock, a serial port and an SD card pin by the server terminal;
step S2: the server side initializes a file system stored in the storage module;
and step S3: the server side initializes a task processing function of a real-time operating system carried in a server side main control module, starts task processing, starts a WiFi wireless communication module of the server side and waits for an interaction request of a client side;
and step S4: the client side main control module initializes an uploading UI control, a deleting UI control, a downloading UI control, a listing file UI control and a renaming UI control;
step S5: creating a socket, wherein the protocol type is UDP, and the adopted port is a first communication port for transmitting a file name or a control command;
step S6: the client-side main control module binds the processing function corresponding to the UI control and the active reporting processing function of the UDP data;
step S7: the client WiFi wireless communication module carries out JSON conversion on a transmission file name or a control command generated by the client main control module, converts the transmission file name or the control command into a JSON character string and sends the JSON character string to the server through the first communication port; in this embodiment, the port is 8090;
step S8: the WiFi wireless communication module at the server responds to the request of the client, receives the JSON character string, analyzes the JSON character string and acquires corresponding instruction content; the server side main control module judges whether the client side has the operation authority or not according to the account identity provided in the instruction content; if yes, judging the instruction type and executing the corresponding task according to the instruction content, generating a response instruction, performing JSON conversion, converting the JSON conversion into a JSON character string, and issuing the JSON character string to the client.
Further, in step S6, the UI control handles the binding function:
connect(ui->widget,SIGNAL(changeFileNameSignal(QString,
QString)),this,SLOT(changeFileNameSignalSlot(QString,QString)));
connect(ui->widget,SIGNAL(downloadFileSignal(QString)),
this,SLOT(downloadFileSignalSlot(QStri)));
connect(ui->widget,SIGNAL(deleteFileSignal(QString)),
this,SLOT(deleteFileSignalSlot(QString)));
connect(ui->uploadpushButton,SIGNAL(clicked(bool)),
this,SLOT(uploadpushButtonSlot()))。
UDP data reporting binding function:
connect(udpSocket, SIGNAL(readyRead()),
this,SLOT(readPacket()))。
further, in this embodiment, the file uploading is implemented through a TFTP protocol, that is, a write request is sent to the server in advance, after a response is obtained, data of the local file is read in batch, and then the local file data is sent. Specifically, if a file uploading instruction is uploaded through the uploading UI control, the client main control module firstly creates a WRQ message for transmission and uploads the WRQ message to the server according to the steps S5 to S8; after receiving the WRQ message, the server main control module issues a response message to the client if the client is judged to be the client with the operation authority; the client receives the response message, confirms the file data to be uploaded, reads the file data to be uploaded, calls a second communication port for file transmission by adopting a TFTP protocol, uploads the file data to be uploaded to the server according to the step S7, and stores the file data.
Further, in this embodiment, the file downloading sends a reading message to the server in advance, then waits for the server to confirm the sending back of the file data to be downloaded, and the client receives the data and stores the data in the local file until all the data are completely received. Specifically, if a file downloading instruction is uploaded through the downloading UI control, the client main control module creates an RRQ message to be sent, and uploads the RRQ message to the server according to the steps S5 to S8; after receiving the RRQ message, if the client is determined to be a client with an operation right, the server-side main control module obtains corresponding file data to be downloaded according to a file download instruction, and issues the file data to be downloaded to the client according to step S8; the client receives and stores the file data to be downloaded, and when receiving the file data to be downloaded, the main control module of the client sends a response instruction to the server.
The above are preferred embodiments of the present invention, and all changes made according to the technical scheme of the present invention that produce functional effects do not exceed the scope of the technical scheme of the present invention belong to the protection scope of the present invention.

Claims (6)

1. A wireless storage system based on a microcontroller is characterized by comprising a server side and a client side; the server side includes: the system comprises a server-side main control module, and a server-side WiFi wireless communication module, a power module and a storage module which are respectively connected with the server-side main control module; the client module includes: the system comprises a client side main control module and a client side WiFi wireless communication module;
the main control module comprises a CC3200; a PIN21/SOP2 PIN of the CC3200 is connected with one end of a first resistor and is connected to one end of a first phase of a three-phase switch; the SOP1 pin of the CC3200 is connected with one end of a second resistor and is connected into one end of a second phase of the three-phase switch; the SOP0 pin of the CC3200 is connected with one end of a third resistor and is connected to one end of a third phase of the three-phase switch; the other end of the first resistor, the other end of the second resistor and the other end of the third resistor are all grounded; the other ends of the first phase, the second phase and the third phase of the three-phase switch are connected to a 3.3V power supply end of the power module through a fourth resistor; a VDD _ ANA2 pin of the CC3200 is connected with a 3.3V power supply end of the power supply module; a VCC pin of the CC3200 is connected with a VBAT _ CC end of the power module; the nReset pin of the CC3200 is connected with a restart circuit;
the server side also comprises an OLED display screen connected with the server side main control module; a first PIN of the OLED display screen is grounded, a second PIN of the OLED display screen is accessed to a 3.3V power supply end of the power module, a third PIN of the OLED display screen is connected with a PIN05 PIN of the CC3200, a fourth PIN of the OLED display screen is connected with a PIN07 PIN of the CC3200, a fifth PIN of the OLED display screen is connected with a PIN50 PIN of the CC3200, and a sixth PIN of the OLED display screen is connected with a PIN45 PIN of the CC3200;
the storage module adopts an SD card; a DAT0_ DO PIN of the SD card is connected into a PIN64 PIN of the CC3200 through one end of a first resistor in a first resistor bank; the VSS pin of the SD card is grounded; the VDD of the SD card is connected to a 3.3V power supply end of the power module; the CLK _ SCLH PIN of the SD card is connected into the PIN01 PIN of the CC3200 through one end of a second resistor in the first resistor pack; a CMD _ DI PIN of the SD card is connected to a PIN02 PIN of the CC3200 through one end of a third resistor in the first resistor bank; the other ends of the first resistor to the third resistor in the first resistor bank are connected to a 3.3V power supply end of the power supply module; the PAD1 pin, the PAD2 pin, the PAD3 pin and the PAD4 pin of the SD card are all grounded;
the server end also comprises a radio frequency module connected with the server end main control module; the radio frequency module comprises an NRF24L01; the CE PIN of the NRF24L01 is connected into the PIN63 PIN of the CC3200 through one end of a first resistor in a second resistor bank; the SCK PIN of the NRF24L01 is connected into the PIN05 PIN of the CC3200 through one end of a second resistor in a second resistor bank; the MISO PIN of the NRF24L01 is connected into the PIN06 PIN of the CC3200 through one end of a third resistor in a second resistor bank; the CSN PIN of NRF24L01 is connected to the PIN08 PIN of CC3200 through one end of a first resistor in a third resistor pack; the MOSI PIN of the NRF24L01 is connected to the PIN07 PIN of the CC3200 through one end of a second resistor in a third resistor pack; the IRQ PIN of the NRF24L01 is connected into the PIN62 PIN of the CC3200 through one end of a third resistor in a third resistor bank; the other ends of the first resistor to the third resistor in the second resistor bank are connected to a 3.3V power supply end of the power supply module; and the other ends of the first resistor to the third resistor in the third resistor array are connected to the 3.3V power supply end of the power supply module.
2. The microcontroller-based wireless memory system of claim 1 wherein the client is an intelligent handheld terminal.
3. The microcontroller-based wireless memory system of claim 1 further comprising a temperature and humidity sensor DTH11; a VDD end of the temperature and humidity sensor DTH11 is connected with a 3.3V power supply end of the power module, an SDA end is connected to a PIN18 PIN of the CC3200 through one end of a fourth resistor, and a GND end is grounded; the other end of the fourth resistor is connected with the 3.3V power supply end of the power supply module.
4. A method for controlling a microcontroller-based wireless storage system according to any of claims 1~3, comprising the steps of:
step S1: the server side initializes a clock, a serial port and an SD card pin;
step S2: the server side initializes a file system stored in the storage module;
and step S3: the server side initializes a task processing function of a real-time operating system carried in the server side main control module, starts task processing, starts the server side WiFi wireless communication module and waits for an interaction request of the client side;
and step S4: the client side main control module initializes an uploading UI control, a deleting UI control, a downloading UI control, a listing file UI control and a renaming UI control;
step S5: creating a socket, wherein the protocol type is UDP, and the adopted port is a first communication port for transmitting a file name or a control command;
step S6: the client side main control module binds a processing function corresponding to the UI control and an active reporting processing function of UDP data;
step S7: the client WiFi wireless communication module carries out JSON conversion on a transmission file name or a control command generated by the client main control module, converts the transmission file name or the control command into a JSON character string and sends the JSON character string to the server through the first communication port;
step S8: the WiFi wireless communication module of the server side responds to the request of the client side, receives the JSON character string, analyzes the JSON character string and acquires corresponding instruction content; the server side main control module judges whether the client side has the operation authority or not according to the account identity provided in the instruction content; if yes, judging the instruction type and executing the corresponding task according to the instruction content, generating a response instruction, performing JSON conversion, converting the JSON conversion into a JSON character string, and issuing the JSON character string to the client.
5. The method according to claim 4, wherein if a file upload instruction is uploaded through the upload UI control, the client main control module creates a WRQ message to be sent first, and uploads the WRQ message to the server according to the steps S5 to S8; after receiving the WRQ message, the server side main control module sends a response message to the client side if the client side is judged to be the client side with the operation authority; and the client receives the response message, confirms the file data to be uploaded, reads the file data to be uploaded, calls a second communication port for file transmission by adopting a TFTP protocol, uploads the file data to be uploaded to the server and stores the file data according to the step S7.
6. The method according to claim 4, wherein if the file download instruction is uploaded through the download UI control, the client side main control module creates an RRQ message to be sent, and uploads the RRQ message to the server side according to the steps S5 to S8; after receiving the RRQ message, if the client is determined to be a client with an operation right, the server-side main control module obtains corresponding file data to be downloaded according to a file download instruction, and issues the file data to be downloaded to the client according to step S8; the client receives and stores the file data to be downloaded, and when receiving the file data to be downloaded, the client main control module sends a response instruction to the server.
CN201611165903.0A 2016-12-16 2016-12-16 Wireless storage system based on microcontroller and control method thereof Active CN106708436B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611165903.0A CN106708436B (en) 2016-12-16 2016-12-16 Wireless storage system based on microcontroller and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611165903.0A CN106708436B (en) 2016-12-16 2016-12-16 Wireless storage system based on microcontroller and control method thereof

Publications (2)

Publication Number Publication Date
CN106708436A CN106708436A (en) 2017-05-24
CN106708436B true CN106708436B (en) 2023-03-07

Family

ID=58937946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611165903.0A Active CN106708436B (en) 2016-12-16 2016-12-16 Wireless storage system based on microcontroller and control method thereof

Country Status (1)

Country Link
CN (1) CN106708436B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110045926B (en) * 2019-04-10 2022-06-03 超越科技股份有限公司 Controllable erasing and writing storage device, display and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101409727A (en) * 2008-11-24 2009-04-15 株洲南车时代电气股份有限公司 Document transmission method and apparatus
CN102855142A (en) * 2012-09-24 2013-01-02 广东华大集成技术有限责任公司 Client architecture based on RIA (rich internet applications) and implementation method thereof
CN104715787A (en) * 2013-12-14 2015-06-17 上海莞东拿信息科技有限公司 Novel passive matrix addressing data storage device with power-off protection
CN105785099A (en) * 2016-03-02 2016-07-20 谢彬琪 Multi-node electrical power quality real-time monitoring system based embedded wireless network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9430223B2 (en) * 2014-09-25 2016-08-30 International Business Machines Corporation Live operating system update mechanisms

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101409727A (en) * 2008-11-24 2009-04-15 株洲南车时代电气股份有限公司 Document transmission method and apparatus
CN102855142A (en) * 2012-09-24 2013-01-02 广东华大集成技术有限责任公司 Client architecture based on RIA (rich internet applications) and implementation method thereof
CN104715787A (en) * 2013-12-14 2015-06-17 上海莞东拿信息科技有限公司 Novel passive matrix addressing data storage device with power-off protection
CN105785099A (en) * 2016-03-02 2016-07-20 谢彬琪 Multi-node electrical power quality real-time monitoring system based embedded wireless network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于TFTP协议的嵌入式系统开发方法设计与实现》;汪小燕等;《 华中科技大学学报(自然科学版)》;20070130;第34卷(第12期);第56-58页 *

Also Published As

Publication number Publication date
CN106708436A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
KR101558236B1 (en) Method for Browsing Internet of Things and Apparatus using the same
CN103309709B (en) A kind of firmware upgrade method, device and communication equipment
CN105404385B (en) A kind of method and device of intelligent display terminal and somatosensory device realization data interaction
CN109558157A (en) Firmware setting is saved during firmware update
CN103262020B (en) Virtual input/output device for printer
CN105095736A (en) Data transfer based on input device identifying information
Jadhav et al. Universal Mobile Application Development (UMAD) On Home Automation
CN106708436B (en) Wireless storage system based on microcontroller and control method thereof
US20100017863A1 (en) Portable storage apparatus for providing working environment migration service and method thereof
Weekly et al. Building-in-briefcase (bib)
Zeyad et al. A Smart Home Appliances Controlling Application (HACA-App) with Highly Secretive System
De Sousa Internet of Things with Intel Galileo
Culic et al. Commercial and Industrial Internet of Things Applications with the Raspberry Pi: Prototyping IoT Solutions
CN206301317U (en) A kind of wireless memory device based on microcontroller
CN105188154B (en) A kind of method, apparatus and system being automatically brought into operation smart machine
JP2009529162A (en) Device configuration and data extraction method using portable transaction format
CN104424153B (en) A kind of audio & video equipment data collecting system and its method to USB interface
CN108108801B (en) Device for realizing data read-write by simulating contact type IC card and read-write method
KR20170036587A (en) Electronic apparatus and control method thereof
James et al. Programming Raspberry Pi for IoT System
Lee Internet of things: Smart home system
CN111294985A (en) Portable miner lamp communication system based on 4G, communication method and construction method
Seneviratne et al. Raspberry Pi 3 Projects for Java Programmers
Schmidt A Recent Open Source Embedded Implementation of the DESFire Specification Designed for On-the-Fly Logging with NFC Based Systems
Majhi IoT: Home Automation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant