0

I am new to Raspberry Pi. I would like to do the Wi-Fi configuration for the Pi 3 from an Android app.

On researching I found there are many approaches to setting up a web server on the Pi side.

So by going with this approach I assume the web server will do the task of setting up the Wi-Fi server using the user name and pwd, provided as the HTTP request parameters.

Is this approach correct?

If yes then how will the web server be sending commands to the command prompt?

  • 1
    Why are you trying to do it this way? Why not just login in to the Pi locally or over SSH? Your approach is possible but much harder than neccesary. – Steve Robillard Apr 20 '16 at 5:47
  • I know but we want to do it. It is the client requirement. Please help. Thanks. – Sweety Apr 20 '16 at 5:53
  • You do realize that if this is the only connection method you could wind up unable to access the Pi as the result of a typo. – Steve Robillard Apr 20 '16 at 15:52
  • So you want to reconfigure a working Wi-Fi (needed to access the web server on the Pi from the Android) from a limited privilege web service??? – zedman9991 Sep 21 '16 at 16:43
0

There are lots of possibilities ...

  1. install apache with a program language you like most ruby, python, php, ...
  2. install ruby, python, php, ... and run an embedded webserver

The scripts you write will do the setup.

  • 1
    Your answer is pretty vague (but then, so is the question). Do you really think it will help the OP or someone else? – Dmitry Grigoryev Sep 21 '16 at 16:21
0

If you just want to send commands to command prompt:

<?php
if($GET[exec] == true) {
    exec("echo Hi!");
}
?>
<a href='?exec=true'>Click here to execute command</a>

If you want something different, you can use the cgi-bin module for directly execute .sh scripts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.