CN106097681B - Device and method, system, the sensor network of raspberry pie are remotely controlled based on XBee - Google Patents

Device and method, system, the sensor network of raspberry pie are remotely controlled based on XBee Download PDF

Info

Publication number
CN106097681B
CN106097681B CN201610404221.4A CN201610404221A CN106097681B CN 106097681 B CN106097681 B CN 106097681B CN 201610404221 A CN201610404221 A CN 201610404221A CN 106097681 B CN106097681 B CN 106097681B
Authority
CN
China
Prior art keywords
module
xbee
command process
raspberry pie
host computer
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.)
Expired - Fee Related
Application number
CN201610404221.4A
Other languages
Chinese (zh)
Other versions
CN106097681A (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.)
Shandong Normal University
Original Assignee
Shandong Normal 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 Shandong Normal University filed Critical Shandong Normal University
Priority to CN201610404221.4A priority Critical patent/CN106097681B/en
Publication of CN106097681A publication Critical patent/CN106097681A/en
Application granted granted Critical
Publication of CN106097681B publication Critical patent/CN106097681B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C17/00Arrangements for transmitting signals characterised by the use of a wireless electrical link
    • G08C17/02Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C2201/00Transmission systems of control signals via wireless link
    • G08C2201/40Remote control systems using repeaters, converters, gateways
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C2201/00Transmission systems of control signals via wireless link
    • G08C2201/90Additional features
    • G08C2201/92Universal remote control

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Selective Calling Equipment (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of device and methods that raspberry pie is remotely controlled based on XBee, system, sensor network, and the method comprising the steps of (1): one command process module of program starting module time opening in raspberry pie controller;Step (2): the control instruction that host computer issues successively is sent in the command process module currently opened through the 2nd XBee module and the first XBee module, and command process module executes control instruction after receiving control instruction, obtains implementing result;The command process module currently opened calls the first XBee module that implementing result is transmitted back to host computer, the final long-range control for realizing raspberry pie.

Description

Device and method, system, the sensor network of raspberry pie are remotely controlled based on XBee
Technical field
The invention belongs to far distance control field more particularly to a kind of device that raspberry pie is remotely controlled based on XBee and sides Method, system, sensor network.
Background technique
It becomes more and more popular as scientific and technological level improves and create objective spirit, the application of microcomputer raspberry pie is more and more wider It is general.User largely passes through remote data indicator or cable shares network-control raspberry pie, and small part user passes through no route Raspberry pie is controlled by device or serial ports.Network, wireless router or serial ports are either shared by display, cable and control raspberry Group, is controlled the influence of distance, can not effectively connect Linux terminal when hypertelorism and control raspberry pie, this is very The practical application of raspberry pie is affected in big degree.XBee wireless communication module is mainly used for data penetration transmission, if being able to achieve remote Distance directly controls raspberry pie, then user can smart home system of the far distance control based on raspberry pie, no longer need to make With Internet of Things cloud platform;In industry or agricultural application, raspberry pie is no longer only a unidirectional data collection terminal, raspberry pie It can receive and processing relevant control instructs, greatly reduce the difficulty of mistake investigation.Therefore, realize that remote-wireless controls raspberry pie With very big practical value.
Summary of the invention
In order to solve the disadvantage that the prior art, the present invention provides a kind of device that raspberry pie is remotely controlled based on XBee and side Method, system, sensor network.The remote controlled raspberry pie of device that raspberry pie is remotely controlled based on XBee of the invention is executed Station command, and pass implementing result back control terminal.
To achieve the above object, the invention adopts the following technical scheme:
A kind of device remotely controlling raspberry pie based on XBee, including raspberry pie controller, the first XBee module and second XBee module;The 2nd XBee module is used to receive the control instruction of host computer sending, is sent to tree through the first XBee module The certain kind of berries sends controller;The raspberry pie controller includes several command process modules and program starting module, described program starting Module is used for one command process module of time opening;Described instruction processing module is used to receive the control instruction of host computer sending Afterwards, it executes control instruction and obtains implementing result;
The implementing result that raspberry pie controller is also used to obtain is sent to the 2nd XBee module through the first XBee module, then Implementing result is transmitted back to host computer by the 2nd XBee module, the final long-range control for realizing raspberry pie.
The raspberry pie controller further includes forcing ending module, and the pressure ending module is for terminating occupied rear nothing Method continues to execute the command process module of control instruction.
The first XBee module is set on raspberry pie XBee external expanding plate.
The 2nd XBee module is set in XBee module adapter, and the XBee module adapter and host computer are mutual Communication.
Antenna is mounted in the first XBee module and the 2nd XBee module.
A kind of control method based on the device, comprising the following steps:
Step (1): one command process module of program starting module time opening in raspberry pie controller;
Step (2): the control instruction that host computer issues successively is sent to and works as through the 2nd XBee module and the first XBee module In the command process module of preceding unlatching, command process module executes control instruction after receiving control instruction, obtains implementing result;When The command process module of preceding unlatching calls the first XBee module that implementing result is transmitted back to host computer, final to realize the remote of raspberry pie Process control.
The control method further include: after one command process module of program starting module time opening, instruction processing mould Block call force ending module terminate it is occupied after can not continue to execute the command process module of control instruction.
In the step (2), ending module is forced to obtain the relevant process letter of currently running all instructions processing module Breath, obtains the relevant process ID of command process module.
In the step (2), force ending module according to the relevant process ID of command process module come END instruction processing Process in module.
A kind of tele-control system, including the above-mentioned device for remotely controlling raspberry pie based on XBee.
Wherein, tele-control system include intelligent home appliance remote control system and vehicle remote control apparatus and other The long-range control in field.
In addition, system is applied to sensor network field, can be realized whenever and wherever possible in real time to the control of sensor node.
A kind of sensor network includes: management node, aggregation node and sensor node, wherein management node passes through upper Position machine and the above-mentioned device that raspberry pie is remotely controlled based on XBee control sensor node.
The invention has the benefit that
(1) device proposed by the present invention that raspberry pie is remotely controlled based on XBee, user can be in XBee radio communication molds Raspberry pie is controlled in the effective distance of block, it is outdoor theoretical farthest up to 45 kms, it is indoor farthest up to 610 meters, and energy conservation is low Consumption.Raspberry pie is directly controlled by display, the shared network of cable and serial ports compared to traditional, method of the invention is got rid of The limitation of transmission line;Compared to wireless network control raspberry pie is used, method of the invention extends the distance of control raspberry pie. User can manage raspberry pie at a distance, will more facilitate in use.
(2) present invention can be used in the every field of raspberry pie work, and raspberry pie is used in Internet of Things direction, can remotely manage Internet of things equipment in keeping house;Raspberry pie is used in industry and agriculture direction, is no longer only limitted to acquisition data, also remote controlled The sensor for acquiring data greatly facilitates investigation mistake etc..
Detailed description of the invention
Fig. 1 is that the present invention is based on the structure drawing of device that XBee remotely controls raspberry pie.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.
Theoretical method of the invention, as follows:
Raspberry pie supports XBee wireless communication module data penetration transmission function;User can be using control instruction as data content It is sent in host computer by the 2nd XBee wireless communication module;The first XBee wireless communication module in raspberry pie receives remotely The data content transmitted;Raspberry pie can be executed using the data content received as control instruction in terminal;Raspberry pie can obtain The result that control instruction is executed in terminal;The result can be sent back to second by the first XBee wireless communication module by raspberry pie XBee wireless communication module;The result is issued host computer serial ports by the 2nd XBee wireless communication module;Computer serial port debugging Software shows the result;User's acquisition instruction implementing result.
The technological difficulties that the present invention is broken through according to the theoretical method are as follows: to realize the first XBee wireless communication module Received data content executes in raspberry pie as end command;The end for being read raspberry pie by the 2nd XBee module End instruction execution result passes the first XBee module back;If raspberry pie executes the instruction of certain occupied terminals, raspberry pie will lead to Other end commands that user is sent by XBee communication module can not be executed, need to terminate occupied terminal from outside, To guarantee that the instruction that user sends can be performed at least one terminal simultaneously.
Step 1: remotely controlling the apparatus structure schematic diagram of raspberry pie based on XBee with reference to Fig. 1, hardware includes: raspberry Group, the first XBee wireless communication module, the 2nd XBee wireless communication module, two XBee module antennas, XBee module adapter, Raspberry pie XBee external expanding plate;Raspberry pie should be connected with raspberry pie XBee external expanding plate;First XBee module connects antenna and is placed in tree The certain kind of berries is sent on Xbee external expanding plate;2nd XBee module connects antenna and is connected with XBee module adapter;XBee module adapter with it is upper Position machine is connected;AccessPort software should be installed on the computer being connected with XBee module adapter.
Step 2: operation has command process module in raspberry pie, is placed in raspberry pie XBee external expanding plate with antenna for controlling On the first XBee module, be responsible for receiving computer and transmit instruction, execution and implementing result passed instruction back meter in the terminal Calculation machine.
The detailed process of command process module processing control instruction are as follows: command process module initializes raspberry pie serial ports, adjusts Host computer is passed back by successful result is initialized with the first XBee module;Command process module persistently handles the finger that host computer transmits It enables, host computer is transmitted into instruction and is executed in terminal;Command process module judges whether to call the first XBee module holding instruction Row result passes host computer back;When unappropriated i-th of command process module receives command for stopping, i-th of instruction processing Module will voluntarily terminate.
Step 3: operation has program starting module in raspberry pie, handles mould for opening an instruction at regular intervals Block.The detailed process of the step are as follows: program starting module opens i-th of command process module;Wherein, i is just more than or equal to 1 Integer;User sets reasonable time interval, program starting module time opening i+1 command process module.
Step 4: in raspberry pie operation have pressure ending module, for terminate it is occupied after can not continue to execute end command Command process module.
The detailed process of the step are as follows: after forcing ending module operation, obtain the process that the needs that host computer transmits terminate; It reads raspberry pie system and currently runs all process names, the process name that the needs that matching host computer transmits terminate;Not being matched to needs The process to be terminated then calls the transmission of the first XBee wireless communication module not find progress information to host computer;If being matched to needs The process to be terminated then terminates the process;If terminate process success, call the first XBee wireless communication module send terminate at Function information is to host computer;If the failure of the process of end, calling the first XBee wireless communication module to send terminates failure information to upper Position machine;After the process for terminating occupancy command process module, command process module terminates simultaneously.
Step 5: the raspberry pie power supply connected with reference to Fig. 1, operating system.
Step 6: the opening program starting module in raspberry pie system, program starting module start to continue working, periodically open Dynamic command process module.
Step 7: command process module can receive the 2nd XBee wireless communication module control instruction.
Step 8: command process module can send terminal execution result information by the first XBee wireless communication module.
When the instruction that computer is sent needs long-time occupied terminal, step 9, step 10, step 11 and step can be used Rapid 12 solve the problems, such as, can also enhance fault-tolerance of the invention.
Step 9: command process module receives the end command that computer transmits, and command process module executes the instruction, together When the terminal it is occupied, any other instruction, including halt instruction can not be received.
Step 10: program starting module persistently opens unappropriated command process module within the set time.
Step 11: user calls in unappropriated command process module by computer send instructions and forces knot Beam module terminates previous occupied command process module by force.
Step 12: user sends the instruction set in command process module, bolt down procedure starting module time opening Extra command process module.
A kind of tele-control system, including the above-mentioned device for remotely controlling raspberry pie based on XBee.
Wherein, tele-control system include intelligent home appliance remote control system and vehicle remote control apparatus and other The long-range control in field.
In addition, system is applied to sensor network field, can be realized whenever and wherever possible in real time to the control of sensor node.
A kind of sensor network, including management node, aggregation node and sensor node, wherein management node passes through upper Machine and the above-mentioned device control sensor node that raspberry pie is remotely controlled based on XBee.
A large amount of sensor node random placements, can be by from group close to or within monitoring region (sensor field) The mode of knitting constitutes network.The data of sensor node monitoring are transmitted along other sensors node hop-by-hop, are being transmitted across Monitoring data may be routed to aggregation node by multiple node processings after multi-hop in journey, finally by internet or satellite Reach management node.User is configured and is managed to sensor network by management node, issues monitoring task and collection Monitoring data.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a computer-readable storage medium In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random AccessMemory, RAM) etc..
Above-mentioned, although the foregoing specific embodiments of the present invention is described with reference to the accompanying drawings, not protects model to the present invention The limitation enclosed, those skilled in the art should understand that, based on the technical solutions of the present invention, those skilled in the art are not Need to make the creative labor the various modifications or changes that can be made still within protection scope of the present invention.

