WO2021095632A1 - センサシステム、それに用いられるセンサデバイスおよびホスト装置、ならびに、センサシステムにおける情報伝達方法 - Google Patents

センサシステム、それに用いられるセンサデバイスおよびホスト装置、ならびに、センサシステムにおける情報伝達方法 Download PDF

Info

Publication number
WO2021095632A1
WO2021095632A1 PCT/JP2020/041342 JP2020041342W WO2021095632A1 WO 2021095632 A1 WO2021095632 A1 WO 2021095632A1 JP 2020041342 W JP2020041342 W JP 2020041342W WO 2021095632 A1 WO2021095632 A1 WO 2021095632A1
Authority
WO
WIPO (PCT)
Prior art keywords
sensor
host device
information
data format
host
Prior art date
Application number
PCT/JP2020/041342
Other languages
English (en)
French (fr)
Inventor
秀夫 瀬山
Original Assignee
株式会社村田製作所
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 株式会社村田製作所 filed Critical 株式会社村田製作所
Priority to JP2021556054A priority Critical patent/JP7264274B2/ja
Publication of WO2021095632A1 publication Critical patent/WO2021095632A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/12Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C15/00Arrangements characterised by the use of multiplexing for the transmission of a plurality of signals over a common path

Definitions

  • the present disclosure relates to a sensor system, a sensor device and a host device used therein, and an information transmission method in the sensor system.
  • USB Universal Serial Bus
  • a USB (Universal Serial Bus) standard connector may be used as a general-purpose interface for connecting a host device such as a personal computer or a server to various devices (peripheral devices).
  • the USB connection supports plug-and-play, which allows you to connect and disconnect devices without stopping the host device.
  • the data format between the device and the host device is generally different for each device.
  • the process of installing dedicated firmware on the device and / or the control device of the host device and converting the data format to a predetermined format. Is performed.
  • the data format between the device and the host device is different for each device, so each time a new device is connected to the host device, the corresponding firmware is installed on the device side or the host device side. It is necessary to install it in.
  • Patent Document 1 discloses a configuration in which a firmware file is automatically written from the host device to the device when the device is connected to the information processing device (host device).
  • a sensor device that can be connected via USB has been developed as a sensor for detecting environmental conditions such as temperature and humidity.
  • the data format to be transmitted may differ depending on the type of sensor or the manufacturer of the sensor device. In this case, every time a new sensor device is connected to the host device, it is necessary to set the firmware.
  • the present disclosure has been made to solve the above-mentioned problems, and an object of the present invention is to provide a sensor system in which a sensor device is connected to a host device without setting firmware when adding the sensor device. This is to enable the transmission of information between the sensor device and the host device.
  • the sensor system includes a host device and at least one sensor device.
  • a plurality of sensor devices can be connected to the host device.
  • the host device and the sensor device transmit information in a predetermined data format.
  • the predetermined data format is set to a common data format regardless of the type of sensor included in the sensor device connected to the host device.
  • the sensor device can be connected to the host device.
  • the sensor device includes at least one sensor and a processing device that processes information from the at least one sensor.
  • the processing device converts the information from at least one sensor into a predetermined data format and transmits it to the host device.
  • the predetermined data format is set to a common data format regardless of the type of at least one of the sensors.
  • a plurality of sensor devices can be connected to the host device according to still another aspect of the present disclosure.
  • the host device includes a control device that acquires information from the connected sensor device in a predetermined data format.
  • the predetermined data format is set to a common data format regardless of the type of sensor included in the sensor device connected to the host device.
  • a method relates to a method of transmitting information in a sensor system including a host device to which a plurality of sensor devices can be connected and a sensor device connected to the host device.
  • the sensor device includes at least one sensor and a processing device.
  • the method includes a step of acquiring information from at least one of the above sensors, a step of converting the acquired information into a predetermined data format in a processing device, and hosting the information converted into a predetermined data format from the processing device. Includes steps to send to the device.
  • the predetermined data format is set to a common data format regardless of the type of sensor included in the sensor device connected to the host device.
  • the data format between the sensor device and the host device is set to a common format regardless of the type of the sensor device. This eliminates the need to rewrite the firmware in the host device or the sensor device even when different types of sensor devices are connected to the host device. Therefore, when adding a sensor device, it is possible to transmit information between the sensor device and the host device without newly setting firmware.
  • FIG. 1 is an overall configuration diagram of the sensor system 10 according to the present embodiment.
  • the sensor system 10 includes sensor units 20 and 20A (hereinafter, also collectively referred to as “sensor unit 20”) and a server 40.
  • the sensor unit 20 and the server 40 are wirelessly or wiredly connected to a network 30 such as the Internet or a LAN (Local Area Network), and are configured to be able to exchange information with each other via the network 30.
  • a network 30 such as the Internet or a LAN (Local Area Network)
  • the detected values such as the temperature detected by the sensor included in the sensor unit 20 are transmitted to the server 40 via the network 30.
  • the server 40 stores the detected value of the sensor received from the sensor unit 20, and processes the stored detected value as needed. Further, the server 40 transmits the stored detection value to another control device (not shown).
  • the sensor unit 20 includes a sensor device 100 and a host device 200.
  • the sensor device 100 can be connected to the host device 200 using a connector conforming to the USB standard.
  • the sensor device 100 includes at least one sensor, as detailed in FIG.
  • the sensor device 100 transmits the detection value of the built-in sensor to the host device 200.
  • the host device 200 receives the sensor detection value from the sensor device 100.
  • the host device 200 is configured to enable wireless communication such as Wi-Fi, and transmits the detected value of the received sensor to the base station connected to the network 30 by using the wireless communication.
  • the sensor unit 20A is an example of a case where the sensor unit 20A is connected to the network 30 by wire. Further, in the sensor unit 20A, a plurality of sensor devices 100A and 100B are connected to the host device 200A. In the following description, the sensor devices 100, 100A, and 100B are collectively referred to as "sensor device 100". Further, the host devices 200 and 200A are also collectively referred to as "host device 200".
  • the host device does not necessarily have to have a communication function with the outside, and may be, for example, a single device having no communication function.
  • the server 40 also functions as the host device 200.
  • FIG. 2 is a functional block diagram for explaining the details of the sensor unit 20.
  • the sensor unit 20 includes a sensor device 100 and a host device 200.
  • the sensor device 100 includes two sensors 110 and 115, a processing device 120, and a USB connector 130.
  • the types of sensors included in the sensor device 100 include, for example, temperature, humidity, atmospheric pressure, acceleration, angular velocity, illuminance, and environmental sound.
  • Each of the sensors 110 and 115 outputs a signal corresponding to the detected physical quantity to the processing device 120.
  • the case where two sensors 110 and 115 are provided will be described as an example, but the number of sensors included in the sensor device 100 is not limited to this, and one or three. It may be the case that the above-mentioned sensor is provided.
  • the type of the sensor 110 and the type of the sensor 115 may be the same or different.
  • the processing device 120 is configured to include, for example, a CPU (Central Processing Unit), and executes processing according to a program stored in advance.
  • the processing device 120 acquires the detected values detected by the sensors 110 and 115 in accordance with the command from the host device 200, processes the detected values, and outputs the detected values to the host device 200.
  • a CPU Central Processing Unit
  • the processing device 120 includes the sensor firmwares 121 and 122 and the common firmware 125.
  • the sensor firmwares 121 and 122 are software for acquiring information from the sensors 110 and 115, respectively.
  • the sensor firmware converts the signal from the corresponding sensor into a physical quantity to be measured. For example, when the sensor is a temperature sensor, the sensor firmware converts the temperature value corresponding to the voltage signal output from the sensor. Therefore, basically, the firmware for the sensor is different for each corresponding sensor.
  • the common firmware 125 is software for converting the sensor information converted by the firmware for each sensor into a predetermined data format.
  • the data format of the information output from the common firmware 125 is defined to be common among the sensor devices. Therefore, even if the types of sensors included in the sensor device are different, information can be transmitted to and from the host device 200 in a common data format.
  • the data format of the common firmware 125 will be described later with reference to FIG. 7.
  • the processing device 120 of the sensor device 100 not only the physical quantity detected by the sensor alone but also the estimated amount that can be calculated from the physical quantity may be calculated.
  • estimated quantities that can be calculated from physical quantities are the discomfort index calculated from temperature and humidity, or the failure prediction of equipment estimated from acceleration.
  • the USB connector 130 can be connected to the USB connector 210 provided in the host device 200. By connecting the sensor device 100 to the host device 200 using the USB connector 130, information can be transmitted between the sensor device 100 and the host device 200. By connecting the host device 200 and the sensor device 100 using the USB connector, the sensor device 100 can be connected to and disconnected from the host device 200 without stopping the host device 200.
  • the host device 200 includes a plurality of USB connectors 210, a USB hub 220, a processing device 230, and a communication circuit 240.
  • the USB connector 210 is connected to the USB hub 220.
  • the USB hub 220 individually controls each connection port (hereinafter, also referred to as “USB port”) of the plurality of USB connectors 210, and provides information between the sensor device connected to each USB connector and the processing device 230. To convey.
  • the processing device 230 is connected to the network 30 via the communication circuit 240, and transmits information to and from the server 40.
  • the processing device 230 acquires sensor information from the sensor device 100 connected to the designated USB port in accordance with a command from the server 40.
  • the processing device 230 includes common firmware 235 corresponding to the common firmware 125 of the sensor device 100. As a result, the processing device 230 can acquire the sensor information included in the information in the predetermined data format converted in each sensor device.
  • the sensor unit 20A includes two sensor devices 100A, 100B and a host device 200A. Since the host device 200A has the same configuration as the host device 200 in FIG. 2, detailed description will not be repeated.
  • the sensor device 100A includes a sensor 110, a processing device 120A, and a USB connector 130. Further, the sensor device 100B includes a sensor 115, a processing device 120B, and a USB connector 130.
  • the processing device 120A of the sensor device 100A includes the sensor firmware 121 corresponding to the sensor 110 and the common firmware 125.
  • the processing device 120A converts the signal from the sensor 110A into the first data format by the sensor firmware 121 and the common firmware 125, and transmits the information to the host device 200A.
  • the processing device 120B of the sensor device 100B includes the sensor firmware 122 corresponding to the sensor 115 and the common firmware 125.
  • the processing device 120B converts the signal from the sensor 110B into a second data format by the sensor firmware 122 and the common firmware 125, and transmits the information to the host device 200A.
  • the common firmware 125 is software that converts the sensor information from the firmware for each sensor into a common data format. That is, the first data format output from the sensor device 100A and the second data format output from the sensor device 100B are common data formats.
  • the sensor unit of the present embodiment communication is performed between the sensor device and the host device using a common data format regardless of the type of sensor included in the sensor device. As a result, it is possible to correctly acquire information on different types of sensors even if the host device does not have the sensor firmware.
  • FIG. 4 is a functional block diagram of the sensor unit 20 # in the comparative example.
  • the processing device 120 like the sensor unit 20 of the embodiment is not included, and each of the sensors 110 and 115 is a USB connector 130. Is directly connected to. Therefore, the sensor firmwares 231,232 corresponding to each sensor are included in the processing device 230 # of the host device 200 #.
  • the signals detected by the sensor devices 100 # 1 and 100 # 2 are converted into the physical quantity to be measured by the processing device 230 # of the host device 200 #. Therefore, when a sensor device with a built-in new type of sensor is used by connecting it to the host device 200 #, the sensor firmware corresponding to the added sensor is applied to the processing device 230 # of the host device 200 #. Additional installation work is required.
  • the sensor firmware corresponding to each sensor is included in the processing device 120 of the sensor device 100, and the sensor is between the sensor device 100 and the host device 200.
  • Information is transmitted using a common data format that does not depend on the type of. Therefore, even when a sensor device including a new type of sensor is connected to the host device 200, the sensor from the sensor device does not need to install the sensor firmware corresponding to the added sensor on the host device 200 side. Information can be obtained.
  • FIG. 5 is a diagram showing an example of a sensor ID definition list for defining a sensor included in the sensor device 100.
  • the sensor device 100 includes one or more sensors. Therefore, in the host device 200, it is necessary to know the type of the sensor included in the connected sensor device 100.
  • the sensor ID corresponding to the sensor type included in the sensor device 100 is defined.
  • the ID of the temperature sensor is defined as "AA”
  • the ID of the humidity sensor is defined as "BB”
  • the ID of the illuminance sensor is defined as "CC”
  • the ID of the acceleration sensor is defined as "DD”.
  • the ID corresponding to the sensor type is predetermined and is shared between the server 40 and the sensor device 100.
  • the sensor ID is defined as a combination of the above IDs.
  • the sensor ID is defined as "AAAA”.
  • the sensor ID is defined as "AABB”.
  • the sensor ID is defined as "AABBCC”.
  • This sensor ID is transmitted from the sensor device 100 to the host device 200 and the server 40 when the sensor device 100 is connected to the host device 200.
  • the server 40 and the host device 200 store a "sensor ID list" (connection information) in which each port of the host device 200 is associated with the sensor ID of the sensor device 100 connected to the port. From this "sensor ID list", the server 40 and the host device 200 can grasp the type of the sensor included in the sensor device 100 connected to each USB port of the host device 200.
  • the server 40 identifies a sensor for which data should be acquired based on the "sensor ID list” and outputs a command to the corresponding host device 200 to acquire a detection value of a desired sensor.
  • the "sensor ID list" is updated in the server 40 and the host device 200.
  • the sensor ID shown in FIG. 5 is an example, and the sensor ID may be defined in a format other than the above as long as each sensor can be identified.
  • FIG. 6 is an example of a command used for transmitting information between the host device 200 and the sensor device 100.
  • the commands include a "dev" command, a "read” command, a “write” command, an "observing” command, and a "cancel” command.
  • the "dev” command is a command for acquiring the sensor ID of the sensor device 100.
  • the host device 200 detects that the sensor device 100 is connected to the USB port, the host device 200 sends a "dev" command to the sensor device 100.
  • the sensor device 100 receives the "dev" command from the host device 200, the sensor device 100 returns its own sensor ID to the host device 200.
  • the host device 200 updates and stores the sensor ID list based on the received sensor ID, and transmits the updated sensor ID list to the server 40.
  • the "read” command is a command for acquiring the detected value of each sensor in the sensor device 100.
  • the host device 200 transmits a "read” command from the server 40 to the sensor device 100 of the designated port based on the sensor ID list.
  • the "read” command includes the sensor ID.
  • the sensor ID included in the "read” command from the host device 200 matches its own sensor ID, the sensor device 100 returns the detection value of each sensor to the host device 200. For example, when the sensor ID is defined as shown in FIG. 5, when the sensor ID is "AABB", the sensor device 100 returns the data describing the detected values in the order of temperature and humidity to the host device 200.
  • the "write” command is a command for setting (writing) a predetermined value in the designated sensor device 100.
  • the state of the sensor device 100 is changed according to the set value. For example, when controlling the lighting / extinguishing of the LED in the sensor device 100, the host device 200 transmits a “write” command to the target sensor device 100.
  • the LED corresponding to the value set in the "write” command is turned on (or turned off).
  • the "observ” command is a command for periodically notifying the sensor device 100 of the designated port of the detected value.
  • the “cancel” command is a command for stopping the notification of the periodic detection value set by the "observ” command.
  • the sensor device 100 receives the "observ” command from the host device 200, the sensor device 100 sends the detection value of the sensor included in the sensor device 100 to the host device 200 at predetermined interval times until the "cancel” command is received. Send.
  • the sensor device 100 stops periodical notification of the detected value of the sensor.
  • FIG. 7 is a diagram for explaining a data format used in information transmission between the sensor device 100 and the host device 200.
  • FIG. 7A shows the data format used in the common firmware of the present embodiment
  • FIG. 7B shows the data format used in the comparative example.
  • the data formats used in the common firmware include command ID (id), command name (cmd), receiver status (sts), sensor ID (req / res), and The sensor detection value (val) is included.
  • the command ID (id) is information for specifying the command, and is represented by an arbitrary character string such as "0001" or "abcd".
  • the command ID is uniquely set for each command, and the command output from the host device 200 to the sensor device 100 and the response from the sensor device 100 to the command are associated with the command ID.
  • the command name (cmd) is information indicating an instruction from the host device 200 to the sensor device 100, and specifically, the command shown in FIG. 6 is set.
  • the state (sts) on the receiving side is information included in the response of the sensor device 100 to the command from the host device 200, and is information indicating the state of the sensor device 100. For example, in the response to the "dev" command or the "read” command, information indicating that the command from the host device 200 has been correctly received (for example, the character string "ok") is set. If there is an error in the command from the host device 200 (for example, the sensor IDs do not match), the character string "ng" is set. Further, when the sensor device 100 periodically notifies the host device 200 of the sensor detection value in response to the "observ” command, a character string of "notify” indicating that the information is the notification information is set.
  • the sensor ID is information for identifying the target sensor, and specifically, the information of the sensor ID shown in FIG. 5 is set.
  • the channel number of the target sensor may be set in addition to the sensor ID.
  • the sensor device 100 includes a temperature sensor (channel 1) and a temperature sensor (channel 2)
  • the sensor ID "AA” and the channel number "2" are used.
  • a combined character string such as "AA2” is set. Note that “req” is used when a request is made from the host device 200 to the sensor device 100, and “res” is used when a response is made from the sensor device 100 to the host device 200.
  • a sensor device that includes three sensors, two temperature sensors (channel 1, channel 2) and an illuminance sensor, when the string "AA1CC" is set in the "read” command. It indicates that the data of the temperature sensor and the illuminance sensor of channel 1 are requested. If the channel number is not set, it means to acquire the sensor data of all channels.
  • a character string indicating the detection value data corresponding to the sensor specified by the sensor ID (res) is set.
  • the sensor detection value (val) information is indicated by a list of character strings representing the detection value (numerical value), and by combining with the above sensor ID (res) information, the character string is the detection value of which sensor. Can be specified. For example, when the sensor detection value (val) is set to "20.1, 60.3" and the sensor ID (res) is set to "AABBCC12", the temperature sensor detection value is 20.1 ° C. Therefore, it can be specified that the detection value of the humidity sensor is 60.3%.
  • the data format of the embodiment there is only one area (val) for storing the sensor detection value, and the correspondence between the detection value included in the area and the sensor is specified by the sensor ID information. To. As a result, the detected value can be transmitted even if the number of sensors included in the sensor device 100 is 5 or more as long as the range of the character string does not exceed the area for storing the sensor detected value.
  • FIG. 8 is a flowchart in the case of the “dev” command.
  • step 20 hereinafter, step is abbreviated as “S” 20
  • S30 step is abbreviated as “S” 20
  • the sensor device 100 receives the "dev" command from the host device 200 (S30)
  • the sensor device 100 transmits the sensor ID of the sensor device 100 to the host device 100. Reply to 200 (S32).
  • the host device 200 When the host device 200 acquires the sensor ID from the sensor device 100 (S24), the host device 200 creates a sensor ID list based on the acquired sensor ID in S26.
  • the sensor ID list In the sensor ID list, the USB port to which the sensor device 100 is connected is associated with the sensor ID.
  • the sensor ID list may also include information about sensor devices connected to other USB ports of the host device 200.
  • the host device 200 transmits the created sensor ID list and the information of the connected USB port to the server 40 in S28.
  • the server 40 receives the sensor ID list from the host device 200, the server 40 updates the existing sensor ID list.
  • the sensor ID list in the server 40 may include information on host devices other than the host device 200 capable of communicating with the server 40.
  • the sensor ID for the corresponding USB port is deleted from the sensor ID list stored in the host device. It is transmitted to the server 40.
  • the server By controlling the server, the host device, and the sensor device according to the above processing, when the sensor device is newly connected to the host device, the information of the sensor device is acquired by using the "dev" command. be able to. As a result, the host device and the server can recognize the sensor included in the connected sensor device.
  • FIG. 9 is a flowchart in the case of the “read” command.
  • the server 40 reads the detection value of the sensor included in the sensor device 100, the target USB to the target host device 200 according to the sensor ID list stored in the server 40. Specify the port and send the "read” command (S40).
  • the host device 200 When the host device 200 receives the "read” command transmitted from the server 40 (S50), the host device 200 transfers the received "read” command to the sensor device 100 connected to the designated USB port (S52). ..
  • the sensor device 100 When the sensor device 100 receives the "read” command transferred from the host device 200 (S60), the sensor device 100 acquires the detected value of the target sensor according to the sensor ID described in the command (S62). Then, in S64, the sensor device 100 edits the information to be returned in the common firmware 125 according to the common data format described with reference to FIG. 7 (S64). After that, the edited data is transmitted to the host device 200 (S66).
  • the host device 200 receives the data including the detection value of the sensor transmitted from the sensor device 100, adds the USB port information to the data, and transmits the data to the server 40 (S54).
  • the server 40 receives the data transmitted from the sensor device 100 in S42.
  • the server 40 extracts and stores the detection value of the desired sensor from the received data.
  • the server 40 displays the stored detection value on a display device (not shown) or further transmits the stored detection value to another control device.
  • the server can acquire the detection value of the desired sensor.
  • FIG. 10 is a flowchart in the case of the “write” command.
  • the server 40 turns on the LED or writes the specific data to the specific sensor device 100
  • the server 40 “writes” to the host device 200 according to the sensor ID list.
  • Send a command S70
  • the server 40 specifies the target USB port in the host device 200.
  • the host device 200 When the host device 200 receives the "write” command from the server 40 (S80), the host device 200 transfers the received "write” command to the sensor device 100 connected to the designated USB port (S82).
  • the sensor device 100 When the sensor device 100 receives the "write" command transferred from the host device 200 (S90), the sensor device 100 writes the specified data to the target sensor according to the sensor ID described in the command (S92).
  • data can be written from the server to the desired sensor.
  • FIG. 11 is a flowchart in the case of the “observing” command and the “cancel” command.
  • the server 40 when the server 40 periodically acquires the detection value of a specific sensor, the server 40 issues an "observe" command to the target host device 200 according to the sensor ID list stored in the server 40. Transmit (S100). At this time, the server 40 specifies the target USB port in the host device 200.
  • the host device 200 When the host device 200 receives the "observ” command from the server 40 (S200), the host device 200 transfers the received "observ” command to the sensor device 100 connected to the designated USB port (S210).
  • the sensor device 100 When the sensor device 100 receives the "observ" command transferred from the host device 200 (S300), the sensor device 100 acquires the detected value of the target sensor according to the sensor ID described in the command (S310). Then, in S320, the sensor device 100 edits the information to be returned in the common firmware 125 according to the common data format (S320). After that, the edited data is transmitted to the host device 200 (S330).
  • the host device 200 receives the sensor information transmitted from the sensor device 100, further adds the USB port information to the data, and transmits it to the server 40 (S220).
  • the server 40 receives and stores the data transmitted from the sensor device 100 (S110).
  • the server 40 determines whether or not the user has instructed the corresponding sensor to stop periodically reading the sensor detection value (that is, whether or not there is a cancel instruction). If there is no cancellation instruction from the user (NO in S120), the process is returned to S110, and the server 40 continues to receive / store the sensor information periodically notified from the host device 200.
  • the sensor device 100 proceeds to S340 and determines whether or not the "cancel" command has been received from the server 40 via the host device 200. If the "cancel" command transmitted from the server 40 has not been received (NO in S340), the process proceeds to S350, and the sensor device 100 then determines whether or not a predetermined interval time has elapsed. To judge.
  • the process is returned to S340 to determine whether or not the "cancel" command has been received, and wait for the predetermined interval time to elapse. Then, when the predetermined interval time elapses (YES in S350), the process is returned to S310, and the sensor device 100 acquires the detected value of the designated sensor and edits it into a common data format (S320). ), The sensor information is transmitted to the host device 200 (S330). That is, in the state where the "cancel" command is not received, the sensor device 100 acquires the detection value of the specified sensor every time a predetermined interval time elapses, and the acquired sensor information is used in a common data format. To send to the host device 200.
  • the host device 200 When the host device 200 receives the "cancel" command from the server 40 (S230), the host device 200 transfers the received "cancel” command to the sensor device of the designated USB port (S240).
  • step S350 is skipped and the process ends. As a result, the periodic notification of the sensor information from the sensor device 100 is stopped.
  • the server and the host device can periodically acquire the sensor information from the desired sensor.
  • USB type-A connector conforming to the USB standard
  • the connector is not limited to this, and other types (type-B, C, or mini / micro) USB connectors may be used, or connectors other than the USB connector may be used.
  • 10 sensor system 20, 20A sensor unit, 30 network, 40 server, 100, 100A, 100B sensor device, 110, 115 sensor, 120, 230 processing device, 121, 122, 231,232 sensor firmware, 125, 235 common Firmware, 130, 210 USB connector, 200, 200A host device, 220 USB hub, 240 communication circuit.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Arrangements For Transmission Of Measured Signals (AREA)

