Coder Social home page Coder Social logo

Comments (10)

jrmhaig avatar jrmhaig commented on September 13, 2024

It should scan each time you load the page and display everything it finds. If this is not the case then there is a bug. The networks are detected using:

sudo wpa_cli scan
sleep 3
sudo wpa_cli scan_results

Do your networks appear in the output from these commands? And can you check that these commands are in the sudoers file for the user www-data. This hasn't changed so I wouldn't expect this to be the problem.

One thing that springs to mind is that it will only discover networks that broadcast their ssid and so you cannot configure a hidden network. This is an oversight and I will look into fixing that.

The screenshot suggests that there is something else wrong even when you do have the network configured. The icons on the left indicate that the network is configured (in the wpa_supplicant.conf file) and connected. However, it is not able to identify the channel. Can you find the following lines in includes/configure_client.php

and change ConvertToChannel($arrNetwork[1]) to $arrNetwork[1] and then see what appears under the 'Channel' column in the table.

from raspap-webgui.

enrutador avatar enrutador commented on September 13, 2024

First of all I must tell you that the hardware I'm using is a BEAGLEBONE Green Wireless. This machine has a 1 wireless interface but with a 2x2 Mimo Wifi / Ble. This allows me to create in the same two communications interface

  1. SoftAP to connect client computers (hostapd + chillicoova -> ALL OK)
  2. The wlan0 that connects the router and performs the function of default gateway

The points you mention me are:

  1. Sudoers / wpa
    www-data ALL = (ALL: ALL) NOPASSWD: ALL

arm root @: ~ # wpa_cli scan
Selected 'p2p-dev-wlan0' interface
okay
arm root @: ~ # sleep 3
arm root @: ~ # wpa_cli scan_results
Selected 'p2p-dev-wlan0' interface
bssid / frequency / signal level / flags / ssid

  1. The network is not hidden

  2. The configuration of the network interface Wifi performed in the system is as follows:

/ Etc / network / interfaces:

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

/etc/wpa_supplicant/wpa_supplicant.conf:

ctrl_interface = DIR = / var / run / wpa_supplicant GROUP = netdev

network = {
  ssid = "LOVER"
  scan_ssid = 1
  key_mgmt = WPA-PSK
  psk = "XXXXX"
  proto = WPA RSN
  pairwise = CCMP TKIP
  group = CCMP TKIP
}
4) Chances for frequency problems:

I have made changes to code:
     # $ Networks [$ arrNetwork [4]] [ 'channel'] = ConvertToChannel ($ arrNetwork [1]);
     $ Networks [$ arrNetwork [4]] [ 'channel'] = $ arrNetwork [1];

      # 'Channel' => ConvertToChannel ($ arrNetwork [1]),
     'Channel' => $ arrNetwork [1],

I reload apache2 server , but don´t show the frequency
captura de pantalla 2016-09-07 a las 12 00 47

  1. Observations
    I see the new sytem Pi revision page,very interesting ¡¡ the command for discover the BBXX versio is:

https://github.com/gkaindl/beaglebone-ubuntu-scripts/blob/master/bb-show-serial.sh

Need more information , can do any test more?

from raspap-webgui.

jrmhaig avatar jrmhaig commented on September 13, 2024

I think that the different hardware is most likely the source of the problems, and possibly the software too. Are you using Raspbian? Or do you have something else that is based off Debian? I don't know how much customisation goes into Raspbian but I would think that provided you are on something Debian based, and preferably Jessie, it should be OK.

The output from wpa_cli scan_results suggests that it did not find any networks. This may be the case if the interface is already set up as an access point. It may also be that the scan has not completed (which is what the sleep 3 is for) but I would be surprised if it takes more than half a second.

At the top you say that wlan0 is used for connecting to the router but the output of the wpa_cli commands suggest that the interface is p2p-dev-wlan0. I'm afraid I don't know how the 2x2 Mimo Wifi works so I don't know what the interface names should be. You could try adding -i <interface name> to the wpa_cli commands with some different names and see if any of them respond. You could also try it again with the access point disabled.

