Search

US-12621261-B2 - Electronic apparatus and control method

US12621261B2US 12621261 B2US12621261 B2US 12621261B2US-12621261-B2

Abstract

An electronic device including: a memory configured to store an address code; a communication interface configured to communicate with one or more node apparatuses among a plurality of node apparatuses by serial communication; and a processor configured to: obtain the address code and an address value corresponding to one node apparatus among the one or more node apparatuses, generate an Ethernet frame including a custom field based on the address code and the address value, and transmit the generated Ethernet frame to the one node apparatus through the communication interface, where the custom field includes: an address code area storing the address code and an address value area storing the address value, and the address code configured to set the address value of the one node apparatus.

Inventors

  • Kiock SHIN
  • Changhun KIM
  • Sarfaraz AHMED

Assignees

  • SAMSUNG ELECTRONICS CO., LTD.

Dates

Publication Date
20260505
Application Date
20240416
Priority Date
20211227

Claims (12)

  1. 1 . An electronic apparatus comprising: a memory configured to store an address code; a communication interface configured to communicate with one or more node apparatuses among a plurality of node apparatuses by serial communication; and a processor configured to: generate, based on a user instruction, an address code and an initial address value for setting an address value of one node apparatus among the one or more node apparatuses; generate an Ethernet frame comprising a custom field; and transmit the generated Ethernet frame to the one node apparatus through the communication interface, wherein the custom field comprises: an address code area storing the address code and an address value area storing the address value of the one node apparatus among the one or more node apparatuses, wherein the address code comprises a first binary code of a first value, or a second binary code of a second value, wherein the first value is configured to initialize the address value in the one node apparatus by setting the address value in the one node apparatus to a default address value, and wherein the second value is configured to set the address value of the one node apparatus based on the address value stored in the custom field.
  2. 2 . The electronic apparatus of claim 1 , wherein the processor is further configured to: based on obtaining a user instruction for setting address values of the plurality of node apparatuses, generate the first binary code; and store the first binary code in the address code area of the custom field.
  3. 3 . The electronic apparatus of claim 1 , wherein the processor is further configured to: based on receiving feedback code information indicating that the address values of the plurality of node apparatuses have been initialized, generate a first address value from an address value generation function; store the second binary code in the address code area of the custom field; and store the first address value in the address value area of the custom field.
  4. 4 . The electronic apparatus of claim 1 , wherein the address value is updated in each of the plurality of node apparatuses by inputting the address value of the custom field into an address value generation function.
  5. 5 . The electronic apparatus of claim 1 , wherein the one or more node apparatuses comprises a first node apparatus and a second node apparatus, wherein the processor is further configured to: transmit the Ethernet frame to the first node apparatus through the communication interface; and based on receiving a feedback frame from the second node apparatus, identify whether a performed user instruction was completed normally based on the feedback frame, and wherein the feedback frame comprises feedback code information generated by the one or more node apparatuses based on an operation performed in the one or more node apparatuses.
  6. 6 . The electronic apparatus of claim 5 , wherein the feedback frame is a second feedback frame, wherein the second feedback frame is generated in the second node apparatus based on a first feedback frame generated in the first node apparatus, wherein the first feedback frame is based on an operation performed in the first node apparatus based on the Ethernet frame, and wherein the second feedback frame is based on an operation performed in the second node apparatus that received the first feedback frame from the first node apparatus.
  7. 7 . The electronic apparatus of claim 5 , wherein the processor is further configured to: obtain reference code information corresponding to the user instruction based on information stored in the memory; based on receiving the feedback frame through the communication interface, obtain the feedback code information included in the feedback frame; and identify whether the user instruction was performed normally based on the feedback code information and the reference code information.
  8. 8 . The electronic apparatus of claim 7 , wherein the processor is further configured to: based on whether the feedback code information and the reference code information coincide, obtain address values corresponding to each of the plurality of node apparatuses; store one address value among the address values corresponding to each of the plurality of node apparatuses in the address value area of the custom field; regenerate the Ethernet frame based on the custom field; and retransmit the regenerated Ethernet frame to the first node apparatus through the communication interface.
  9. 9 . A control method for an electronic apparatus that stores an address code, and communicates with one or more node apparatuses among a plurality of node apparatuses by serial communication, the control method comprising: generating, based on a user instruction, an address code and an initial address value for setting an address value of one node apparatus among the one or more node apparatuses; generating an Ethernet frame including a custom field; and transmitting the generated Ethernet frame to the one node apparatus, wherein the custom field includes an address code area storing the address code and an address value area storing the address value of the one node apparatus among the one or more node apparatuses, and wherein the address code includes a first binary code of a first value or a second binary code of a second value, wherein the first value is configured to initialize the address value in the one node apparatus by setting the address value in the one node apparatus to a default address value, and wherein the second value is configured to set the address value of the one node apparatus as the address value stored in the custom field.
  10. 10 . The control method of claim 9 , wherein the generating the address code and the address value comprises, based on obtaining a user instruction for setting address values of the plurality of node apparatuses, generating the first binary code based on the user instruction, and wherein the generating the Ethernet frame comprises: generating the Ethernet frame including the custom field, and storing the first binary code in the address code area of the custom field.
  11. 11 . The control method of claim 9 , wherein the generating the address code and the address value comprises, based on receiving feedback information indicating that the address values of the plurality of node apparatuses have been initialized, generating a first address value, and wherein the generating the Ethernet frame comprises: generating the Ethernet frame including the custom field, storing the second binary code in the address code area of the custom field, and storing the first address value in the address value area of the custom field.
  12. 12 . The control method of claim 9 , wherein the address value is updated in each of the plurality of node apparatuses by inputting the address value of the custom field into an address value generation function.