Abstract

センサシステム(10)は、少なくとも1つのセンサデバイス(100)と、ホスト装置(200)とを備える。ホスト装置(200)には、複数のセンサデバイス(100)が接続可能である。ホスト装置(200)とセンサデバイス(100)とは、所定のデータ形式で情報の伝達を行なう。当該所定のデータ形式は、ホスト装置(200)に接続されるセンサデバイス(100)に含まれるセンサの種類にかかわらず共通の形式に設定される。これにより、センサデバイス(100)を追加した際に、ファームウェアを設定することなくセンサデバイス(100)とホスト装置(200)との間の情報の伝達が可能となる。

Description

センサシステム、それに用いられるセンサデバイスおよびホスト装置、ならびに、センサシステムにおける情報伝達方法
 本開示は、センサシステム、それに用いられるセンサデバイスおよびホスト装置、ならびに、センサシステムにおける情報伝達方法に関する。
 パソコンあるいはサーバなどのホスト装置と、各種デバイス(周辺機器)とを接続するための汎用インターフェースとして、USB(Universal Serial Bus)規格のコネクタが用いられる場合がある。USB接続は、ホスト装置を停止することなくデバイスの接続および取り外しが可能なプラグアンドプレイに対応している。
 USBを用いた情報伝達において、デバイスとホスト装置との間のデータ形式は、一般的にはデバイス毎に異なる。このようなシステムにおいては、デバイスとホスト装置との間でデータを正しく伝達するために、デバイスおよび/またはホスト装置の制御装置に専用のファームウェアをインストールし、データ形式を所定のフォーマットに変換する処理が行なわれる。上記のように、デバイスとホスト装置との間のデータ形式はデバイス毎に異なるため、新しいデバイスがホスト装置に接続された場合には、その度に、対応するファームウェアを、デバイス側あるいはホスト装置側にインストールすることが必要となる。
 特開2006-323612号公報(特許文献1)においては、情報処理装置(ホスト装置)へのデバイスの接続時に、ホスト装置からデバイスにファームウェアファイルを自動的に書き込む構成が開示されている。