You could also try using iw dev <interface> scan to detect networks instead of wpa_cli. wpa_cli is what was being used when I started working on this project but I believe that iw is the new tool that should use instead. See

If this does a better job at detecting the networks it might be worth moving to that now. I'm fairly sure it works on a Raspberry Pi but I didn't get round to going through the code and changing it.

Regarding the hardware revision in the system information, this currently comes from a simple look-up table based on /etc/cpuinfo. The method for Beaglebone appears to be more involved and I'm not likely to look at it any time soon (not least as I don't have a Beaglebone) but if you want you could raise a separate issue containing that link.

from raspap-webgui.

enrutador avatar enrutador commented on September 13, 2024

Hi Joseph
Yes correct , I am using a debian Jessie:

Linux 4.4.16 arm-ti-rt-r38 # 1 SMP PREEMPT RT Sat 6 Aug 2016 1:18:53 CEST armv7l GNU / Linux

As well you say the interface is connected. With the "iw" command is fantastic, even connected gives you the scan of associated networks. I am attaching the output of the scan as the properties of the nic with "iw" command

I would like to help you change those functions and perform the test with "iw" I can go over all the code and go changing commands to see how it behaves interface wifi

I created a fork of your project on my site I can upload everything observed with my bbgw

Debug Commands:
Scan:

root@arm:~# iw dev wlan0 scan | more
BSS 00:19:77:1d:e8:94(on wlan0) -- associated
TSF: 5293302450023 usec (61d, 06:21:42)
freq: 2472
beacon interval: 100 TUs
capability: ESS Privacy ShortPreamble ShortSlotTime (0x0431)
signal: -59.00 dBm
last seen: 4920 ms ago
Information elements from Probe Response frame:
SSID: LOVER
Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0
DS Parameter set: channel 13
Country: ES Environment: Indoor/Outdoor
Channels [1 - 13] @ 20 dBm
ERP:
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: 1-PTKSA-RC 1-GTKSA-RC (0x0000)
* 0 PMKIDs
Extended supported rates: 24.0 36.0 48.0 54.0*
HT capabilities:
Capabilities: 0x18c
HT20
SM Power Save disabled
TX STBC
RX STBC 1-stream
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT RX MCS rate indexes supported: 0-15
HT TX MCS rate indexes are undefined
HT operation:
* primary channel: 13
* secondary channel offset: no secondary
* STA channel width: 20 MHz
* RIFS: 0
* HT protection: nonmember
* non-GF present: 1
* OBSS non-GF present: 1
* dual beacon: 0
* dual CTS protection: 0
* STBC beacon: 0
* L-SIG TXOP Prot: 0
* PCO active: 0
* PCO phase: 0
Overlapping BSS scan params:
* passive dwell: 20 TUs
* active dwell: 10 TUs
* channel width trigger scan interval: 300 s
* scan passive total per channel: 200 TUs
* scan active total per channel: 20 TUs
* BSS width channel transition delay factor: 5
* OBSS Scan Activity Threshold: 0.25 %
Extended capabilities: HT Information Exchange Supported
WMM: * Parameter version 1
* BE: CW 15-1023, AIFSN 3
* BK: CW 15-1023, AIFSN 7
* VI: CW 7-15, AIFSN 2, TXOP 3008 usec
* VO: CW 3-7, AIFSN 2, TXOP 1504 usec
BSS dc:4a:3e:1e:98:7d(on wlan0)
TSF: 851718745542 usec (9d, 20:35:18)
freq: 2472
beacon interval: 100 TUs
capability: ESS Privacy SpectrumMgmt ShortSlotTime (0x0511)
signal: -83.00 dBm
last seen: 4916 ms ago
Information elements from Probe Response frame:
SSID: DIRECT-7C-HP Officejet 5740
Supported rates: 6.0* 9.0 12.0* 18.0 24.0* 36.0 48.0 54.0
DS Parameter set: channel 13
Power constraint: 0 dB
TPC report: TX power: 17 dBm
ERP:
ERP D4.0:
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: 16-PTKSA-RC 1-GTKSA-RC (0x000c)
HT capabilities:
Capabilities: 0x20
HT20
Static SM Power Save
RX HT20 SGI
No RX STBC
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 32767 bytes (exponent: 0x002)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT RX MCS rate indexes supported: 0-7
HT TX MCS rate indexes are undefined
HT operation:
* primary channel: 13
* secondary channel offset: no secondary
* STA channel width: 20 MHz
* RIFS: 1
* HT protection: no
* non-GF present: 0
* OBSS non-GF present: 0
* dual beacon: 0
* dual CTS protection: 0
* STBC beacon: 0
* L-SIG TXOP Prot: 0
* PCO active: 0
* PCO phase: 0
WMM: * Parameter version 1
* u-APSD
* BE: CW 15-63, AIFSN 3
* BK: CW 15-1023, AIFSN 7
* VI: CW 7-15, AIFSN 1, TXOP 3008 usec
* VO: CW 3-7, AIFSN 1, TXOP 1504 usec
WPS: * Version: 1.0
* Wi-Fi Protected Setup State: 2 (Configured)
* AP setup locked: 0x01
* Selected Registrar: 0x0
* Response Type: 3 (AP)
* UUID: 1c852a4d-b800-1f08-abcd-dc4a3e1e987b
* Manufacturer: HP
* Model: 0
* Model Number: 0
* Serial Number: 0
* Primary Device Type: 3-0050f204-5
* Device name: DIRECT-7C-HP Officejet 5740
* Config methods:
* Unknown TLV (0x1049, 6 bytes): 00 37 2a 00 01 20

