davesteele / comitup

Bootstrap Wifi support over Wifi
https://davesteele.github.io/comitup/
GNU General Public License v2.0
324 stars 55 forks source link

Question: Is it possible to stop hotspot only when an edge device successfully connects a network? #54

Closed Sharvin26 closed 5 years ago

Sharvin26 commented 5 years ago

Hello

I have a Raspberry Pi ( This is the edge device where I have configured the comitup service ) with the Raspbian ( Stretch ).

Expected Behavior

I have a requirement as follows =>

Reason behind this requirement is that when a wrong password is sent or due to any circumstance it is not possible to connect that wifi then, in that case, I won't get feedback if the edge device is connected successfully or not.

Actual Behavior

I saw a behavior whenever a connect API is called on the edge device it stops the Hotspot ( i.e. It's own AP ) and tries to connect the wireless network / AP

You have also mentioned this in the documentation

If the computer cannot automatically connect to a local wifi access point, comitup will create a custom hotspot, and establish a comitup-web web service on that network.

Steps to Reproduce the Problem

  1. Added the line deb http://davesteele.github.io/comitup/repo comitup main inside this file =>/etc/apt/sources.list.
  2. wget https://davesteele.github.io/key-366150CE.pub.txt
  3. sudo apt-key add key-366150CE.pub.txt
  4. sudo apt-get update
  5. sudo apt-get install comitup
  6. I connected the Hotspot that was created by the edge device
  7. After that, I went to the <edge_device_ip_address>:80 on the browser and I got all the available network list.
  8. I selected the network and typed in the wrong password and pressed the connect.
  9. In that case, it turned off the Access point and tried to connect the Wireless network.
  10. After a few seconds of try it started it's Hotspot again.

Question

So I was wondering if is it possible to stop the Hotspot only if the Edge device is successfully connected to the wifi?

davesteele commented 5 years ago

There is currently no mode to do exactly what you want. Comitup has to drop the AP in order to use the interface to attempt the upstream connection. Failure is indicated by the recurrence of the Comitup AP.

There is a dual interface mode that preserves the Comitup AP, but it does not do significantly more to report connection errors.

Sharvin26 commented 5 years ago

Thanks for the response @davesteele How can I enable the dual interface mode?

davesteele commented 5 years ago

Add a USB Wifi interface. See also enable_appliance_mode and primary_wifi_device in the configuration file.

Sharvin26 commented 5 years ago

Thank you