特開2006-323612号公報
 近年、温度あるいは湿度などの環境状態を検出するためのセンサとして、USB接続が可能なセンサデバイスが開発されている。このようなセンサデバイスにおいては、センサの種類あるいはセンサデバイスのメーカ毎に、伝達されるデータ形式が異なる場合がある。この場合、新たなセンサデバイスをホスト装置に接続する度に、ファームウェアの設定が必要となる。
 本開示は、上記のような課題を解決するためになされたものであって、その目的は、ホスト装置にセンサデバイスが接続されたセンサシステムにおいて、センサデバイスの追加時に、ファームウェアを設定することなくセンサデバイスとホスト装置との間の情報の伝達を可能とすることである。
 本開示のある局面に係るセンサシステムは、ホスト装置と、少なくとも1つのセンサデバイスとを備える。ホスト装置には、複数のセンサデバイスが接続可能である。ホスト装置とセンサデバイスとは、所定のデータ形式で情報の伝達を行なう。当該所定のデータ形式は、ホスト装置に接続されるセンサデバイスに含まれるセンサの種類にかかわらず共通のデータ形式に設定される。
 本開示の他の局面に係るセンサデバイスは、ホスト装置に接続可能である。センサデバイスは、少なくとも1つのセンサと、当該少なくとも1つのセンサからの情報を処理する処理装置とを備える。処理装置は、少なくとも1つのセンサからの情報を所定のデータ形式に変換してホスト装置に送信する。当該所定のデータ形式は、上記少なくとも1つのセンサの種類にかかわらず共通のデータ形式に設定される。
 本開示のさらに他の局面に係るホスト装置は、複数のセンサデバイスが接続可能である。ホスト装置は、接続されたセンサデバイスからの情報を所定のデータ形式で取得する制御装置を備える。当該所定のデータ形式は、ホスト装置に接続されるセンサデバイスに含まれるセンサの種類にかかわらず共通のデータ形式に設定される。
 本開示のさらに他の局面に係る方法は、複数のセンサデバイスが接続可能なホスト装置と、ホスト装置に接続されたセンサデバイスとを含むセンサシステムにおいて情報を伝達する方法に関する。センサデバイスは、少なくとも1つのセンサと、処理装置とを含む。当該方法は、上記少なくとも1つのセンサからの情報を取得するステップと、取得された情報を処理装置において所定のデータ形式に変換するステップと、所定のデータ形式に変換された情報を処理装置からホスト装置に送信するステップとを含む。所定のデータ形式は、ホスト装置に接続されるセンサデバイスに含まれるセンサの種類にかかわらず共通のデータ形式に設定される。
 本開示に従うセンサシステムにおいては、センサデバイスとホスト装置との間のデータ形式が、センサデバイスの種類にかかわらず共通の形式に設定される。これにより、異なる種類のセンサデバイスがホスト装置に接続された場合であっても、ホスト装置、あるいはセンサデバイス内のファームウェアを書き換える必要がなくなる。したがって、センサデバイスの追加時に、新たにファームウェアを設定することなくセンサデバイスとホスト装置との間の情報の伝達を可能とすることができる。
