commit edd1dc60967dab19b8d295a67b388986a27c037c
parent 1ee7add0451a41599a9e4d0ed24980a6dd91818e
Author: Bharatvaj H <bharatvaj@yahoo.com>
Date: Sun, 1 Sep 2019 01:56:37 +0530
parent 1ee7add0451a41599a9e4d0ed24980a6dd91818e
Author: Bharatvaj H <bharatvaj@yahoo.com>
Date: Sun, 1 Sep 2019 01:56:37 +0530
Bind explained
1 file changed, 30 insertions(+), 25 deletions(-)
diff --git a/README.md b/README.md @@ -8,54 +8,59 @@ Transforming real world objects into virtual nodes that can be controlled by the ## Specification ### Novel Features -A bridge between devices of heterogeneous networks are created to pave the future for IoT. Traditionally the bridges are configured in the same system where a certain redirection of network is required. We are proposing a transparent bridge where the devices involved has no idea that it is contacting with devices of other networks. +A bridge between devices of heterogeneous networks are created to pave the future for IoT. Traditionally the bridges are configured in the same system where a certain redirection of network is required. We are proposing a system where the devices involved has no idea that it is contacting with devices of other networks. -### Drawbacks of Existing -#### IP Standardization -Interoperability between devices have been achieved by using same networks for various physical devices. For example, IP network can be used for Ethernet, WiFi and Bluetooth. - -Drawbacks are, -* IP does not support ZigBee or ZWave and many other devices. -* Even support is brought in the future, new X/IP devices will not be able to work with old X/X devices, where X is a physical hardware such as ZigBee or ZWave. - -#### Blu-Fi -Product called Blu-Fi is already in market which connects Bluetooth and WiFi devices using a modem-like Blu-Fi adapter. +### Drawbacks of Existing System The drawbacks are, -* Existing systems cannot be used or can be used only to a certain extent. +* Existing systems cannot be used, or can be used only to a certain extent. * There is very low coherence between the adapter and the devices. * Applications are limited to tools offered by the company which offers Blu-Fi. * Wildcard operations are not possible. An example would be connecting two different MQTT-SN devices under different networks. ## Detailed Description -The `adapter` is collectively the software `modules` and hardware required to convert relay messages from one network to another. +The `adapter` collectively consists of `software modules` and respective hardwares required to convert and relay messages from one network to another. (e.g. WiFi to Bluetooth, ZWave to ZigBee, e.t.c) There are two phases in the working of adapter. ### Phase One --- -#### Detect -Forwarder supports various network technologies and also new network technologies can be added by adding the corresponding module. But due to cost and requirement, only some of the networks are actually needed. Detection of hardware devices are performed to load the corresponding software modules. For instance, in a adapter with a WiFi and a Bluetooth hardware loading extra modules such as ZigBee and ZWave will only slow the adapter. +# Detect +The adapter provides compatibility among various network technologies along with the capability to add new technologies by adding their respective modules +The adapter identifies all available network hardware modules present in it through the software method, init(). +init() returns true if that particular hardware module is present else it returns false. +All the values returned by the init() are taken into account and the network are displayed iff the returned statement is true. + +# Select +User has the ability to select which hardware module must be turned on through the given interface for the process of inter operable communication based on their requirements. + +# Discover +The adapter searches for the devices based on the user selected networks and stores the details of those devices according to their network in their respective software modules. -#### Select -Even if the hardware component is present in the adapter. The power to use that component resides in software modules. This is controlled by the user of the adapter. +# Bind +Devices recognized by the adapter is given an alias in the form of IP address, is the gist of bind. Bind process involves, +* Acquiring IP address +* Assigning IP alias -#### Bind -Once the networks which are needed are selected. The individual devices which is needed to register with other networks are specified. This step should be done for each devices and for each network. (i.e) If there are N networks and there are D devices in each network. D devices in each network should be configured to work with other N-1 networks or as need by the user. Since this process is systematic, it can be easily automated by scripts or can configured by the user as needed. Thus providing convenience and flexibility. +## Acquiring IP address +The local router is polled for free IP addresses via DHCP and stored in the adapter for lookup. + +## Assigning IP address +Obtained IP address is registered as an IP alias(RFC2219) to the adapter. Address of detected devices of other network is stored in local memory and lookep up upon connection. Address is cananical and subjective to the respective network. Address of detected devices are assigned to the obtained IP in a one-one relationship. ### Phase two --- #### Listen -When a device is binded, the forwarder starts a listen instance. Whenever a bind is configured for a device with Network `A` to another device with Network `B`, Forwarder starts listening for `B` devices. When a device `C` tries to access `B`, connect instance of `A` is called. +When a device is binded, the adapter starts a listen instance for that particular device based on it's network. #### Connect -`A` is the device with true address, whereas the device `B` is pseudo. Connection to `A` is done with the forwarder. +An IP device is connected with an IP device or any other device using a pseudo IP address which is assigned to the adapter, provided by the bind() #### Forward -Adapter has the connection with `A` and `C`. This leaves us with stripping and repackaging -##### Strip -The `message` is the data which is to reach the end system. Suppose `C` is the first one to send message to `A`. `C` sends the message to adapter. Adapter strips the `C` related network headers and network related encryption, and stores the message. +Adapter has the connection between the devices which allows it to transfer the data by stripping and then repackaging based on their respective network. +##### Strip +The `message` is the data that has to be transferred between the devices irrespective of their networks, so the unnecessary details other than the message that is transmitted from the sender is stripped and discarded. ##### Repackage -The message which is free of all the network headers and network related encryption, it is repackaged with `A` related network headers and encryption if any. +The message which is free of all the network headers and network related encryption is then repacked based on the receiver's network.
: bharatvaj/forwarder