# Device Management and Data Transport in IoT Networks Based on Visible Light Communication
## 3 Proposed VLC-Based IoT Scheme
### Device Management and Data Transport Operations
#### 3.3.1 Device Initialization  
During device initialization, all of the devices (AA, VT, and VR) are registered with PS. Figure 4 shows the overall steps for device initialization. Figure 5 shows the AA initialization process between PS and AA, which is divided into the IP connection establishment and the AA registration to PS. When an AA turns on, it finds the PS by sending a Router Solicitation message, as done in a typical IP network. Then, PS responds to AA with a Router Advertisement. The Router Advertisement message contains the IP address of PS, including information related to the Domain Name System (DNS) server and the Dynamic Host Configuration Protocol (DHCP) server, if available. In certain cases, PS may send the Router Advertisement messages periodically. AA configures an IPv6 address after receiving the Router Advertisement message. When the address configuration is completed, AA sends the AA Registration message to PS. After the processing of appropriate operations based on the AA Registration, PS will reply with the AA Registration ACK message. If necessary, PS may send the AA Network Configuration commands to the AA so as to provide the information required for configuration of VR Service Channel at AA. Processes 3 to 6 are accomplished at the application level. Figure 4: Overview of device initialization. Figure 5: AA initialization. Figure 6 shows the VT initialization process, which is divided into IP connection establishment and VT registration to AA. Because VT is a lighting device with VLC functionality, when VT is powered on, it operates as a normal light bulb. It is noted that our scheme could also be used for control of a light bulb, such as switching the light on or off or changing dimming rates. After being powered on, VT is connected to an AA by sending a Router Solicitation message and receiving a Router Advertisement message from AA. When VT receives a Router Advertisement message, it configures an IPv6 address to communicate with AA. After that, VT sends the VT Registration message to AA, which may contain the VT identifier and status information on the attached LED light. For VLC device management, AA needs to manage the mapping information on its downstream VTs and VRs. For this purpose, AA creates and maintains an AA-VT-VR mapping table, and it will report this mapping information to PS. Now, AA responds to VT with the VT Registration ACK message. If necessary, AA sends the VLC Configuration message to the registered VT, which contains the parameters required for VLC configuration. Then, the VT configures its VLC function and starts to transmit VLC beacons toward the promising VRs. It is noted that processes 3 to 8 are done at the application level. Figure 7 shows the VR initialization process. When VR is turned on, it waits to receive any VLC frames. Once a VLC Frame is received, VR decodes the VLC frame and tries to establish the VR Service Channel with the associated AA. After associating VR Service Channel, VR configures an IPv6 address to communicate with AA, exchanging Router Solicitation and Router Advertisement messages. When an IPv6 address is configured, VR tries to register with AA by sending VR Registration message. AA updates the AA-VT-VR mapping table created before and replies to VR with a VR Registration ACK message. After VR registration is completed, AA reports the new VR to PS by sending the mapping table. Steps 3 to 8 are done at the application level. Figure 8 gives an example of the VLC format and how fields in the VLC frame are used for the VR initialization operation. The VLC frame contains the _start_ and _end preamble_ for distinguishing VLC frames. _AA ID_ and _VT ID_ will be used for VR registration, device monitoring, and VLC data transport. In addition, the _information on VR Service Channel_ can be defined. For example, when WLAN is used between VR and AA, the Basic Service Set Identifier (BSSID) of Access Point (AP) for AA may be included as the _information of VR Service Channel_.