Property:

root@arm:~# iw list
Wiphy phy0
max # scan SSIDs: 1
max scan IEs length: 441 bytes
Retry short limit: 7
Retry long limit: 4
Coverage class: 0 (up to 0m)
Device supports AP-side u-APSD.
Supported Ciphers:
* WEP40 (00-0f-ac:1)
* WEP104 (00-0f-ac:5)
* TKIP (00-0f-ac:2)
* CCMP (00-0f-ac:4)
* WPI-SMS4 (00-14-72:1)
Available Antennas: TX 0 RX 0
Supported interface modes:
* managed
* AP
* AP/VLAN
* monitor
* P2P-client
* P2P-GO
* P2P-device
Band 1:
Capabilities: 0x1072
HT20/HT40
Static SM Power Save
RX Greenfield
RX HT20 SGI
RX HT40 SGI
No RX STBC
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 16383 bytes (exponent: 0x001)
Minimum RX AMPDU time spacing: 16 usec (0x07)
HT TX/RX MCS rate indexes supported: 0-7
Bitrates (non-HT):
* 1.0 Mbps
* 2.0 Mbps (short preamble supported)
* 5.5 Mbps (short preamble supported)
* 11.0 Mbps (short preamble supported)
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
Frequencies:
* 2412 MHz [1](20.0 dBm)
* 2417 MHz [2](20.0 dBm)
* 2422 MHz [3](20.0 dBm)
* 2427 MHz [4](20.0 dBm)
* 2432 MHz [5](20.0 dBm)
* 2437 MHz [6](20.0 dBm)
* 2442 MHz [7](20.0 dBm)
* 2447 MHz [8](20.0 dBm)
* 2452 MHz [9](20.0 dBm)
* 2457 MHz [10](20.0 dBm)
* 2462 MHz [11](20.0 dBm)
* 2467 MHz [12](20.0 dBm)
* 2472 MHz [13](20.0 dBm)
* 2484 MHz 14
Band 2:
Capabilities: 0x72
HT20/HT40
Static SM Power Save
RX Greenfield
RX HT20 SGI
RX HT40 SGI
No RX STBC
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 16383 bytes (exponent: 0x001)
Minimum RX AMPDU time spacing: 16 usec (0x07)
HT TX/RX MCS rate indexes supported: 0-7
Bitrates (non-HT):
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
Frequencies:
* 5040 MHz 8
* 5060 MHz 12
* 5080 MHz 16
* 5170 MHz [34](23.0 dBm)
* 5180 MHz [36](23.0 dBm)
* 5190 MHz [38](23.0 dBm)
* 5200 MHz [40](23.0 dBm)
* 5210 MHz [42](23.0 dBm)
* 5220 MHz [44](23.0 dBm)
* 5230 MHz [46](23.0 dBm)
* 5240 MHz [48](23.0 dBm)
* 5260 MHz [52](20.0 dBm) (radar detection)
DFS state: usable (for 3330 sec)
DFS CAC time: 60000 ms
* 5280 MHz [56](20.0 dBm) (radar detection)
DFS state: usable (for 3330 sec)
DFS CAC time: 60000 ms
* 5300 MHz [60](20.0 dBm) (radar detection)
DFS state: usable (for 3330 sec)
DFS CAC time: 60000 ms
* 5320 MHz [64](20.0 dBm) (radar detection)
DFS state: usable (for 3330 sec)
DFS CAC time: 60000 ms
* 5500 MHz [100](25.0 dBm) (radar detection)
DFS state: usable (for 3330 sec)
DFS CAC time: 60000 ms
* 5520 MHz [104](25.0 dBm) (radar detection)
DFS state: usable (for 3330 sec)
DFS CAC time: 60000 ms
* 5540 MHz [108](25.0 dBm) (radar detection)
DFS state: usable (for 3330 sec)
DFS CAC time: 60000 ms
* 5560 MHz [112](25.0 dBm) (radar detection)
DFS state: usable (for 3330 sec)
DFS CAC time: 60000 ms
* 5580 MHz [116](25.0 dBm) (radar detection)
DFS state: usable (for 3330 sec)
DFS CAC time: 60000 ms
* 5600 MHz [120](25.0 dBm) (radar detection)
DFS state: usable (for 3330 sec)
DFS CAC time: 600000 ms
* 5620 MHz [124](25.0 dBm) (radar detection)
DFS state: usable (for 3330 sec)
DFS CAC time: 600000 ms
* 5640 MHz [128](25.0 dBm) (radar detection)
DFS state: usable (for 3330 sec)
DFS CAC time: 600000 ms
* 5660 MHz [132](25.0 dBm) (radar detection)
DFS state: usable (for 3330 sec)
DFS CAC time: 60000 ms
* 5680 MHz [136](25.0 dBm) (radar detection)
DFS state: usable (for 3330 sec)
DFS CAC time: 60000 ms
* 5700 MHz [140](25.0 dBm) (radar detection)
DFS state: usable (for 3330 sec)
DFS CAC time: 60000 ms
* 5745 MHz 149
* 5765 MHz 153
* 5785 MHz 157
* 5805 MHz 161
* 5825 MHz 165
Supported commands:
* new_interface
* set_interface
* new_key
* start_ap
* new_station
* new_mpath
* set_mesh_config
* set_bss
* authenticate
* associate
* deauthenticate
* disassociate
* join_ibss
* join_mesh
* remain_on_channel
* set_tx_bitrate_mask
* frame
* frame_wait_cancel
* set_wiphy_netns
* set_channel
* set_wds_peer
* start_sched_scan
* probe_client
* set_noack_map
* register_beacons
* start_p2p_device
* set_mcast_rate
* channel_switch
* Unknown command (104)
* connect
* disconnect
Supported TX frame types:
* IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
Supported RX frame types:
* IBSS: 0x40 0xb0 0xc0 0xd0
* managed: 0x40 0xd0
* AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* mesh point: 0xb0 0xc0 0xd0
* P2P-client: 0x40 0xd0
* P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* P2P-device: 0x40 0xd0
WoWLAN support:
* wake up on anything (device continues operating normally)
* wake up on pattern match, up to 5 patterns of 1-91 bytes,
maximum packet offset 0 bytes
software interface modes (can always be added):
* AP/VLAN
* monitor
valid interface combinations:
* #{ managed } <= 2, #{ AP, P2P-client, P2P-GO } <= 1, #{ P2P-device } <= 1,
total <= 3, #channels <= 2
* #{ AP } <= 2, #{ P2P-device } <= 1,
total <= 2, #channels <= 1, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz}

             * #{ managed } <= 1, #{ AP } <= 1, #{ P2P-client } <= 1, #{ P2P-device } <= 1,
               total <= 3, #channels <= 2
             * #{ managed } <= 1, #{ AP } <= 1, #{ P2P-client } <= 1, #{ P2P-device } <= 1,
               total <= 3, #channels <= 1, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz}

             * #{ managed } <= 1, #{ AP } <= 1, #{ P2P-GO } <= 1, #{ P2P-device } <= 1,
               total <= 3, #channels <= 1
    HT Capability overrides:
             * MCS: ff ff ff ff ff ff ff ff ff ff
             * maximum A-MSDU length
             * supported channel width
             * short GI for 40 MHz
             * max A-MPDU length exponent
             * min MPDU start spacing
    Device supports TX status socket option.
    Device supports HT-IBSS.
    Device supports SAE with AUTHENTICATE command
    Device supports scan flush.
    Device supports per-vif TX power setting
    Driver supports a userspace MPM