Claims (9)

1. a kind of device for remotely controlling raspberry pie based on XBee, which is characterized in that including raspberry pie controller, the first XBee mould Block and the 2nd XBee module;The 2nd XBee module is used to receive the control instruction of host computer sending, through the first XBee module It is sent to raspberry pie controller;The raspberry pie controller includes several command process modules and program starting module, described Program starting module is used for one command process module of time opening;Described instruction processing module is used to receive host computer sending After control instruction, executes control instruction and obtain implementing result;
The implementing result that raspberry pie controller is also used to obtain is sent to the 2nd XBee module through the first XBee module, then by Implementing result is transmitted back to host computer by two XBee modules, the final long-range control for realizing raspberry pie;
The raspberry pie controller further includes forcing ending module, the pressures ending module be used to terminate it is occupied after can not be after The continuous command process module for executing control instruction;
Described instruction processing module initialize raspberry pie serial ports, call the first XBee module will initialize successful result pass back it is upper Machine;Command process module persistently handles the control instruction of host computer sending, and the control instruction that host computer is issued is instructed in terminal It executes;Command process module judges whether that the first XBee module is called to pass the implementing result of control instruction back host computer;When not When occupied i-th of command process module receives command for stopping, i-th of command process module will voluntarily terminate;
After the pressure ending module operation, the process that the needs that host computer transmits terminate is obtained;Raspberry pie controller is read to work as Preceding all process names of operation, the process name that the needs that matching host computer transmits terminate;It is not matched to the process for needing to terminate, then adjusts Do not find progress information to host computer with the transmission of the first XBee module;If being matched to the process for needing to terminate, terminate the process; If the success of the process of end, calling the first XBee module to send terminates successful information to host computer;If the failure of the process of end, is adjusted Being sent with the first XBee module terminates failure information to host computer;After the process for terminating occupancy command process module, instruction processing Module terminates simultaneously;
Or: command process module receives the control instruction that host computer issues, and command process module executes the instruction, while the instruction Processing module is occupied for a long time, can not receive any other instruction;Program starting module is persistently opened within the set time Unappropriated command process module;It is called in unappropriated command process module and forces ending module, it will be previously occupied Command process module terminates by force.
2. a kind of device for remotely controlling raspberry pie based on XBee as described in claim 1, which is characterized in that described first XBee module is set on raspberry pie XBee external expanding plate.
3. a kind of device for remotely controlling raspberry pie based on XBee as described in claim 1, which is characterized in that described second XBee module is set in XBee module adapter, and the XBee module adapter is in communication with each other with host computer.
4. a kind of control method based on device a method according to any one of claims 1-3, which comprises the following steps:
Step (1): one command process module of program starting module time opening in raspberry pie controller;
Step (2): the control instruction that host computer issues successively is sent to and currently opens through the 2nd XBee module and the first XBee module In the command process module opened, command process module executes control instruction after receiving control instruction, obtains implementing result;Currently open The command process module opened calls the first XBee module that implementing result is transmitted back to host computer, the final long-range control for realizing raspberry pie System.
5. control method as claimed in claim 4, which is characterized in that the control method further include: program starting module is fixed After mono- command process module of Shi Kaiqi, command process module call force ending module come terminate it is occupied after can not continue to hold The command process module of row control instruction.
6. control method as claimed in claim 5, which is characterized in that in the step (2), force ending module to obtain current The relevant progress information of all instructions processing module of operation, obtains the relevant process ID of command process module.
7. control method as claimed in claim 6, which is characterized in that in the step (2), force ending module according to instruction The relevant process ID of processing module carrys out the process in END instruction processing module.
8. a kind of tele-control system, which is characterized in that remotely controlled including a method according to any one of claims 1-3 based on XBee The device of raspberry pie.
9. a kind of sensor network, including management node, aggregation node and sensor node, which is characterized in that the management section Point controls sensing by host computer and the device a method according to any one of claims 1-3 for remotely controlling raspberry pie based on XBee Device node.
CN201610404221.4A 2016-06-08 2016-06-08 Device and method, system, the sensor network of raspberry pie are remotely controlled based on XBee Expired - Fee Related CN106097681B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610404221.4A CN106097681B (en) 2016-06-08 2016-06-08 Device and method, system, the sensor network of raspberry pie are remotely controlled based on XBee

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610404221.4A CN106097681B (en) 2016-06-08 2016-06-08 Device and method, system, the sensor network of raspberry pie are remotely controlled based on XBee