本実施の形態に係るセンサシステムの全体構成図である。 図1におけるセンサユニット20の機能ブロック図である。 図1におけるセンサユニット20Aの機能ブロック図である。 比較例におけるセンサユニットの機能ブロック図である。 センサID定義リストの一例を示す図である。 情報伝達において用いられるコマンドの一例である。 ホスト装置とセンサデバイスとの間の情報伝達で用いられるデータフォーマットを説明するための図である。 devコマンドの処理を説明するためのフローチャートである。 readコマンドの処理を説明するためのフローチャートである。 writeコマンドの処理を説明するためのフローチャートである。 observe/cancelコマンドの処理を説明するためのフローチャートである。
 以下、本開示の実施の形態について、図面を参照しながら詳細に説明する。なお、図中同一または相当部分には同一符号を付してその説明は繰り返さない。
 [センサステムの全体構成]
 図1は、本実施の形態に従うセンサシステム10の全体構成図である。センサシステム10は、センサユニット20,20A(以下、包括的に「センサユニット20」とも称する。)と、サーバ40とを備える。センサユニット20およびサーバ40は、インターネットあるいはLAN(Local Area Network)のようなネットワーク30に無線あるいは有線で接続されており、当該ネットワーク30を介して互いに情報の授受が可能に構成されている。
 センサシステム10においては、概略的には、センサユニット20に含まれるセンサで検出された温度等の検出値がネットワーク30を介してサーバ40に送信される。サーバ40は、センサユニット20から受けたセンサの検出値を記憶するとともに、必要に応じて記憶された検出値を処理する。また、サーバ40は、記憶された検出値を図示しない他の制御装置へ送信する。
 センサユニット20は、センサデバイス100と、ホスト装置200とを含む。センサデバイス100は、USB規格に準拠したコネクタを用いてホスト装置200に接続することが可能である。センサデバイス100は、図2で詳述するように、少なくとも1つのセンサを含んでいる。センサデバイス100は、内蔵されたセンサの検出値をホスト装置200へ送信する。
 ホスト装置200は、センサデバイス100からのセンサの検出値を受ける。ホスト装置200は、たとえばWi-Fiのような無線通信が可能に構成されており、受信したセンサの検出値を当該無線通信を用いて、ネットワーク30に接続された基地局に送信する。
 センサユニット20Aは、ネットワーク30と有線で接続される場合の例である。また、センサユニット20Aにおいては、複数のセンサデバイス100A,100Bがホスト装置200Aに接続されている。以降の説明において、センサデバイス100,100A,100Bを包括して「センサデバイス100」とも称する。また、ホスト装置200,200Aを包括して「ホスト装置200」とも称する。
 なお、ホスト装置は必ずしも外部との通信機能を有している必要はなく、たとえば、通信機能のない単独の機器であってもよい。また、センサデバイス100がサーバ40に直接接続される場合には、サーバ40がホスト装置200の機能を兼用する。
 [センサユニットの構成]
 (1)センサユニット20
 図2は、センサユニット20の詳細を説明するための機能ブロック図である。図2を参照して、上述のように、センサユニット20は、センサデバイス100と、ホスト装置200とを含む。
 (センサデバイス)
 センサデバイス100は、2つのセンサ110,115と、処理装置120と、USBコネクタ130とを含む。
 センサデバイス100に含まれるセンサの種類としては、たとえば、温度、湿度、気圧、加速度、角速度、照度、あるいは環境音などが含まれる。センサ110,115の各々は、検出した物理量に対応する信号を処理装置120に出力する。なお、本実施の形態のセンサデバイス100においては、2つのセンサ110,115が設けられる場合を例として説明するが、センサデバイス100に含まれるセンサの数はこれに限られず、1つあるいは3つ以上のセンサが設けられる場合であってもよい。センサ110の種類とセンサ115の種類は同じであってもよいし、異なっていてもよい。
 処理装置120は、たとえばCPU(Central Processing Unit)を含んで構成されており、予め記憶されたプログラムに従って処理を実行する。処理装置120は、ホスト装置200からの指令に従って、センサ110,115で検出された検出値を取得し、当該検出値を処理してホスト装置200へ出力する。
 処理装置120は、センサ用ファームウェア121,122、および共通ファームウェア125を含む。センサ用ファームウェア121,122は、それぞれセンサ110,115からの情報を取得するためのソフトウェアである。センサ用ファームウェアは、対応するセンサからの信号を、測定対象の物理量に変換する。たとえば、センサが温度センサである場合、センサ用ファームウェアは、センサから出力される電圧信号に対応した温度の値に変換する。したがって、基本的には、センサ用ファームウェアは対応するセンサ毎に異なる。
 共通ファームウェア125は、各センサ用ファームウェアによって変換されたセンサ情報を、所定のデータ形式に変換するためのソフトウェアである。共通ファームウェア125から出力される情報のデータ形式は、センサデバイス間で共通となるように規定されている。したがって、センサデバイスに含まれるセンサの種類が異なっていても、共通のデータ形式でホスト装置200との間で情報を伝達することができる。共通ファームウェア125におけるデータ形式については、図7を用いて後述する。
 なお、センサデバイス100の処理装置120においては、センサ単体で検出される物理量だけでなく、当該物理量から算出可能な推測量を演算してもよい。物理量から算出可能な推測量の例は、温度と湿度とから演算される不快指数、あるいは、加速度から推測される機器の故障予測などである。
 USBコネクタ130は、ホスト装置200に設けられたUSBコネクタ210に接続することができる。USBコネクタ130を用いて、センサデバイス100をホスト装置200に接続することによって、センサデバイス100とホスト装置200との間の情報の伝達が可能になる。USBコネクタを用いてホスト装置200とセンサデバイス100とを接続することによって、ホスト装置200を停止することなく、ホスト装置200へのセンサデバイス100の接続および取り外しが可能となる。
 (ホスト装置)
 ホスト装置200は、複数のUSBコネクタ210と、USBハブ220と、処理装置230と、通信回路240とを含む。USBコネクタ210は、USBハブ220に接続されている。USBハブ220は、複数のUSBコネクタ210の各接続ポート(以下、「USBポート」とも称する。)を個別に制御して、各USBコネクタに接続されたセンサデバイスと処理装置230との間で情報を伝達する。
 処理装置230は、通信回路240を介してネットワーク30と接続され、サーバ40との間で情報を伝達する。処理装置230は、サーバ40からの指令に従って、指定されたUSBポートに接続されたセンサデバイス100から、センサの情報を取得する。処理装置230は、センサデバイス100の共通ファームウェア125に対応した共通ファームウェア235を含んでいる。これにより、処理装置230は、各センサデバイスにおいて変換された所定のデータ形式の情報に含まれるセンサ情報を取得することができる。
 (2)センサユニット20A
 図3を用いて、ホスト装置の異なるUSBポートの各々にセンサデバイスが接続されるセンサユニット20Aの例について説明する。図3を参照して、センサユニット20Aは、2つのセンサデバイス100A,100Bと、ホスト装置200Aとを含む。なお、ホスト装置200Aは、図2におけるホスト装置200と同じ構成を有しているため、詳細な説明は繰り返さない。
 センサデバイス100Aは、センサ110と、処理装置120Aと、USBコネクタ130とを含む。また、センサデバイス100Bは、センサ115と、処理装置120Bと、USBコネクタ130とを含む。
 センサデバイス100Aの処理装置120Aは、センサ110に対応したセンサ用ファームウェア121と、共通ファームウェア125とを含む。処理装置120Aは、センサ110Aからの信号を、センサ用ファームウェア121および共通ファームウェア125により第1データ形式に変換して、ホスト装置200Aに情報を伝達する。
 センサデバイス100Bの処理装置120Bは、センサ115に対応したセンサ用ファームウェア122と、共通ファームウェア125とを含む。処理装置120Bは、センサ110Bからの信号を、センサ用ファームウェア122および共通ファームウェア125により第2データ形式に変換して、ホスト装置200Aに情報を伝達する。
 上述のように、共通ファームウェア125は、各センサ用ファームウェアからのセンサ情報を共通のデータ形式に変換するソフトウェアである。すなわち、センサデバイス100Aから出力される第1データ形式と、センサデバイス100Bから出力される第2データ形式とは、共通のデータ形式である。
 このように、本実施の形態のセンサユニットにおいては、センサデバイスに含まれるセンサの種類にかかわらず共通のデータ形式を用いて、センサデバイスとホスト装置との間で通信が行なわれる。これにより、ホスト装置側にセンサ用ファームウェアを有していなくても、異なる種類のセンサの情報を正しく取得することができる。
 なお、ホスト装置200とサーバ40との間についても、共通ファームウェアで用いられるデータ形式で情報が伝達される。
 (比較例との対比)
 図4は、比較例におけるセンサユニット20#の機能ブロック図である。比較例のセンサユニット20#のセンサデバイス100#1,100#2においては、実施の形態のセンサユニット20のような処理装置120が含まれておらず、センサ110,115の各々がUSBコネクタ130に直接接続されている。そのため、各センサに対応するセンサ用ファームウェア231,232は、ホスト装置200#の処理装置230#に含まれている。
 比較例のセンサユニット20#においては、各センサデバイス100#1,100#2で検出された信号は、ホスト装置200#の処理装置230#で測定対象の物理量に変換される。そのため、新たな種類のセンサが内蔵されたセンサデバイスをホスト装置200#に接続して使用する場合には、追加されるセンサに対応するセンサ用ファームウェアを、ホスト装置200#の処理装置230#に追加的にインストールする作業が必要となる。
 一方で、本実施の形態のセンサユニット20においては、各センサに対応したセンサ用ファームウェアは、センサデバイス100の処理装置120に含まれており、センサデバイス100とホスト装置200との間は、センサの種類に依存しない共通のデータ形式を用いて情報が伝達される。そのため、新たな種類のセンサを含むセンサデバイスがホスト装置200に接続された場合であっても、追加されるセンサに対応したセンサ用ファームウェアをホスト装置200側にインストールすることなく、センサデバイスからセンサ情報を取得することができる。
 [通信プロトコル]
 次に、図5~図7を用いて、共通ファームウェアを用いたデータ形式による通信プロトコルについて説明する。
 (センサID)
 図5は、センサデバイス100に含まれるセンサを定義するためのセンサID定義リストの一例を示す図である。上述のように、センサデバイス100には、1つ以上のセンサが含まれている。そのため、ホスト装置200においては、接続されたセンサデバイス100に含まれるセンサの種類を知る必要がある。
 図5の例においては、センサデバイス100に含まれるセンサタイプに応じたセンサIDが定義されている。たとえば、図5の例では、温度センサのIDは「AA」、湿度センサのIDは「BB」、照度センサのIDは「CC」、加速度センサのIDは「DD」のように定義される。センサタイプに対応するIDは、予め定められており、サーバ40、およびセンサデバイス100間で共有されている。
 また、センサデバイス100に複数のセンサが含まれる場合には、上記のIDの組み合わせとしてセンサIDが定義される。たとえば、2つの温度センサを含むセンサデバイスの場合には、センサIDは「AAAA」と定義される。温度センサと湿度センサとを含むセンサデバイスの場合には、センサIDは「AABB」と定義される。さらに、温度センサと湿度センサと照度センサの3つのセンサを含むセンサデバイスの場合には、センサIDは「AABBCC」と定義される。
 このセンサIDは、センサデバイス100がホスト装置200に接続された際に、センサデバイス100からホスト装置200およびサーバ40に伝達される。サーバ40およびホスト装置200は、ホスト装置200の各ポートと、それに接続されているセンサデバイス100のセンサIDとを関連付けた「センサIDリスト」(接続情報)を記憶する。この「センサIDリスト」によって、サーバ40およびホスト装置200は、当該ホスト装置200の各USBポートに接続されたセンサデバイス100に含まれるセンサの種類を把握することができる。サーバ40は、当該「センサIDリスト」に基づいて、データを取得すべきセンサを特定し、対応するホスト装置200に指令を出力することによって、所望のセンサの検出値を取得する。
 センサデバイス100がホスト装置200に新たに接続された場合、および、センサデバイスがホスト装置200から取り外された場合には、サーバ40およびホスト装置200において「センサIDリスト」が更新される。
 なお、図5で示したセンサIDは一例であり、個々のセンサを識別できれば、上記以外の形式でセンサIDを定義してもよい。
 (コマンド)
 図6は、ホスト装置200とセンサデバイス100との間の情報伝達で用いられる指令(コマンド)の一例である。本実施の形態においては、コマンドとして、「dev」コマンド、「read」コマンド、「write」コマンド、「observe」コマンド、および「cancel」コマンドが含まれる。
 「dev」コマンドは、センサデバイス100のセンサIDを取得するためのコマンドである。ホスト装置200において、USBポートにセンサデバイス100が接続されたことが検出されると、ホスト装置200は当該センサデバイス100に対して「dev」コマンドを送信する。センサデバイス100は、ホスト装置200からの「dev」コマンドを受信すると、自身のセンサIDをホスト装置200へ返信する。ホスト装置200は、受信したセンサIDに基づいてセンサIDリストを更新して記憶するとともに、更新したセンサIDリストをサーバ40へ送信する。
 「read」コマンドは、センサデバイス100における各センサの検出値を取得するためのコマンドである。ホスト装置200は、センサIDリストに基づいて、サーバ40から指定されたポートのセンサデバイス100に対して「read」コマンドを送信する。「read」コマンドには、センサIDが含まれている。センサデバイス100は、ホスト装置200からの「read」コマンドに含まれるセンサIDが自身のセンサIDと一致した場合には、各センサの検出値をホスト装置200へ返信する。たとえば、図5のようにセンサIDが定義される場合、センサIDが「AABB」のときには、センサデバイス100は、温度、湿度の順で検出値を記述したデータをホスト装置200へ返信する。
 「write」コマンドは、指定されたセンサデバイス100に所定の値を設定する(書き込む)ためのコマンドである。センサデバイス100においては、設定された値に応じてセンサデバイス100の状態を変化させる。たとえば、センサデバイス100におけるLEDの点灯/消灯を制御するような場合に、ホスト装置200は、対象のセンサデバイス100に対して「write」コマンドを送信する。センサデバイス100においては、「write」コマンドに設定された値に対応するLEDを点灯(あるいは消灯)させる。
 「observe」コマンドは、指定されたポートのセンサデバイス100に対して、定期的に検出値を通知させるためのコマンドである。また、「cancel」コマンドは、「observe」コマンドで設定した定期的な検出値の通知を停止させるためのコマンドである。センサデバイス100は、ホスト装置200から「observe」コマンドを受信すると、「cancel」コマンドを受信するまで、予め定められたインターバル時間毎に、センサデバイス100に含まれるセンサの検出値をホスト装置200へ送信する。センサデバイス100は、「cancel」コマンドを受信すると、センサの検出値の定期的な通知を停止する。
 (データフォーマット)
 図7は、センサデバイス100とホスト装置200との間の情報伝達で用いられるデータフォーマットを説明するための図である。図7(a)は、本実施の形態の共通ファームウェアで用いられるデータフォーマットを示しており、図7(b)は比較例で用いられるデータフォーマットを示している。
 図7(a)を参照して、共通ファームウェアで用いられるデータフォーマットには、コマンドID(id)、コマンド名(cmd)、受信側の状態(sts)、センサID(req/res)、および、センサ検出値(val)が含まれる。
 コマンドID(id)は、コマンドを特定するための情報であり、たとえば、「0001」,「abcd」などの任意の文字列で表現される。コマンドIDは各コマンドに対してユニークに設定され、ホスト装置200からセンサデバイス100に出力されるコマンドと、それに対するセンサデバイス100からの応答が、当該コマンドIDにより紐付けられる。
 コマンド名(cmd)は、ホスト装置200からセンサデバイス100に対する指示を示す情報であり、具体的には図6で示したコマンドが設定される。
 受信側の状態(sts)は、ホスト装置200からの指令に対するセンサデバイス100の応答に含まれる情報であり、センサデバイス100の状態を示す情報である。たとえば、「dev」コマンドまたは「read」コマンドに対する応答においては、ホスト装置200からの指令が正しく受信できたことを示す情報(たとえば、「ok」の文字列)が設定される。なお、ホスト装置200からの指令に誤りがあるような場合(たとえば、センサIDの不一致)には、「ng」の文字列が設定される。また、「observe」コマンドに対して、センサデバイス100からホスト装置200へ定期的にセンサ検出値を通知する場合には、通知情報であることを示す「notify」の文字列が設定される。
 センサID(req/res)は、対象となるセンサを特定するための情報であり、具体的には、図5で示したセンサIDの情報が設定される。また、センサデバイス100に同一のセンサIDを有する複数のセンサが含まれる場合には、センサIDに加えて、対象となるセンサのチャンネル番号が設定されてもよい。たとえば、センサデバイス100に温度センサ(チャンネル1)と温度センサ(チャンネル2)が含まれる場合に、チャンネル2の温度センサの値を取得したいときには、センサIDの「AA」とチャンネル番号「2」を組み合わせた「AA2」のような文字列が設定される。なお、「req」はホスト装置200からセンサデバイス100に対する要求の際に使用され、「res」はセンサデバイス100からホスト装置200への応答の際に使用される。
 別の例として、「read」コマンドにおいて、「AA1CC」の文字列が設定された場合には、2つの温度センサ(チャンネル1,チャンネル2)と照度センサの3つのセンサが含まれるセンサデバイスにおいて、チャンネル1の温度センサおよび照度センサのデータを要求していることを示している。チャンネル番号が設定されていない場合には、すべてのチャンネルのセンサのデータを取得することを意味する。
 センサ検出値(val)には、センサID(res)で指定されたセンサに対応する検出値のデータを示す文字列が設定される。センサ検出値(val)の情報は、検出値(数値)を表わす文字列の羅列で示されるが、上記のセンサID(res)の情報と組み合わせることによって、当該文字列が、どのセンサの検出値を示しているかを特定することができる。たとえば、センサ検出値(val)に「20.1,60.3」が設定され、センサID(res)に「AABBCC12」が設定されている場合には、温度センサの検出値が20.1℃であり、湿度センサの検出値が60.3%であると特定することができる。
 一方、図7(b)の比較例におけるデータフォーマットにおいては、コマンドID(id)、コマンド名(cmd)、および受信側の状態(sts)の情報に加えて、センサ検出値を格納する領域として(val1)~(val4)が設定されている。すなわち、比較例のデータフォーマットにおいては、伝達可能なセンサ検出値の数が限定されている。そのため、たとえば、5つのセンサを含むセンサデバイス100が接続された場合には、すべてのセンサの検出値を伝達することができない。
 これに対して、実施の形態のデータフォーマットにおいては、センサ検出値を格納する領域(val)は1つであり、当該領域に含まれる検出値とセンサとの対応はセンサIDの情報で指定される。これにより、センサ検出値を格納する領域を超えない文字列の範囲であれば、センサデバイス100に含まれるセンサの数が5以上であっても、検出値を伝達することが可能となる。
 以下に、ホスト装置200からの「read」コマンドと、それに対するセンサデバイス100の応答の例を示す。なお、各行の「セミコロン(;)」よりも右側の記載は、各行の内容の説明である。
 <ホスト装置からの指令>
 {
   ”id”:”0001”,  ;コマンドID「0001」
   ”cmd”:”read”,  ;コマンド名「read」(読出し)
   ”req”:”AABB”  ;センサID「AABB」(温度+湿度)
 }
