AP+STA Help Please SOLVED

rcpaul
 
Posts: 39
Joined: Sun Nov 09, 2014 4:20 am

AP+STA Help Please SOLVED

Thu Dec 15, 2016 7:19 am

Hello

I'm trying to connect with AP+STA so I can run "opkg update" and install python mini but I'm having difficulty. I believe it connects to my router OK but it doesn't allow the downloads for "opkg update". Here's what iwinfo says, my home network name is "GXS4N":

apcli0 ESSID: "GXS4N"
Access Point: 18:1B:EB:C3:4C:81
Mode: Client Channel: 6 (2.437 GHz)
Tx-Power: 17 dBm Link Quality: unknown/100
Signal: unknown Noise: unknown
Bit Rate: 150.0 MBit/s
Encryption: unknown
Type: wext HW Mode(s): 802.11bg
Hardware: unknown [Generic WEXT]
TX power offset: unknown
Frequency offset: unknown
Supports VAPs: no PHY name: apcli0

apcli1 ESSID: unknown
Access Point: 00:00:00:00:00:00
Mode: Client Channel: 6 (2.437 GHz)
Tx-Power: 17 dBm Link Quality: unknown/100
Signal: unknown Noise: unknown
Bit Rate: 150.0 MBit/s
Encryption: unknown
Type: wext HW Mode(s): 802.11bg
Hardware: unknown [Generic WEXT]
TX power offset: unknown
Frequency offset: unknown
Supports VAPs: no PHY name: apcli1

ra0 ESSID: "VoCore2"
Access Point: 00:0C:43:E1:76:28
Mode: Client Channel: 6 (2.437 GHz)
Tx-Power: 17 dBm Link Quality: 10/100
Signal: -256 dBm Noise: -70 dBm
Bit Rate: 150.0 MBit/s
Encryption: unknown
Type: wext HW Mode(s): 802.11bg
Hardware: unknown [Generic WEXT]
TX power offset: unknown
Frequency offset: unknown
Supports VAPs: no PHY name: ra0

And cat /etc/config/network:

config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'

config globals 'globals'
option ula_prefix 'fd47:f447:6340::/48'

config interface 'lan'
option ifname 'eth0.1'
option force_link '1'
option macaddr '00:0c:43:e1:76:28'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'

config interface 'wan'
option ifname 'eth0.2'
option force_link '1'
option macaddr '00:0c:43:e1:76:29'
option proto 'dhcp'

config interface 'wan6'
option ifname 'eth0.2'
option proto 'dhcpv6'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '1 2 3 4 6t'

config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0 6t'
Last edited by rcpaul on Fri Dec 30, 2016 6:30 am, edited 1 time in total.

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

Re: AP+STA Help Please

Thu Dec 15, 2016 9:20 am

Are you connected to the internet?
Code: Select all
root@vocore2:/# ping -c3 google.com
PING google.com (74.125.196.113): 56 data bytes
64 bytes from 74.125.196.113: seq=0 ttl=46 time=34.627 ms
64 bytes from 74.125.196.113: seq=1 ttl=46 time=55.006 ms
64 bytes from 74.125.196.113: seq=2 ttl=46 time=27.283 ms

--- google.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 27.283/38.972/55.006 ms


Can opkg find a repo?
Code: Select all
 root@vocore2:/# opkg update
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ramips/mt7628/packages/base/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_base.
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ramips/mt7628/packages/base/Packages.sig.
Signature check passed.
<snip>
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ramips/mt7628/packages/management/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_management.
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ramips/mt7628/packages/management/Packages.sig.
Signature check passed.
root@vocore2:/#


Is the package you want available?
Code: Select all
root@vocore2:/# opkg find python*
python - 2.7.9-6 - This package contains the (almost) full Python install.
 It's python-light + all other packages.
python-base - 2.7.9-6 - This package contains only the interpreter and the bare minimum
 for the interpreter to start.
python-codecs - 2.7.9-6 - Python 2.7 codecs + unicode support
python-compiler - 2.7.9-6 - Python 2.7 compiler module
<snip>
python3-sqlite3 - 3.4.3-2 - Python 3.4 sqlite3 module
python3-unittest - 3.4.3-2 - Python 3.4 unittest module
python3-xml - 3.4.3-2 - Python 3.4 xml libs
root@vocore2:/#

rcpaul
 
Posts: 39
Joined: Sun Nov 09, 2014 4:20 am

Re: AP+STA Help Please

