Cross-Layer Approach for Self-Organizing and Self-Configuring Communications Within IoT