A method of network configuration for an Internet of Things, IoT, device, comprising: establishing (S110) a neighborhood awareness channel between a terminal device and the IoT device; obtaining (S120), by the terminal device, network configuration information of a gateway device stored in the terminal device wherein the network configuration information is stored in the memory of the terminal device; and transmitting (S130), by the terminal device at a media access control layer, the network configuration information to the IoT device through the neighborhood awareness channel to allow the IoT device to connect to the gateway device via the network configuration information wherein the transmitting (S130) comprises: determining, by the terminal device, whether the obtained network configuration information of the gateway device matches the IoT device; transmitting directly, by the terminal device, in response to the obtained network configuration information of the gateway device matching the IoT device, the network configuration information of the gateway device to the IoT device; correcting, by the terminal device, in response to the obtained network configuration information of the gateway device not matching the IoT device, the obtained network configuration information and transmits the confirmed new network configuration information to the IoT device. establishing (S110) a neighborhood awareness channel between a terminal device and the IoT device; obtaining (S120), by the terminal device, network configuration information of a gateway device stored in the terminal device wherein the network configuration information is stored in the memory of the terminal device; and transmitting (S130), by the terminal device at a media access control layer, the network configuration information to the IoT device through the neighborhood awareness channel to allow the IoT device to connect to the gateway device via the network configuration information wherein the transmitting (S130) comprises: determining, by the terminal device, whether the obtained network configuration information of the gateway device matches the IoT device; transmitting directly, by the terminal device, in response to the obtained network configuration information of the gateway device matching the IoT device, the network configuration information of the gateway device to the IoT device; correcting, by the terminal device, in response to the obtained network configuration information of the gateway device not matching the IoT device, the obtained network configuration information and transmits the confirmed new network configuration information to the IoT device. determining, by the terminal device, whether the obtained network configuration information of the gateway device matches the IoT device; transmitting directly, by the terminal device, in response to the obtained network configuration information of the gateway device matching the IoT device, the network configuration information of the gateway device to the IoT device; correcting, by the terminal device, in response to the obtained network configuration information of the gateway device not matching the IoT device, the obtained network configuration information and transmits the confirmed new network configuration information to the IoT device. <EOS>