The present invention provides an electronic device and an information processing device, and the control methods. Parameters to be set in the electronic device are generated with a simple operation, and further, safely in terms of security. For this purpose, upon generation of setting parameters for an electronic device having a radio LAN function and an image sensing function, first, parameters necessary for radio LAN communication are inputted. Then, a secret key for encryption of the input parameters is inputted. Thereafter, the input parameters are encrypted with the secret key, thus encrypted information is generated. A two-dimensional barcode image is generated from the encrypted information, and the image is visibly outputted to be subjected to image sensing utilizing the image sensing function.