Thu Dec 15, 2016 12:40 pm

I think I'm connected to the router but not the internet, how do I troubleshoot now?

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

Re: AP+STA Help Please

Thu Dec 15, 2016 3:19 pm

What does
Code: Select all
ping google.com
say?

Copy/paste is your friend!

rcpaul
 
Posts: 39
Joined: Sun Nov 09, 2014 4:20 am

Re: AP+STA Help Please

Thu Dec 15, 2016 4:48 pm

root@OpenWrt:~# ping google.com
PING google.com (216.58.193.206): 56 data bytes
^C
--- google.com ping statistics ---
85 packets transmitted, 0 packets received, 100% packet loss
root@OpenWrt:~# ping google.com
PING google.com (216.58.193.206): 56 data bytes
^C
--- google.com ping statistics ---
21 packets transmitted, 0 packets received, 100% packet loss
root@OpenWrt:~#

root@OpenWrt:~# iwinfo
apcli0 ESSID: "rfGuest"
Access Point: 88:F0:31:AD:54:E3
Mode: Client Channel: 6 (2.437 GHz)
Tx-Power: 17 dBm Link Quality: unknown/100
Signal: unknown Noise: unknown
Bit Rate: 150.0 MBit/s
Encryption: unknown
Type: wext HW Mode(s): 802.11bg
Hardware: unknown [Generic WEXT]
TX power offset: unknown
Frequency offset: unknown
Supports VAPs: no PHY name: apcli0

apcli1 ESSID: unknown
Access Point: 00:00:00:00:00:00
Mode: Client Channel: 6 (2.437 GHz)
Tx-Power: 17 dBm Link Quality: unknown/100
Signal: unknown Noise: unknown
Bit Rate: 150.0 MBit/s
Encryption: unknown
Type: wext HW Mode(s): 802.11bg
Hardware: unknown [Generic WEXT]
TX power offset: unknown
Frequency offset: unknown
Supports VAPs: no PHY name: apcli1

ra0 ESSID: "VoCore2"
Access Point: 00:0C:43:E1:76:28
Mode: Client Channel: 6 (2.437 GHz)
Tx-Power: 17 dBm Link Quality: 10/100
Signal: -256 dBm Noise: -83 dBm
Bit Rate: 150.0 MBit/s
Encryption: unknown
Type: wext HW Mode(s): 802.11bg
Hardware: unknown [Generic WEXT]
TX power offset: unknown
Frequency offset: unknown
Supports VAPs: no PHY name: ra0

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

Re: AP+STA Help Please

Thu Dec 15, 2016 7:18 pm

What does does /etc/config/wireless look like?
You may want to obfuscate your wifi key, but make sure it matches your router's key.
Code: Select all
root@vocore2:/# cat /etc/config/wireless
config wifi-device   radio0
   option type     ralink
   option variant   mt7628
   option country   TW
   option hwmode   11g
   option htmode   HT40
   option channel  auto

config wifi-iface ap
   option device   radio0
   option mode   ap
   option network  lan
   option ifname   ra0
   option ssid   VoCore2
   option key   '12345678'
   option encryption psk2

config wifi-iface sta
   option device   radio0
   option mode   sta
   option network  wwan
   option ifname   apcli0
   option ssid   'elbono-home'
   option key   'XXXXXXXX'
   option encryption psk2


And what ifconfig say?
Code: Select all
root@vocore2:/# ifconfig
apcli0    Link encap:Ethernet  HWaddr 02:0C:43:01:76:28 
          inet addr:192.168.3.240  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::c:43ff:fe01:7628/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:5 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

br-lan    Link encap:Ethernet  HWaddr B2:8D:65:22:54:F1 
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fdcb:6abb:586f::1/60 Scope:Global
          inet6 addr: fe80::b08d:65ff:fe22:54f1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2652 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:245168 (239.4 KiB)

eth0      Link encap:Ethernet  HWaddr D2:6F:98:55:24:10 
          inet6 addr: fe80::d06f:98ff:fe55:2410/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13479 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:4401855 (4.1 MiB)
          Interrupt:5

eth0.1    Link encap:Ethernet  HWaddr D2:6F:98:55:24:10 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:828 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:88895 (86.8 KiB)