Publications (2)

Publication Number Publication Date
CN106097681A CN106097681A (en) 2016-11-09
CN106097681B true CN106097681B (en) 2019-09-24

Family

ID=57228448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610404221.4A Expired - Fee Related CN106097681B (en) 2016-06-08 2016-06-08 Device and method, system, the sensor network of raspberry pie are remotely controlled based on XBee

Country Status (1)

Country Link
CN (1) CN106097681B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108536056A (en) * 2018-03-22 2018-09-14 江苏麦酷博信息科技有限公司 A kind of intelligent industrial internet of things sensors data collecting system and its working method
CN109698866B (en) * 2019-01-11 2022-04-26 科世达(上海)管理有限公司 Intelligent control display system based on raspberry group

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN204288336U (en) * 2014-12-15 2015-04-22 北京农学院 Based on the Household access control system of intelligent mobile terminal
CN204634744U (en) * 2015-05-12 2015-09-16 陈马骏 A kind of Long-distance Control pet grain delivery device
CN204681636U (en) * 2015-05-12 2015-09-30 合肥美诚创新培训学校 A kind of campus illumination intelligence control system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101071523A (en) * 2007-06-11 2007-11-14 黄晖 Long-distance control method, system and terminal for data acquisition monitoring device
WO2014134217A1 (en) * 2013-02-26 2014-09-04 Noland Bryan Lee System and method of automated gunshot emergency response system
CN204305056U (en) * 2014-07-25 2015-04-29 爆米时光科技(深圳)有限公司 Smart Home Almightiness type gateway system
CN204129938U (en) * 2014-09-16 2015-01-28 上海工程技术大学 Based on the information acquisition transmitting device that single-chip microcomputer and raspberry are sent
CN204667140U (en) * 2015-04-10 2015-09-23 南昌航空大学 A kind of intelligent home control device
CN204496238U (en) * 2015-04-14 2015-07-22 吉林大学 A kind of crops low latitude recording geometry

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN204288336U (en) * 2014-12-15 2015-04-22 北京农学院 Based on the Household access control system of intelligent mobile terminal
CN204634744U (en) * 2015-05-12 2015-09-16 陈马骏 A kind of Long-distance Control pet grain delivery device
CN204681636U (en) * 2015-05-12 2015-09-30 合肥美诚创新培训学校 A kind of campus illumination intelligence control system