<センサデバイスからの応答>
 {
   ”id”:”0001”,    ;コマンドID「0001」
   ”sts”:”ok”,     ;受信側情報「ok」(正常受信)
   ”res”:”AABB”,    ;センサID「AABB」(温度+湿度)
   ”val”:”20.1, 60.3” ;検出値「20.1℃,60.3%」
 }
 また、以下に、ホスト装置200からの「observe」コマンドに対する、センサデバイス100からの定期的な検出値の通知の例を示す。
 <センサデバイスからの通知>
 {
   ”sts”:”notify”, ;受信側状態「notify」(通知)
   ”res”:”AABB1”,  ;センサID「AABB1」(温度+湿度,温度のみ)
   ”val”:”27.2”   ;検出値「27.2℃」
 }
 [各コマンドにおける処理]
 図8~図11を用いて、各コマンドにおいて、サーバ40、センサデバイス100、およびホスト装置200で実行される処理の詳細について説明する。
 (devコマンド)
 図8は、「dev」コマンドの場合のフローチャートである。図8を参照して、ホスト装置200は、ステップ(以下、ステップを「S」と略す。)20にて、USBポートにセンサデバイス100が接続されたことを検出すると、S22にて、接続されたセンサデバイス100に対して「dev]コマンドを送信する。センサデバイス100は、ホスト装置200から「dev」コマンドを受信すると(S30)、それに応答して、当該センサデバイス100のセンサIDをホスト装置200へ返信する(S32)。
 ホスト装置200は、センサデバイス100からセンサIDを取得すると(S24)、S26にて、取得したセンサIDに基づいて、センサIDリストを作成する。センサIDリストにおいては、センサデバイス100が接続されたUSBポートとセンサIDとが関連付けられる。なお、センサIDリストには、ホスト装置200の他のUSBポートに接続されたセンサデバイスについての情報も含まれ得る。
 その後、ホスト装置200は、S28にて、作成したセンサIDリストと接続されたUSBポートの情報とをサーバ40へ送信する。サーバ40においては、ホスト装置200からセンサIDリストを受信すると、既存のセンサIDリストを更新する。なお、サーバ40におけるセンサIDリストには、サーバ40と通信可能なホスト装置200以外のホスト装置の情報も含まれ得る。
 なお、図8には示されていないが、ホスト装置からセンサデバイスが取り外された場合には、ホスト装置に記憶されているセンサIDリストから、該当するUSBポートについてのセンサIDが削除されて、サーバ40へ送信される。
 以上のような処理に従って、サーバ、ホスト装置、およびセンサデバイスが制御されることによって、ホスト装置にセンサデバイスが新たに接続された場合に、「dev」コマンドを用いてセンサデバイスの情報を取得することができる。これにより、ホスト装置およびサーバにおいて、接続されたセンサデバイスに含まれるセンサを認識することができる。
 (readコマンド)
 図9は、「read」コマンドの場合のフローチャートである。図9を参照して、サーバ40は、センサデバイス100に含まれるセンサの検出値を読出す場合、サーバ40に記憶されたセンサIDリストに従って、対象となるホスト装置200に対して、対象のUSBポートを指定して「read」コマンドを送信する(S40)。
 ホスト装置200は、サーバ40から送信された「read」コマンドを受信すると(S50)、指定されたUSBポートに接続されたセンサデバイス100に対して、受信した「read」コマンドを転送する(S52)。
 センサデバイス100は、ホスト装置200から転送された「read」コマンドを受信すると(S60)、コマンドに記載されているセンサIDに従って、対象のセンサの検出値を取得する(S62)。そして、センサデバイス100は、S64にて、共通ファームウェア125において、図7で説明した共通のデータフォーマットに従って、返信すべき情報を編集する(S64)。その後、編集されたデータをホスト装置200へ送信する(S66)。
 ホスト装置200は、センサデバイス100から送信された、センサの検出値を含むデータを受信し、さらに当該データにUSBポートの情報を付加して、サーバ40へ送信する(S54)。サーバ40は、S42にて、センサデバイス100から送信されたデータを受信する。サーバ40は、受信されたデータから所望のセンサの検出値を抽出して記憶する。サーバ40は、記憶された検出値を、図示しない表示装置に表示したり、他の制御装置へさらに伝達したりする。
 以上のような処理に従って制御が行なわれることによって、サーバは、所望のセンサの検出値を取得することができる。
 (writeコマンド)
 図10は、「write」コマンドの場合のフローチャートである。図10を参照して、サーバ40は、特定のセンサデバイス100に対して、LEDを点灯させたり、特定のデータを書き込んだりする場合に、センサIDリストに従って、ホスト装置200に対して「write」コマンドを送信する(S70)。このとき、サーバ40は、ホスト装置200において対象となるUSBポートを指定する。
 ホスト装置200は、サーバ40から「write」コマンドを受信すると(S80)、指定されたUSBポートに接続されたセンサデバイス100に対して、受信した「write」コマンドを転送する(S82)。
 センサデバイス100は、ホスト装置200から転送された「write」コマンドを受信すると(S90)、コマンドに記載されているセンサIDに従って、対象のセンサに対して指定されたデータを書き込む(S92)。
 以上のような処理に従って制御が行なわれることによって、所望のセンサに対してサーバからデータを書き込むことができる。
 (observe/cancelコマンド)
 図11は「observe」コマンドおよび「cancel」コマンドの場合のフローチャートである。図11を参照して、サーバ40は、特定のセンサの検出値を定期的に取得する場合、サーバ40に記憶されたセンサIDリストに従って、対象となるホスト装置200に対して「observe」コマンドを送信する(S100)。このとき、サーバ40は、ホスト装置200において対象となるUSBポートを指定する。
 ホスト装置200は、サーバ40から「observe」コマンドを受信すると(S200)、指定されたUSBポートに接続されたセンサデバイス100に対して、受信した「observe」コマンドを転送する(S210)。
 センサデバイス100は、ホスト装置200から転送された「observe」コマンドを受信すると(S300)、コマンドに記載されているセンサIDに従って、対象のセンサの検出値を取得する(S310)。そして、センサデバイス100は、S320にて、共通ファームウェア125において、共通のデータフォーマットに従って、返信すべき情報を編集する(S320)。その後、編集されたデータをホスト装置200へ送信する(S330)。
 ホスト装置200は、センサデバイス100から送信された、センサ情報を受信し、さらに当該データにUSBポートの情報を付加して、サーバ40へ送信する(S220)。サーバ40は、センサデバイス100から送信されたデータを受信して記憶する(S110)。
 サーバ40は、S120において、ユーザから、該当するセンサに対して、センサ検出値の定期的な読出しの停止が指示されたか否か(すなわち、キャンセル指示の有無)を判定する。ユーザからのキャンセル指示がない場合(S120にてNO)は、処理がS110に戻されて、サーバ40は、ホスト装置200から定期的に通知されるセンサ情報の受信/記憶を継続する。
 センサデバイス100は、ホスト装置200へのデータ送信が完了すると、S340に処理を進めて、ホスト装置200を経由してサーバ40から「cancel」コマンドを受信したか否かを判定する。サーバ40から送信された「cancel」コマンドを受信していない場合(S340にてNO)は、処理がS350に進められて、センサデバイス100は、次に、所定のインターバル時間が経過したか否かを判定する。
 所定のインターバル時間が経過していない場合(S350にてNO)は、処理がS340に戻されて、「cancel」コマンドの受信の有無を判定するとともに、所定のインターバル時間が経過するのを待つ。そして、所定のインターバル時間が経過すると(S350にてYES)、処理がS310に戻されて、センサデバイス100は、指定されたセンサの検出値を取得し、共通のデータフォーマットに編集して(S320)、センサ情報をホスト装置200へ送信する(S330)。すなわち、「cancel」コマンドが受信されていない状態では、センサデバイス100は、所定のインターバル時間が経過する毎に、指定されたセンサの検出値を取得して、取得したセンサ情報を共通のデータフォーマットでホスト装置200へ送信する。
 一方、ユーザからのキャンセル指示があった場合(S120にてYES)は、サーバ40において処理がS130に進められて、サーバ40は、対象のセンサのUSBポートを指定しつつ、ホスト装置200に「cancel」コマンドを送信する。
 ホスト装置200は、サーバ40から「cancel」コマンドを受信すると(S230)、指定されたUSBポートのセンサデバイスに対して、受信した「cancel」コマンドを転送する(S240)。
 センサデバイス100においては、サーバ40から送信された「cancel」コマンドを受信した場合(S340にてYES)は、ステップS350をスキップして処理を終了する。これによって、センサデバイス100からの定期的なセンサ情報の通知が停止される。
 以上のような処理に従って、サーバ、ホスト装置、およびセンサデバイスが制御されることによって、サーバおよびホスト装置は、所望のセンサからのセンサ情報を定期的に取得することが可能となる。
 なお、上記の説明においては、センサデバイスとホスト装置との間の接続に、USB規格に準拠したコネクタを用いる場合、特にUSB type-Aのコネクタを使用する場合を例として説明したが、使用するコネクタはこれに限られず、他のタイプ(type-B,C、あるいは、mini/micro)のUSBコネクタを用いてもよいし、USBコネクタ以外のコネクタを用いてもよい。
 今回開示された実施の形態は、すべての点で例示であって制限的なものではないと考えられるべきである。本開示の範囲は、上記した実施の形態の説明ではなくて請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。
 10 センサシステム、20,20A センサユニット、30 ネットワーク、40 サーバ、100,100A,100B センサデバイス、110,115 センサ、120,230 処理装置、121,122,231,232 センサ用ファームウェア、125,235 共通ファームウェア、130,210 USBコネクタ、200,200A ホスト装置、220 USBハブ、240 通信回路。