eth0.2    Link encap:Ethernet  HWaddr B2:8D:65:22:54:F2 
          inet6 addr: fe80::b08d:65ff:fe22:54f2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12613 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:4253083 (4.0 MiB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:388 errors:0 dropped:0 overruns:0 frame:0
          TX packets:388 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:27928 (27.2 KiB)  TX bytes:27928 (27.2 KiB)

ra0       Link encap:Ethernet  HWaddr 00:0C:43:E1:76:28 
          inet6 addr: fe80::20c:43ff:fee1:7628/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:482112 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26390 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:85782625 (81.8 MiB)  TX bytes:604898 (590.7 KiB)
          Interrupt:6

rcpaul
 
Posts: 39
Joined: Sun Nov 09, 2014 4:20 am

Re: AP+STA Help Please

Fri Dec 16, 2016 1:58 am

Well I'm glad I bought a bunch of Vocore's cause this is the third one I'm using, I keep disabling the wifi and I don't have the USB to UART converter with me.

Here's the /etc/config/wireless:

root@OpenWrt:~# cat /etc/config/wireless

config wifi-device 'radio0'
option type 'ralink'
option variant 'mt7628'
option country 'CN'
option hwmode '11g'
option htmode 'HT40'
option channel 'auto'
option disabled '0'

config wifi-iface 'ap'
option device 'radio0'
option mode 'ap'
option network 'lan'
option ifname 'ra0'
option ssid 'VoCore2'
option encryption 'none'

config wifi-iface 'sta'
option device 'radio0'
option mode 'sta'
option network 'wwan'
option ifname 'apcli0'
option led 'mediatek:orange:wifi'
option encryption 'psk'
option ssid 'rfGuest'
option disabled '1'

and ifconfig:

root@OpenWrt:~# ifconfig
apcli0 Link encap:Ethernet HWaddr 02:0C:43:01:76:28
inet6 addr: fe80::c:43ff:fe01:7628/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

br-lan Link encap:Ethernet HWaddr 00:0C:43:E1:76:28
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fd47:f447:6340::1/60 Scope:Global
inet6 addr: fe80::20c:43ff:fee1:7628/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2009 errors:0 dropped:0 overruns:0 frame:0
TX packets:219 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:134559 (131.4 KiB) TX bytes:31127 (30.3 KiB)

eth0 Link encap:Ethernet HWaddr 06:37:37:AF:04:E9
inet6 addr: fe80::437:37ff:feaf:4e9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:565 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:110719 (108.1 KiB)
Interrupt:5

eth0.1 Link encap:Ethernet HWaddr 06:37:37:AF:04:E9
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:114 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:13305 (12.9 KiB)

eth0.2 Link encap:Ethernet HWaddr 00:0C:43:E1:76:29
inet6 addr: fe80::20c:43ff:fee1:7629/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:85 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:23325 (22.7 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:650 errors:0 dropped:0 overruns:0 frame:0
TX packets:650 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:45184 (44.1 KiB) TX bytes:45184 (44.1 KiB)

ra0 Link encap:Ethernet HWaddr 00:0C:43:E1:76:28
inet6 addr: fe80::20c:43ff:fee1:7628/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:27840 errors:79 dropped:0 overruns:0 frame:0
TX packets:7646 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5574020 (5.3 MiB) TX bytes:242186 (236.5 KiB)
Interrupt:6

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

Re: AP+STA Help Please

Fri Dec 16, 2016 1:57 pm

I see a couple of things, I'll post details when I'm in front of a computer.

Some more info will help though. Do you know vim? Please post contents of /etc/rc.local. what is rfGuest and is it secured or open?

rcpaul
 
Posts: 39
Joined: Sun Nov 09, 2014 4:20 am

Re: AP+STA Help Please

Fri Dec 16, 2016 4:51 pm

I'm not really sure about vim, is it when you vi to a folder and make changes? etc: vi network? If so I'm some what similar with it. I'm not sure how to get to /etc/rc.local but this is what I tried:

root@OpenWrt:~# cd /etc/rc.local
-ash: cd: can't cd to /etc/rc.local
root@OpenWrt:~# cat /etc/rc.local
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

exit 0
root@OpenWrt:~# cd /etc/
root@OpenWrt:/etc# rc.local
-ash: rc.local: not found
root@OpenWrt:/etc#


rfGuest is open but I'm in a hospital right now and it just requires an "accept" screen to access the internet. I know I've been able to use this type of connection with Vocore before. If you look closely I've been moving around while trying to troubleshoot this issue, first was my home network "weefee", then my wife's parents network "GXS4N", and now the hospital "rfGuest". "weefee" and "GXS4N" require keys and "rfGuest" is open and only requires the "accept" screen.

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

Re: AP+STA Help Please

Fri Dec 16, 2016 10:40 pm

Vim is "vi improved", on OpenWrt it is a busybox version which is somewhere between vi and vim. It is the default editor in OpenWrt, you'll want to learn it or install pico which is much easier to learn but less powerful. Whatever you do that is for another day, it sounds like you will be more likely to find happiness if I don't tell you to use vim to change a file.

I'm sure it is possible to login to a network with a web accept page but I don't know how and I think it will take a few attempts to get right so I'll stick to networks that don't need that here.

First we need to set up rc.local.

Code: Select all
root@vocore2:/# echo "uci set wireless.sta.disabled=0" > /root/temp
root@vocore2:/# echo "uci commit" >> /root/temp
root@vocore2:/# echo "/etc/init.d/network restart" >> /root/temp
root@vocore2:/# echo "sleep 10" >> /root/temp
root@vocore2:/# echo "uci set wireless.sta.disabled=1" >> /root/temp
root@vocore2:/# echo "uci commit" >> /root/temp
root@vocore2:/# cat /root/temp
uci set wireless.sta.disabled=0
uci commit
/etc/init.d/network restart
sleep 10
uci set wireless.sta.disabled=1
uci commit
root@vocore2:/#


If when you cat the temp file if it doesn't match this exactly erase it with rm /root/temp and start over.
Once it looks good put it together with rc.local:
Code: Select all
root@vocore2:/# cp /etc/rc.local /root/rc.local
root@vocore2:/# cat /root/temp /root/rc.local > /etc/rc.local
root@vocore2:/# cat /etc/rc.local
uci set wireless.sta.disabled=0
uci commit
/etc/init.d/network restart
sleep 10
uci set wireless.sta.disabled=1
uci commit
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

exit 0



Now fix your /etc/config/wireless:

Code: Select all
uci set wireless.sta.ssid='GXS4N'
uci set wireless.sta.key='SecretKey'
uci commit

Check it to be sure it is right:
Code: Select all
root@OpenWrt:~# cat /etc/config/wireless

config wifi-device 'radio0'
option type 'ralink'
option variant 'mt7628'
option country 'CN'
option hwmode '11g'
option htmode 'HT40'
option channel 'auto'
option disabled '0'

config wifi-iface 'ap'
option device 'radio0'
option mode 'ap'
option network 'lan'
option ifname 'ra0'
option ssid 'VoCore2'
option encryption 'none'

config wifi-iface 'sta'
option device 'radio0'
option mode 'sta'
option network 'wwan'
option ifname 'apcli0'
option led 'mediatek:orange:wifi'
option encryption 'psk'
option ssid 'GXS4N'
option key 'SecretKey'
option disabled '1'

And last you need to add wwan to your /etc/config/network:
Code: Select all
root@vocore2:/# uci set network.wwan=interface
root@vocore2:/# uci set network.wwan.proto=dhcp
root@vocore2:/# uci commit

Check it, at the bottom you should have wwan as a dhcp interface
Code: Select all
root@vocore2:/# cat /etc/config/network

config interface 'loopback'
   option ifname 'lo'
   option proto 'static'
   option ipaddr '127.0.0.1'
   option netmask '255.0.0.0'

<snip>
config switch_vlan
   option device 'switch0'
   option vlan '2'
   option ports '4 6t'

config interface 'wwan'
   option proto 'dhcp'



Go back, double check /etc/rc.local, /etc/config/wireless and /etc/config/network, make sure they are set up like above.

Reboot the VoCore2 and it should bring up the AP and several seconds later connect to the wireless network.

Ifconfig should show an IP address associated with the sta and ping should work.

Code: Select all
root@vocore2:/# ifconfig |grep -C5 apcli
apcli0    Link encap:Ethernet  HWaddr 02:0C:43:01:76:28 
          inet addr:192.168.3.240  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::c:43ff:fe01:7628/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
root@vocore2:/# ping -c3 google.com
PING google.com (74.125.138.139): 56 data bytes
64 bytes from 74.125.138.139: seq=0 ttl=46 time=28.796 ms
64 bytes from 74.125.138.139: seq=1 ttl=46 time=42.748 ms
64 bytes from 74.125.138.139: seq=2 ttl=46 time=44.045 ms

--- google.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 28.796/38.529/44.045 ms
root@vocore2:/#

Next
Return to VoCore2/Lite/Ultimate

Who is online

Users browsing this forum: Google [Bot] and 45 guests