from raspap-webgui.

jrmhaig avatar jrmhaig commented on September 13, 2024

Thanks. Something to bear in mind is that all commands that need root access will have to be added to the sudoers file exactly as it will be called which can cause problems if, for example, it requires the interface name as an argument. So if you have

sudo iw dev wlan0 scan

Then this will only work for an interface called wlan0. This is a bit of a pain and I'm not sure how to get round it but there are probably ways of calling commands to dump all information for all devices. What we certainly don't want to do is give the www-data user full passwordless sudo access.

from raspap-webgui.

enrutador avatar enrutador commented on September 13, 2024

Hi Joseph

With awk and iwlist command I could adapt a little wpa_cli scan command output to be as much like your code structure.

sudo iwlist wlan0 scan | awk '/ESSID/ {gsub("ESSID:\""," ",$1); /"/ gsub("\""," ",$1); printf "%s ", $1} /Address/ {printf "%s ", $5} /Frequency/ {gsub("\)","",$4); printf "%s ", $4} /802.11i/ {gsub("802.11i/","",$3); print " ", $3}'

The output is :

00:19:77:1D:E8:94 13 LOVER WPA2

E2:41:36:64:50:50 1 MOVISTAR_5050 WPA2

F4:06:8D:27:FF:22 11 devolo-f4068d27ff22 WPA2