Claims (13)

  1.  複数のセンサデバイスが接続可能なホスト装置と、
     前記ホスト装置に接続された少なくとも1つのセンサデバイスとを備え、
     前記ホスト装置と前記少なくとも1つのセンサデバイスとは、所定のデータ形式で情報の伝達を行ない、
     前記所定のデータ形式は、前記ホスト装置に接続されるセンサデバイスに含まれるセンサの種類にかかわらず共通のデータ形式に設定される、センサシステム。
  2.  前記少なくとも1つのセンサデバイスは、
      第1センサを有し、前記ホスト装置と第1データ形式で情報の伝達を行なう第1センサデバイスと、
      前記第1センサとは異なる種類の第2センサを有し、前記ホスト装置と第2データ形式で情報の伝達を行なう第2センサデバイスとを含み、
     前記第1データ形式および前記第2データ形式は前記共通のデータ形式である、請求項1に記載のセンサシステム。
  3.  前記ホスト装置と前記少なくとも1つのセンサデバイスとは、USB(Universal Serial Bus)規格のコネクタを用いて接続される、請求項1または2に記載のセンサシステム。
  4.  前記少なくとも1つのセンサデバイスは、
      少なくとも1つのセンサと、
      前記少なくとも1つのセンサからの情報を処理する処理装置とを含み、
     前記処理装置は、
      前記少なくとも1つのセンサから取得した情報を取得するためのセンサ用ファームウェアと、
      前記センサ用ファームウェアから取得した情報を前記所定のデータ形式に変換するための共通ファームウェアとを有する、請求項1~3のいずれか1項に記載のセンサシステム。
  5.  前記ホスト装置と通信可能に構成されたサーバをさらに備え、
     前記ホスト装置は、前記サーバから指定された接続ポートに接続されたセンサデバイスから情報を取得して、前記サーバに送信する、請求項1~4のいずれか1項に記載のセンサシステム。
  6.  前記サーバは、前記ホスト装置と無線で通信する、請求項5に記載のセンサシステム。
  7.  ホスト装置に接続可能なセンサデバイスであって、
     少なくとも1つのセンサと、
     前記少なくとも1つのセンサからの情報を処理する処理装置とを備え、
     前記処理装置は、前記少なくとも1つのセンサからの情報を所定のデータ形式に変換して前記ホスト装置に送信し、
     前記所定のデータ形式は、前記少なくとも1つのセンサの種類にかかわらず共通のデータ形式に設定される、センサデバイス。
  8.  複数のセンサデバイスが接続可能なホスト装置であって、
     接続されたセンサデバイスからの情報を所定のデータ形式で取得する制御装置を備え、
     前記所定のデータ形式は、前記ホスト装置に接続されるセンサデバイスに含まれるセンサの種類にかかわらず共通のデータ形式に設定される、ホスト装置。
  9.  前記複数のセンサデバイスは、
      第1センサを有し、前記ホスト装置と第1データ形式で情報の伝達を行なう第1センサデバイスと、
      前記第1センサとは異なる種類の第2センサを有し、前記ホスト装置と第2データ形式で情報の伝達を行なう第2センサデバイスとを含み、
     前記第1データ形式および前記第2データ形式は前記共通のデータ形式である、請求項8に記載のホスト装置。
  10.  複数のセンサデバイスが接続可能なホスト装置と、前記ホスト装置に接続されたセンサデバイスを含むセンサシステムにおいて情報を伝達する方法であって、
     前記センサデバイスは、少なくとも1つのセンサと、処理装置とを含み、
     前記方法は、
     前記少なくとも1つのセンサからの情報を取得するステップと、
     前記取得された情報を、前記処理装置において所定のデータ形式に変換するステップと、
     前記所定のデータ形式に変換された情報を、前記処理装置から前記ホスト装置に送信するステップとを含み、
     前記所定のデータ形式は、前記ホスト装置に接続されるセンサデバイスに含まれるセンサの種類にかかわらず共通のデータ形式に設定される、方法。
  11.  前記ホスト装置の接続ポートにセンサデバイスが接続された場合に、前記ホスト装置から当該センサデバイスに対して、当該センサデバイスに含まれるセンサの種類に関するセンサ情報を送信させるための指令を送信するステップと、
     前記指令に応答して、前記センサ情報を前記ホスト装置に送信するステップとをさらに含む、請求項10に記載の方法。
  12.  前記ホスト装置は、サーバと通信可能に構成されており、
     前記方法は、
     前記接続ポートにセンサデバイスが接続された場合および前記接続ポートからセンサデバイス取り外された場合に、前記ホスト装置における各接続ポートの接続状態を示す接続情報を更新するステップと、
     前記接続情報を、前記ホスト装置から前記サーバに送信するステップとをさらに含む、請求項11に記載の方法。
  13.  前記少なくとも1つのセンサからの情報を、所定の時間間隔で前記ホスト装置に送信するステップをさらに含む、請求項10~12のいずれか1項に記載の方法。