Also Published As

Publication number Publication date
CN106097681A (en) 2016-11-09

Similar Documents

Publication Publication Date Title
CN102307222B (en) Intelligent greenhouse demonstration measurement and control system based on Internet of things technology
CN107613021A (en) Agriculture Internet of Things information management system based on cloud mode
CN104750008B (en) A kind of agricultural robot wireless remote-control system in ZigBee-network
CN105830870A (en) Remote wireless farmland monitoring system and method
CN103268105A (en) Aquaculture remote-monitoring system based on internet-of-things Android platform
CN105137950A (en) Greenhouse intelligent control system based on Internet of Things technology
CN205455083U (en) Novel intelligence water -saving irrigation automatic control system
CN108961712A (en) A kind of system for realizing wisdom agricultural
CN106097681B (en) Device and method, system, the sensor network of raspberry pie are remotely controlled based on XBee
CN107277155A (en) A kind of remote monitoring crop growth environment platform and its implementation
CN109451454A (en) A kind of vacant lot linkage LoRaWAN communication device and method based on UAV mobile gateway
CN103702413B (en) Real-time following and positioning system of indoor camera based on Zigbee network
CN201118562Y (en) Portable agricultural information intelligent terminal
Grace et al. Wireless sensor based control system in agriculture field
CN204925782U (en) Warmhouse booth intelligence control system based on internet of things
CN103853108A (en) Intelligent management system of greenhouse crops
KR20210149623A (en) VR-based immersive smart farm research system
CN206835124U (en) A kind of Intelligent internet of things gateway
CN107994957A (en) A kind of Wireless Communication Equipment signal small range covering method
CN208225283U (en) Double Network Communication soil moisture content acquisition systems based on LORA and NB-IoT
CN206710926U (en) A kind of floriculture greenhouse monitoring system
CN105022326A (en) Unmanned monitoring greenhouse system based on LABVIEW image processing technology and control method therefor
CN107132785A (en) A kind of agricultural robot wireless remote-control system
CN202979298U (en) Intelligent measurement and control system of greenhouse based on Zigbee Technology
CN109041965A (en) A kind of agricultural irrigation fertilization system based on unmanned plane

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190924

CF01 Termination of patent right due to non-payment of annual fee