Description

CROSS-REFERENCE TO RELATED APPLICATION This application is a bypass continuation of International Application No. PCT/KR2022/017255 filed on Nov. 4, 2022, in the Korean Intellectual Property Receiving Office, which is based on and claims priority to Korean Patent Application No. 10-2021-0188759, filed on Dec. 27, 2021, in the Korean Intellectual Property Office, the disclosure of which are incorporated by reference herein in their entireties. BACKGROUND 1. Field The disclosure relates to an electronic apparatus and a control method therefor, and more particularly, to an electronic apparatus that sets address information of a plurality of node apparatuses connected by serial communication, and a control method therefor. 2. Description of Related Art An Ethernet may be used as an interface for data communication. A communication system using an Ethernet may include a master apparatus and a plurality of node apparatuses. An Ethernet is a near field communication network by a bus structure method, and is a computer network technology for transmitting data to a plurality of node apparatuses. In case a plurality of node apparatuses exist in a location that is difficult for a user to access such as a wall surface of a building or a ceiling of a stadium, it may be difficult for the user to directly set the addresses. Accordingly, there is a need for a master apparatus that directly controls setting of addresses for a plurality of node apparatuses. If the master apparatus performs 1:1 communication with each node apparatus for communicating with the plurality of node apparatuses, there may be a problem because the number of communications will increase according to the number of the node apparatuses. For example, n number of communications may be needed for the master apparatus to perform communications with n node apparatuses. In case n communications are performed, there may be a problem based on the length of time to transmit data. SUMMARY Provided is an electronic apparatus that performs setting of addresses of a plurality of node apparatuses by transmitting an Ethernet frame including address codes related to setting of address values of the node apparatuses and the address values, and a control method therefor. According to an aspect of an embodiment, an electronic device may include: a memory configured to store an address code; a communication interface configured to communicate with one or more node apparatuses among a plurality of node apparatuses by serial communication; and a processor configured to: obtain the address code and an address value corresponding to one node apparatus among the one or more node apparatuses, generate an Ethernet frame including a custom field based on the address code and the address value, and transmit the generated Ethernet frame to the one node apparatus through the communication interface, where the custom field includes: an address code area storing the address code and an address value area storing the address value, and the address code configured to set the address value of the one node apparatus. The address code may include a first binary code of a first value or a second binary code of a second value, where the first value is configured to initialize a predetermined address value in the one node apparatus, and where the second value is configured to set the address value of the one node apparatus based on the address value stored in the custom field. The processor may be further configured to: based on obtaining a user instruction for setting address values of the plurality of node apparatuses, obtain the first binary code, store the first binary code in the address code area of the custom field, and generate the Ethernet frame based on the custom field. The processor may be further configured to: based on the address values of the plurality of node apparatuses being initialized, obtain the second binary code and a first address value, store the second binary code in the address code area of the custom field, store the first address value in the address value area of the custom field, and generate the Ethernet frame based on the custom field. The address value may be updated based on respective address values corresponding to each of the plurality of node apparatuses. The respective address values may be updated in each of the plurality of node apparatuses. The one or more node apparatuses may include a first node apparatus and a second node apparatus, where the processor is further configured to: transmit the Ethernet frame to the first node apparatus through the communication interface, and based on receiving a feedback frame from the second node apparatus, identify an integrity of a performed user instruction based on the feedback frame. The feedback frame may be a second feedback frame, where the second feedback frame is generated in the second node apparatus based on a first feedback frame generated in the first node apparatus, where the first feedback frame is