PCT/JP2020/041342 2019-11-14 2020-11-05 センサシステム、それに用いられるセンサデバイスおよびホスト装置、ならびに、センサシステムにおける情報伝達方法 WO2021095632A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021556054A JP7264274B2 (ja) 2019-11-14 2020-11-05 センサシステム、それに用いられるセンサデバイスおよびホスト装置、ならびに、センサシステムにおける情報伝達方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019206011 2019-11-14
JP2019-206011 2019-11-14

Publications (1)

Publication Number Publication Date
WO2021095632A1 true WO2021095632A1 (ja) 2021-05-20

Family

ID=75912900

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/041342 WO2021095632A1 (ja) 2019-11-14 2020-11-05 センサシステム、それに用いられるセンサデバイスおよびホスト装置、ならびに、センサシステムにおける情報伝達方法

Country Status (2)

Country Link
JP (1) JP7264274B2 (ja)
WO (1) WO2021095632A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230055966A1 (en) * 2021-08-17 2023-02-23 Jastecm Co., Ltd. Indoor and outdoor seamless positioning device for data safety and data reliability

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005309744A (ja) * 2004-04-21 2005-11-04 Yokohama Tlo Co Ltd センサー制御システム及び汎用入出力制御装置
JP2008041086A (ja) * 2006-07-14 2008-02-21 Katsuya Honda インターフェース装置、インターフェース方法、プログラム、記憶媒体、及び情報収集システム
JP2009294814A (ja) * 2008-06-04 2009-12-17 Junya Hori センサ情報収集システム
JP2013186552A (ja) * 2012-03-06 2013-09-19 Seiko Epson Corp 信号変換装置、及び信号伝送システム

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005309744A (ja) * 2004-04-21 2005-11-04 Yokohama Tlo Co Ltd センサー制御システム及び汎用入出力制御装置
JP2008041086A (ja) * 2006-07-14 2008-02-21 Katsuya Honda インターフェース装置、インターフェース方法、プログラム、記憶媒体、及び情報収集システム
JP2009294814A (ja) * 2008-06-04 2009-12-17 Junya Hori センサ情報収集システム
JP2013186552A (ja) * 2012-03-06 2013-09-19 Seiko Epson Corp 信号変換装置、及び信号伝送システム

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230055966A1 (en) * 2021-08-17 2023-02-23 Jastecm Co., Ltd. Indoor and outdoor seamless positioning device for data safety and data reliability
KR20230026218A (ko) * 2021-08-17 2023-02-24 (주)자스텍엠 데이터 보안성 및 데이터 신뢰성을 위한 실내외 연속측위 장치
KR102547524B1 (ko) * 2021-08-17 2023-06-27 (주)자스텍엠 데이터 보안성 및 데이터 신뢰성을 위한 실내외 연속측위 장치