The only problem is if the network shows the SSDI with spaces. I upgrade my fork code for testing. I don´t know if is compatible wit raspberry, but with beaglebone its OK¡¡

Thanks

from raspap-webgui.

jrmhaig avatar jrmhaig commented on September 13, 2024

The PHP can be changed to deal with the output of iwlist instead of wpa_cli so it may not be necessary to have the complicated awk command. That can be done in PHP instead. In fact this is probably preferable if, as you say, an SSID can have spaces.

I haven't had a chance to try this out on a Raspberry Pi yet but I'll try to get round to it.

from raspap-webgui.

jrmhaig avatar jrmhaig commented on September 13, 2024

Your changes appear to work with Raspberry Pi (although I have only have a very brief look) but it needs /sbin/iwlist wlan0 scan added to the sudoers file in both the README and the installer script. Merge from upstream first (see https://help.github.com/articles/syncing-a-fork/) as I have made changes to make the sudoers file clearer.
I still think that for simplicity the complicated awk command should be avoided and the information picked out in the PHP.

from raspap-webgui.

enrutador avatar enrutador commented on September 13, 2024

Hi Joseph
Thanks for the information,now i working with de openvpn section, its interesting for me do the vpn client on the device.
Thanks

from raspap-webgui.

billz avatar billz commented on September 13, 2024

Closing this. Feel free to reopen it as needed.

from raspap-webgui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.