Also Published As

Publication number Publication date
JPWO2021095632A1 (ja) 2021-05-20
JP7264274B2 (ja) 2023-04-25

Similar Documents

Publication Publication Date Title
US7904631B2 (en) Protocol independent bridge
EP1134937B1 (en) Information signal processing apparatus, corresponding system, method and computer readable storage medium
JP4961997B2 (ja) ストレージ装置、ストレージ装置の制御方法、及びストレージ装置の制御プログラム
JP4966695B2 (ja) マルチマスタのチェーン接続された二線シリアルバス装置及びディジタル状態機械
WO2010116488A1 (ja) 通信アダプター装置
WO2021095632A1 (ja) センサシステム、それに用いられるセンサデバイスおよびホスト装置、ならびに、センサシステムにおける情報伝達方法
CN102369716A (zh) 用于广播usb数据流的系统、设备和方法
US7941230B1 (en) Control apparatus and control method, network system, program for control apparatus, and information recording medium
JP6894043B2 (ja) Dsiプロトコルに基づいて自動車両におけるセンサ装置を動作させるための方法
EP2398190B1 (en) Field communication system
KR101100296B1 (ko) 오.오.비.시그널링 자가 테스트 기능을 가진 사타 전자 장치
WO2018164037A1 (ja) 中継装置、サーバ、中継装置の設定方法及び記録媒体
EP3023879B1 (en) Communication system, communication device, communication adapter, communication method, and program
JP4873220B2 (ja) フィールド通信システム
JP2001274813A (ja) 情報信号処理装置及び情報信号処理方法並びに記憶媒体
US20160269487A1 (en) Control apparatus for use in distributed control system and units
US7739373B2 (en) Detecting whether a connection between apparatuses includes a predetermined transmission medium
JP6762546B1 (ja) シリアル通信方法及びシリアル通信システム
JP2006195589A (ja) 通信制御装置、通信制御方法、プログラム、及び記憶媒体
US20100205334A1 (en) Device wire adapter and communication control method to perform data transfer between wireless USB host and wired USB device
JP2010010889A (ja) 加入者装置
JP2019176208A (ja) 通信システム
JP5900621B2 (ja) システムおよびシステムの制御方法
WO2023132033A1 (ja) 中継装置、中継方法及びプログラム
CN113498046B (zh) 通信的方法、装置和系统,存储介质和终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20886733

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021556054

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20886733

Country of ref document: EP

Kind code of ref document: A1