Jump to content

Building OpenWRT images for Orange Pi Zero with the Armbian kernel


hyphop

Recommended Posts

I had some time and willingness to try this Armbian based OpenWrt today. As i mentioned, i don't own Orange Pi Zero, but i try similar approach as described in this topic, to make some use of Orange Pi ONE, making it easy to set up router. Wifi module i used is Ralink RT3070 and i also tried to add second network interface with external USB gigabyte lan, based on Realtek RTL8153. I am using Armbian_5.25_Orangepione_Ubuntu_xenial_default_3.4.113, combined with OpenWrt root, i uploaded earlier in this topic.

I had usual problems with wifi network, as mentioned here. Scan was worked, but unable to connect, AP not worked. But is kind of opposite of this:

2. As long as I change the "wifi-device" and "option device" to 'wlan0' (I used 'radio0' before), scanning works in Luci, no matter what the "option path" is.

I can scan with "radio0" and can't with "wlan0" and can't connect with both. The important thing is, AP mode is working, at least with this wifi module. I had this error in system.log:

./mac80211.sh: eval: line 1: /usr/sbin/hostapd: not found

and it really isn't there. Then i install the full hostapd package along with hostapd-common and after reboot, AP mode is fully functional and stable so far. Interesting thing is, if i leave "radio0" in /etc/config/wireless , i still have this error message, but AP is starting successfully regardless of this. If i replace with "wlan0", error is gone, AP is working too. Doing this rename could make Luci buggie in wireless config section, but you always can add config manually.

If you have the same error about hostapd in Opi Zero, installing full hostapd package may help you too. But i have to mention, with this hostapd, scanning is not working at all.

 

My unsolved problem now, for what i could use some help, is my USB LAN. It is combined with USB hub, which is detecting by system and working, but LAN part is not. So, for now, without second network interface, i only have simple AP of OpiOne. I am pretty sure this module is what i need:

r8152

I compare lsmod list with my LamoboR1, working with OpenWrt, compiled with almost the same config, where my USB LAN is detecting and working. This is the only module in LaboboR1, that is not present in OpiONE about realtek devices. I tried insmod, which usually give segmentation fault:

root@OpenWrt:~# insmod r8152
Failed to find r8152. Maybe it is a built in module ?

Surprisingly for me modprobe is working here (looks like i can't figure it out how this combination work), but this module is missing:

root@OpenWrt:~#  modprobe r8152
failed to stat /lib/modules/3.4.113-sun8i/ #a long list of all linked modules
.
.
.
failed to find a module named r8152

If i understand - modules are loaded by Armbian and not OpenWrt and r8152 is not present? Do i have to compile new image of Armbian with this module enabled somewhere? Or is there another way to make this USB LAN to work?

Link to comment
Share on other sites

Well, I am so sorry to ask this stupid question, but is there any technical interest to do this, I mean there is plenty of old routers with 4 RJ45 connectors and all we need for few bucks, so why to go this hard way to have an Open WRT router ?

 

Please, this is not an agressive question, I just want to understand WHY you do this!

Link to comment
Share on other sites

Well, I am so sorry to ask this stupid question, but is there any technical interest to do this, I mean there is plenty of old routers with 4 RJ45 connectors and all we need for few bucks, so why to go this hard way to have an Open WRT router ?

 

Please, this is not an agressive question, I just want to understand WHY you do this!

Good question and my personal answer is - i need more than old fashion router. I have 2/3 simple routers around, my main old router was TpLink1043ND, for one reason - USB port. Good router, but weak performance, for anything more than routing. Very poor USB transfer to external HDD, CPU at 100% and still very slow speed. I added OpenWrt to it, so i can use minidlna, transmission and other programs, directly on router. Low consumption, 24/7 on. But this router (and most under 200$ coast), can't handle those tasks - minidlna crashes almost all the time, transmission - slower d/u speed (because of slower USB->SATA speed). I replace 1043ND with LamoboR1, a bit overkill, but do everything i need - i have stable DLNA, speed to HDD - can do better, but is satisfying and i plan to make it sort of NVR in near future. I know i can do this behind regular router with external devices, but i like all-in-one solutions and don't like forest of cables and boxes. Now i try to do the same with OrangePi, so i will have sort of backup, because there are some tweaks and fixes i need to make to R1 and can take a while.

 

About my above question, i see there is driver for RTL8150 based USB adapters in Armbian kernel config and it is enabled. But there is still no module r8152 in /lib/modules/3.4.113-sun8i/kernel/drivers/net/usb/. What module respond for this RTL8150 based USB adapters? cdc_ether maybe?

Can this do the job for RTL8153 - Linux driver for Linksys USB3GIGV1 (Realtek RTL8153) and if so, how can i integrate it in image, or in build environment?

Link to comment
Share on other sites

About my above question, i see there is driver for RTL8150 based USB adapters in Armbian kernel config and it is enabled. But there is still no module r8152 in /lib/modules/3.4.113-sun8i/kernel/drivers/net/usb/. What module respond for this RTL8150 based USB adapters? cdc_ether maybe?

Can this do the job for RTL8153 - Linux driver for Linksys USB3GIGV1 (Realtek RTL8153) and if so, how can i integrate it in image, or in build environment?

Makefile suggests that CONFIG_USB_RTL8150 kernel option produces rtl8150 kernel module. Module source contains this table:

/* table of devices that work with this driver */
static struct usb_device_id rtl8150_table[] = {
	{USB_DEVICE(VENDOR_ID_REALTEK, PRODUCT_ID_RTL8150)},
	{USB_DEVICE(VENDOR_ID_MELCO, PRODUCT_ID_LUAKTX)},
	{USB_DEVICE(VENDOR_ID_MICRONET, PRODUCT_ID_SP128AR)},
	{USB_DEVICE(VENDOR_ID_LONGSHINE, PRODUCT_ID_LCS8138TX)},
	{USB_DEVICE(VENDOR_ID_OQO, PRODUCT_ID_RTL8150)},
	{USB_DEVICE(VENDOR_ID_ZYXEL, PRODUCT_ID_PRESTIGE)},
	{}
};

which resolves to these VID:PID pairs:

0xbda:0x8150
0x0411:0x0012
0x3980:0x0003
0x07b8:0x401a
0x1557:0x8150
0x0586:0x401a

Any other devices are not supported by this driver (at least in the legacy kernel)

Link to comment
Share on other sites

Can this do the job for RTL8153 - Linux driver for Linksys USB3GIGV1 (Realtek RTL8153) and if so, how can i integrate it in image, or in build environment?

 

Look: https://forum.armbian.com/index.php/topic/1440-h3-devices-as-nas/ -- works out of the box with an 'out of the box' (not crippled) copy of Armbian.

 

OpenWRT IMO gets interesting when we've to deal with devices that have only 64MB DRAM or below. So if sometimes an interesting board will be released based on cheap V3s I might look into OpenWRT or buildroot otherwise I simply stay with Armbian since what do you gain switching to OpenWRT when there's enough DRAM available?

 

OpenWRT/LEDE being used as router/AP is clearly a bad idea with any of these cheap SBC since Wi-Fi performance on all of those single antenna, SDIO and 2.4 GHz band only implementations is crap, OPi Zero being the new definition of 'most crappy possible' ATM.

Link to comment
Share on other sites

OpenWRT IMO gets interesting when we've to deal with devices that have only 64MB DRAM or below. So if sometimes an interesting board will be released based on cheap V3s I might look into OpenWRT or buildroot otherwise I simply stay with Armbian since what do you gain switching to OpenWRT when there's enough DRAM available?

 

OpenWRT/LEDE being used as router/AP is clearly a bad idea with any of these cheap SBC since Wi-Fi performance on all of those single antenna, SDIO and 2.4 GHz band only implementations is crap, OPi Zero being the new definition of 'most crappy possible' ATM.

IMO OpenWRT is interesting if you use UCI driven configuration, i.e. for complicated firewall setup. It is a good choice or the only reasonable choice mostly if there is very little storage available - by throwing away unneeded options and heavyweight system libraries and combining read-only squashfs with overlayed jffs filesystems you can fit Linux based distribution in 4MiB onboard flash storage. DRAM at this point limits mostly what kind of heavyweight services you can use on the device.

Link to comment
Share on other sites

Makefile suggests that CONFIG_USB_RTL8150 kernel option produces rtl8150 kernel module. Module source contains this table:

I guess this is for old 10/100Mbit cards. I just tested CLI legacy Armbian and my USB RTL8153 card is working there. cdc_ether is the module loaded for it. So i have to see now, why it doesn't work the same way in OpenWrt over Armbian.

 

OpenWRT/LEDE being used as router/AP is clearly a bad idea with any of these cheap SBC since Wi-Fi performance on all of those single antenna, SDIO and 2.4 GHz band only implementations is crap, OPi Zero being the new definition of 'most crappy possible' ATM.

You are right, the idea of OpenWrt is to be used in slow IoT devices, but it's damn easy and user friendly for lazy and not so experienced persons like me. But the main reason is, my home router is not used only by me and other people are not so happy with CLI interface.

You are also right about AP capabilities of those cheap Oranges and Bananas. That's why i am using external adapters. Ralink3072 - my current AP source, doing what i need, 300Mbit. And i am about to do this hardware mod for R1, as soon as i have a backup. I bought this RT5572 module long ago and still waiting to be soldered.

Link to comment
Share on other sites

you can fit Linux based distribution in 4MiB onboard flash storage.

 

Which is nothing that applies to any of the devices Armbian runs on except maybe early OPi Zero boards with unpopulated SPI flash pads where people want to solder such small amounts of NOR flash to?

 

Anyway: this thread started with a simple claim: Replace Armbian userland with OpenWRT's and magically XR819 Wi-Fi is fixed (see page 1 and @hyphop's posts). While those people looking into the driver came to different conclusions: https://forum.armbian.com/index.php/topic/2808-orange-pi-zero-went-to-the-market/page-5 (interrupt handling and TX retransmits for whatever reasons, at least the latter doesn't look like fixable by exchanging the userland)

 

I believe a lot of people believe in OpenWRT making their Wi-Fi on OPi Zero working and that's all based on ping roundtrip times published by one single individual. I haven't seen any iperf3 numbers comparing the OpenWRT approach with Armbian in an identical environment and also know nothing about how those pings were generated (we know that H2+ legacy kernel has its own ideas about which interface to choose for packets, so in case OPi Zero was connected with both Ethernet and Wi-Fi packets might came back through Ethernet instead).

 

And if I would really want crappy Wi-Fi I would at least go for "Antenna diversity", search for my 'La fonera' somewhere lying around here and do this 'hardware hack' and then run OpenWRT on it. But since 2.4GHz band here is unusable in the meantime 5GHz are mandatory anyway.

Link to comment
Share on other sites

Anyway: this thread started with a simple claim: Replace Armbian userland with OpenWRT's and magically XR819 Wi-Fi is fixed (see page 1 and @hyphop's posts). While those people looking into the driver came to different conclusions: https://forum.armbian.com/index.php/topic/2808-orange-pi-zero-went-to-the-market/page-5 (interrupt handling and TX retransmits for whatever reasons, at least the latter doesn't look like fixable by exchanging the userland)

Well, this thread started before we learned how to properly disable power saving mode in NM, so "better performance" in some scenarios compared to stock Armbian was possible.

Link to comment
Share on other sites

Well, this thread started before we learned how to properly disable power saving mode in NM, so "better performance" in some scenarios compared to stock Armbian was possible.

 

Sure, but now we know better. We know that a lot of OPi Zero Wi-Fi issues were related to

  • Wi-Fi powermanagement active on all early Armbian images
  • loading of the driver failing due to some temporarely mistake (we need 2 occurences of driver name in /etc/modules)
  • legacy driver being more crappy than mainline variant

And we got 'performance numbers' with Armbian (mainline kernel in this case) that look similar: https://forum.armbian.com/index.php/topic/3271-orange-pi-zero-wifi-connection-issues/?p=23913 (though I don't consider ping roundtrip times performance numbers, but doing iperf3 measurements correctly would require to run the Zero with Armbian and OpenWRT in an otherwise absolutely identical setup where even time of the day matters).

 

So there really is no 'need' to use OpenWRT on this device, at least it doesn't fix magically Wi-Fi issues. Wi-Fi is crappy and will remain crappy on OPi Zero, this simply can't be fixed in software.

Link to comment
Share on other sites

I found the solution to my, module r8152/cdc_ether problem. Even if it's huge offtopic here, i will post the solution, just in case someone else face the same problem. cdc_ether.ko module is present and symlinked, but for some reason is not loaded in this OpenWrt solution. Looks like modprobe is not working either. So in regular Armbian_5.26_Orangepione_Ubuntu_xenial_default_3.4.113, i download realtek driver - RTL8153:

tar -xjvf 0007-r8152.53-2.08.0.bz2
cd r8152-2.08.0
make

Building will fail with some errors like:

error: implicit declaration of function 'usb_disable_lpm' [-Werror=implicit-function-declaration]

error: implicit declaration of function 'usb_enable_lpm' [-Werror=implicit-function-declaration]

So we need to edit file r8152.c and remove all lines contains "usb_disable_lpm" and "usb_enable_lpm", then it compiles successful. I don't know what this functions do and i hope it's not something important. Try to google, but find nothing. Refer to some files - drivers/usb/core/hub.c , include/linux/usb.h , which i can't find in Armbian and even if i do, don't know what to do further. Removing this lines worked :mellow:.

Basically we can install this module in Armbian:

sudo make install
sudo depmod -a

but i don't know how to replace cdc_ether with this module and i don't really need, as everything worked without it. We need to copy this r8152.ko file from r8152-2.08.0 directory and paste it in OpenWrt - /lib/modules/3.4.113-sun8i/kernel/drivers/net/usb, then symlink it like the rest (maybe simply copy to /lib/modules/3.4.113-sun8i is enough, but let's make it the same):

cd /lib/modules/3.4.113-sun8i
ln -s /lib/modules/3.4.113-sun8i/kernel/drivers/net/usb/r8152.ko

Reboot and module is loaded and my RTL8153 LAN is working - stable 1Gbit interface. I am happy :), it's time to make router of this OpiONE B).

I will upload compiled r8152.ko file here, if anyone need it.

r8152.zip

Link to comment
Share on other sites

I've flashed OpenWrt Chaos Calmer onto my sd card and followed this tutorial. I can SSH just fine but I can't get the built-in wifi to work as an access point, the driver module kmod-mac80211 is already installed, here's the /etc/config/wireless:

config wifi-device 'radio0'        
        option type 'mac80211'
        option hwmode '11g'
        option path 'platform/sunxi-mmc.1/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option htmode 'HT20'
        option disabled '0'
        option channel '1'


config wifi-iface
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'Orange Pi Zero'
        option encryption 'none'

How do I fix this? I know the performance of the built in wifi isn't great but I just want this thing to work.

Edited by zador.blood.stained
OpenWRT is discussed here
Link to comment
Share on other sites

I've flashed OpenWrt Chaos Calmer onto my sd card and followed this tutorial.

 

Crazy again. The next attempt to use OpenWRT with wrong kernel version and driver. Why do you guys do this? Combining OpenWRT with an outdated Allwinner kernel isn't really smart. Also you miss tons of fixes for the Wi-Fi driver (almost all of them are contained in Armbian's mainline kernel variant).

Link to comment
Share on other sites

For anyone stumbling accross this: No we don't need to edit anything, just use Armbian where 'it just works'. In case you think you 'need' OpenWRT on the OPi Zero to magically fix Wi-Fi or other urban myths: No we also don't 'need' this, explanations in post #71 and above.

Of course. I am sure OpenWrt will show no difference in performance for Opi Zero. From what i see it using Armbian modules and drivers. But i am not related to Opi Zero, i am using adapter with better performance. My main goal, except from useful and handle web configuration of Luci, is suitable firewall configuration. This was easiest solution for me, as i couldn't find anything so useful for regular linux server (maybe it's just lack of luck, during search). Ip tables are madness for me, too much jiberish, for even the simplest things. For Lamobo R1, i compiled OpenWrt with newer kernel, even if maser branch uses older. But there were some issues with sunxi packages, reporting incompatibility, unless add it during built. So i go back to regular version. Of course this is pure OpenWrt problem and have nothing related to Armbian. Just mention it.

For Orange Pi, maybe i will try to combine OpenWrt root from newer kernel branches, with mainline Armbian. And hope this packages problem is fixed (or built everything i need). At first, i just needed something that will at lest work.

Link to comment
Share on other sites

Crazy again. The next attempt to use OpenWRT with wrong kernel version and driver. Why do you guys do this? Combining OpenWRT with an outdated Allwinner kernel isn't really smart. Also you miss tons of fixes for the Wi-Fi driver (almost all of them are contained in Armbian's mainline kernel variant).

I'm sorry I'm not a linux expert, this is my first time of getting a single board computer. I just want the built-in wifi to work as an AP. Care to help on what to do to get it working ?

 

I just wanna test the built-in wifi myself, I know it doesn't work great and I'll get a usb wifi dongle soon however I still want to test the built-in wifi.

Link to comment
Share on other sites

I just wanna test the built-in wifi myself, I know it doesn't work great and I'll get a usb wifi dongle soon however I still want to test the built-in wifi.

Did you try to install full hostapd package and reboot, as i advised above? This worked on Ralink RT3070 USB wifi. About built-in module in Opi Zero i can't say. You can do this either from Luci or ssh:

opkg update
opkg install hostapd

Or you can try this OpenWrt - [share] OrangePiZero OpenWrt Chaos Calmer 15.05.1. I can't test it, don't have H2 device.

Link to comment
Share on other sites

Did you try to install full hostapd package and reboot, as i advised above? This worked on Ralink RT3070 USB wifi. About built-in module in Opi Zero i can't say. You can do this either from Luci or ssh:

opkg update
opkg install hostapd

Or you can try this OpenWrt - [share] OrangePiZero OpenWrt Chaos Calmer 15.05.1. I can't test it, don't have H2 device.

Thank you, I installed hostapd, the wifi shows up but I can't connect to it, on my android phone it keeps saying "Obtaining IP Address..." and on my PC it just keeps trying to connect to that wifi but always fails in the end.

 

 

Here's my /etc/config/wireless configuration:

 

config wifi-device  radio0
        option type     'mac80211'
        option channel  '11'
        option hwmode   '11g'
        option path     'platform/sunxi-mmc.1/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option htmode   'HT20'
        option disabled '0'


config wifi-iface
        option device   'radio0'
        option network  'lan'
        option mode     'ap'
        option ssid     'Orange Pi OpenWrt'
        option encryption 'none'

And here's the content of /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 interface 'lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.1.1'
        option ifname 'eth0'


config interface '3g'
        option proto '3g'
        option device '/dev/ttyUSB0'
        option service 'umts_only'
        option apn 'internet'


config interface 'eth1'
        option ifname 'eth1'
        option proto 'dhcp'


config interface 'usb0'
        option ifname 'usb0'
        option proto 'dhcp'


config interface 'wwan0'
        option ifname 'wwan0'
        option proto 'ncm'
        option apn 'internet'

/etc/config/dhcp:

config dnsmasq        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option localservice '1'


config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv6 'server'
        option ra 'server'


config dhcp 'wan'
        option interface 'wan'
        option ignore '1'


config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'

/etc/config/firewall:

config defaults                                 
        option syn_flood '1'                    
        option input 'ACCEPT'                   
        option output 'ACCEPT'                  
        option forward 'REJECT'                 
                                                
config zone                                     
        option name 'lan'                       
        list network 'lan'                      
        option input 'ACCEPT'                   
        option output 'ACCEPT'                  
        option forward 'ACCEPT'                 
                                                
config zone                                     
        option name 'wan'                       
        option input 'REJECT'                   
        option output 'ACCEPT'                  
        option forward 'REJECT'                 
        option masq '1'                         
        option mtu_fix '1'                      
        option network 'wan 3g eth1 usb0'       
                                                
config forwarding                               
        option src 'lan'                        
        option dest 'wan'                       
                                                
config rule                                     
        option name 'Allow-DHCP-Renew'          
        option src 'wan'                        
        option proto 'udp'                      
        option dest_port '68'                   
        option target 'ACCEPT'                  
        option family 'ipv4'                    
                                                
config rule                                     
        option name 'Allow-Ping'                
        option src 'wan'                        
        option proto 'icmp'                     
        option icmp_type 'echo-request'         
        option family 'ipv4'                    
        option target 'ACCEPT'                  
                                                
config rule                                     
        option name 'Allow-IGMP'                
        option src 'wan'                        
        option proto 'igmp'
        option family 'ipv4'                    
        option target 'ACCEPT'                  
                                                
config rule                                     
        option name 'Allow-DHCPv6'              
        option src 'wan'                        
        option proto 'udp'                      
        option src_ip 'fe80::/10'               
        option src_port '547'                   
        option dest_ip 'fe80::/10'              
        option dest_port '546'                  
        option family 'ipv6'                    
        option target 'ACCEPT'                  
                                                
config rule                                     
        option name 'Allow-MLD'                 
        option src 'wan'                        
        option proto 'icmp'                     
        option src_ip 'fe80::/10'               
        list icmp_type '130/0'                  
        list icmp_type '131/0'                  
        list icmp_type '132/0'                  
        list icmp_type '143/0'                  
        option family 'ipv6'                    
        option target 'ACCEPT'                  
                                                
config rule                                     
        option name 'Allow-ICMPv6-Input'        
        option src 'wan'                        
        option proto 'icmp'                     
        list icmp_type 'echo-request'           
        list icmp_type 'echo-reply'             
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'         
        list icmp_type 'time-exceeded'          
        list icmp_type 'bad-header'             
        list icmp_type 'unknown-header-type'    
        list icmp_type 'router-solicitation'    
        list icmp_type 'neighbour-solicitation' 
        list icmp_type 'router-advertisement'   
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'                 
        option family 'ipv6'                    
        option target 'ACCEPT'


config rule                                     
        option name 'Allow-ICMPv6-Forward'      
        option src 'wan'                        
        option dest '*'                         
        option proto 'icmp'                     
        list icmp_type 'echo-request'           
        list icmp_type 'echo-reply'             
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'         
        list icmp_type 'time-exceeded'          
        list icmp_type 'bad-header'             
        list icmp_type 'unknown-header-type'    
        option limit '1000/sec'                 
        option family 'ipv6'                    
        option target 'ACCEPT'                  
                                                
config include                                  
        option path '/etc/firewall.user'        
                                                
config rule                                     
        option src 'wan'                        
        option dest 'lan'                       
        option proto 'esp'                      
        option target 'ACCEPT'                  
                                                
config rule                                     
        option src 'wan'                        
        option dest 'lan'                       
        option dest_port '500'                  
        option proto 'udp'                      
        option target 'ACCEPT'

 

 

How do I fix this? I'm sorry for the long post 

Edited by zador.blood.stained
Added spoiler tags
Link to comment
Share on other sites

 

Thank you, I installed hostapd, the wifi shows up but I can't connect to it, on my android phone it keeps saying "Obtaining IP Address..." and on my PC it just keeps trying to connect to that wifi but always fails in the end. Here's my /etc/config/wireless configuration:

 

So this generally work. It's good to know. When you connect your PC to LAN port, did you obtain IP address? Maybe it's too dumb to ask but, when you create your wifi interface, did you bridge it with lan interface? I don't see "option type 'bridge' ", in your /etc/config/network , lan section. You can check this in LuCi, Physical Settings of Interfaces. I don't remember where it's declared in config files. Where did you get eth1 interface from? USB LAN maybe? If you have this interface behind router as dhcp, you can bridge your wifi to it instead, to obtain IP directly from this router, to test if dhcp of OP Zero is the problem. And it's better to replace 'radio0' with 'wlan0' in /etc/config/wireless. I wrote about this here - https://forum.armbian.com/index.php/topic/3025-building-openwrt-images-for-orange-pi-zero-with-the-armbian-kernel/page-3#entry26045.

Link to comment
Share on other sites

So this generally work. It's good to know. When you connect your PC to LAN port, did you obtain IP address? Maybe it's too dumb to ask but, when you create your wifi interface, did you bridge it with lan interface? I don't see "option type 'bridge' ", in your /etc/config/network , lan section. You can check this in LuCi, Physical Settings of Interfaces. I don't remember where it's declared in config files. Where did you get eth1 interface from? USB LAN maybe? If you have this interface behind router as dhcp, you can bridge your wifi to it instead, to obtain IP directly from this router, to test if dhcp of OP Zero is the problem. And it's better to replace 'radio0' with 'wlan0' in /etc/config/wireless. I wrote about this here - https://forum.armbian.com/index.php/topic/3025-building-openwrt-images-for-orange-pi-zero-with-the-armbian-kernel/page-3#entry26045.

I obtained an IP address, LAN is just fine but not with the wifi, if I add option type 'bridge' in the lan section then I can't access both LAN and WiFi. I have also installed hostapd-common but it didn't help, changing radio0 to wlan0 also didn't help. eth1 is from my 4G usb dongle. Any ideas on how to get it to work?

Link to comment
Share on other sites

I just want the built-in wifi to work as an AP. Care to help on what to do to get it working ?

 

Sorry, I fail to understand this. It's confirmed since ages that it 'just works' while one person claims you just can't use channel #1. Whole discussion and step-by-step instructions (not for OpenWRT of course): https://forum.armbian.com/index.php/topic/3584-orange-pi-zero-mainline-networkmanager-wlan-ap/

Link to comment
Share on other sites

I obtained an IP address, LAN is just fine but not with the wifi, if I add option type 'bridge' in the lan section then I can't access both LAN and WiFi. I have also installed hostapd-common but it didn't help, changing radio0 to wlan0 also didn't help. eth1 is from my 4G usb dongle. Any ideas on how to get it to work?

Simply adding option type 'bridge' is not enough. You have to declare what to bridge, but i can't remember where. That's why i am using LuCi web interface for such things. There is no way to misspell something or to worry about syntax. In OpenWrt is usual devs to change syntax from version to version - some values with ", become with ', or nothing, some other values like option type 'bridge', are used in lan section once, then in br0 section with something like - "option 'ifname' 'eth0 wlan0' ". I don't like such inconsistency, but have to deal with it. To avoid those problems, simply delete your wifi interface from LuCI Network->wifi (to be sure it's removed properly) and create it again from there with Network lan added, in Interface configuration -> General setup. Only this way you can be sure all syntax and config is correct. Then optionally edit /etc/config/wireless to replace radio0 with wlan0 and reboot. If this doesn't help, we talking about different problem, but let's exclude the obvious first.

Link to comment
Share on other sites

Simply adding option type 'bridge' is not enough. You have to declare what to bridge, but i can't remember where. That's why i am using LuCi web interface for such things. There is no way to misspell something or to worry about syntax. In OpenWrt is usual devs to change syntax from version to version - some values with ", become with ', or nothing, some other values like option type 'bridge', are used in lan section once, then in br0 section with something like - "option 'ifname' 'eth0 wlan0' ". I don't like such inconsistency, but have to deal with it. To avoid those problems, simply delete your wifi interface from LuCI Network->wifi (to be sure it's removed properly) and create it again from there with Network lan added, in Interface configuration -> General setup. Only this way you can be sure all syntax and config is correct. Then optionally edit /etc/config/wireless to replace radio0 with wlan0 and reboot. If this doesn't help, we talking about different problem, but let's exclude the obvious first.

 

Sorry, I fail to understand this. It's confirmed since ages that it 'just works' while one person claims you just can't use channel #1. Whole discussion and step-by-step instructions (not for OpenWRT of course): https://forum.armbian.com/index.php/topic/3584-orange-pi-zero-mainline-networkmanager-wlan-ap/

 

Alright, I gave up with the built in wifi, it's crap anyway, I purchased TP Link WN725N and installed the following packages:

kmod-ath
kmod-net-rtl8188eu
kmod-rtl8192cu
kmod-rtlwifi
kmod-usb2

Some more info:

 

 

root@OpenWrt:/# iwconfig
lo        no wireless extensions.


tunl0     no wireless extensions.


eth1      no wireless extensions.


wlan0     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm   
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
          
eth0      no wireless extensions.

iw list shows:

Wiphy phy1
Band 1:
Capabilities: 0x110
HT20
Static SM Power Save
RX Greenfield
RX STBC 1-stream
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 32767 bytes (exponent: 0x002)
Minimum RX AMPDU time spacing: No restriction (0x00)
HT TX/RX MCS rate indexes supported: 0-7
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) (no IR)
* 2472 MHz [13] (20.0 dBm) (no IR)
* 2484 MHz [14] (20.0 dBm) (no IR)
max # scan SSIDs: 2
max scan IEs length: 2257 bytes
Retry short limit: 7
Retry long limit: 4
Coverage class: 0 (up to 0m)
Available Antennas: TX 0 RX 0
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* mesh point
* P2P-client
* P2P-GO
valid interface combinations:
* #{ managed } <= 2, #{ AP } <= 1,
  total <= 3, #channels <= 1
* #{ managed } <= 3,
  total <= 3, #channels <= 1
* #{ managed } <= 2, #{ P2P-client, P2P-GO } <= 1,
  total <= 3, #channels <= 1
Device supports AP-side u-APSD.
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

lsusb shows it as:

Bus 002 Device 003: ID 0bda:8179 Realtek Semiconductor Corp.
root@OpenWrt:/# lsmod
ath                    13509  3 ath9k_htc
ath9k_common            2057  1 ath9k_htc
ath9k_htc              55064  0 
ath9k_hw              332769  2 ath9k_htc
btrfs                 712409  0 
cdc_ether               3679  1 rndis_host
cdc_wdm                 9089  1 qmi_wwan
ip6_tables             11310  3 ip6table_raw
ip6t_REJECT             2515  2 
ip6table_filter         1229  1 
ip6table_mangle         1468  1 
ip6table_raw            1161  1 
ip_tables              10600  4 iptable_nat
ipt_MASQUERADE          1593  1 
ipt_REJECT              2222  2 
iptable_filter          1277  1 
iptable_mangle          1384  1 
iptable_nat             3834  1 
iptable_raw             1209  1 
mac80211              358445  5 xradio_wlan
nf_conntrack           62083 10 iptable_nat
nf_conntrack_ftp        4968  1 nf_nat_ftp
nf_conntrack_ipv4      12191 10 iptable_nat
nf_conntrack_ipv6       6937  3 
nf_defrag_ipv4          1157  1 nf_conntrack_ipv4
nf_defrag_ipv6          5697  1 nf_conntrack_ipv6
nf_nat                 12998  3 iptable_nat
nf_nat_ftp              1449  0 
option                 23965  0 
qmi_wwan                5375  0 
rndis_host              5140  0 
rtl8192c_common        33420  1 rtl8192cu
rtl8192cu              61143  0 
rtlwifi                45784  1 rtl8192cu
but wifi detect can't detect my usb wifi
root@OpenWrt:/# wifi detect
config wifi-device  radio0
        option type     mac80211
        option channel  11
        option hwmode   11g
        option path     'platform/sunxi-mmc.1/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option htmode   HT20
        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 1


config wifi-iface
        option device   radio0
        option network  lan
        option mode     ap
        option ssid     OpenWrt
        option encryption none

 

 

How do I solve this?

Link to comment
Share on other sites

I can't see any problem. Try to add config for new module manually in /etc/config/wireless. You have to add correct path to your module in "option path". I can't say the correct order in your device. It is on some usb, you can check with lsusb -t and in /sys/devices. If you read the old posts here, it's discussed already. Other thing - you can try to make new image with my OpenWrt root, i uploaded here. My build is with it actually and there have to be most of wifi drivers and modules already built-it.

Yep, as i see in @zador.blood.stained post, you probably missing firmware.

Did you try to use LuCi, as i advice, for your build-in wifi, for correct setup and bridging? And what about this - [share] OrangePiZero OpenWrt Chaos Calmer 15.05.1. Isn't it easier?

 

For myself i can say this works very well so far. I am using it with OpiOne for 3/4 days now. It's rock stable with things i've done and describe in this topic. I wish there is original OpenWrt setup for H3, as for above for H2 (lucky you), but as in my country used to say - "when there is no fish, cancer could be fish".

There are two issues i found, but not so relevant. First there is this process - mountd -t, preventing my external HDD of stand-by. As it is not present in original OpenWrt, i decide it as some Armbian thing and simply disable it - no problems with this since. And i can't create SWAP in OpenWrt. It accept commands and config, but not using swap in practice. There is nothing in logs. Maybe it's some incompatibility between OpenWrt and Armbian, or is something about those reports of non working swap in latest Armbian. But for system like OpenWrt, provided for hardware with less RAM, it's not so important.

Link to comment
Share on other sites

10 hours ago, zador.blood.stained said:

These packages are for default OpenWRT kernel and don't affect the kernel in unofficial Zero builds. Also firmware may be missing for the realtek wireless adapters.

Now I just want to make the default onboard wifi work as an AP, I just figured out that WN725N isn't compatible with openwrt

10 hours ago, RagnerBG said:

I can't see any problem. Try to add config for new module manually in /etc/config/wireless. You have to add correct path to your module in "option path". I can't say the correct order in your device. It is on some usb, you can check with lsusb -t and in /sys/devices. If you read the old posts here, it's discussed already. Other thing - you can try to make new image with my OpenWrt root, i uploaded here. My build is with it actually and there have to be most of wifi drivers and modules already built-it.

Yep, as i see in @zador.blood.stained post, you probably missing firmware.

Did you try to use LuCi, as i advice, for your build-in wifi, for correct setup and bridging? And what about this - [share] OrangePiZero OpenWrt Chaos Calmer 15.05.1. Isn't it easier?

 

For myself i can say this works very well so far. I am using it with OpiOne for 3/4 days now. It's rock stable with things i've done and describe in this topic. I wish there is original OpenWrt setup for H3, as for above for H2 (lucky you), but as in my country used to say - "when there is no fish, cancer could be fish".

There are two issues i found, but not so relevant. First there is this process - mountd -t, preventing my external HDD of stand-by. As it is not present in original OpenWrt, i decide it as some Armbian thing and simply disable it - no problems with this since. And i can't create SWAP in OpenWrt. It accept commands and config, but not using swap in practice. There is nothing in logs. Maybe it's some incompatibility between OpenWrt and Armbian, or is something about those reports of non working swap in latest Armbian. But for system like OpenWrt, provided for hardware with less RAM, it's not so important.

I know that firmware https://forum.armbian.com/index.php/topic/3506-share-orangepizero-openwrt-chaos-calmer-15051/ but I want to learn how to build one myself, can you suggest me what packages I should include in the Image Builder to make the onboard wifi work as an AP?

Link to comment
Share on other sites

16 hours ago, RagnerBG said:

"when there is no fish, cancer could be fish".

I don't think you chose the correct word for the translation :D

"Lobster" or "crayfish" would be more correct

 

5 hours ago, hillz said:

I just figured out that WN725N isn't compatible with openwrt

It can't be "not compatible" with OpenWRT, it's just requires additional kernel modules and firmware. And it's probably a better option than built-in Xradio wireless on the Zero.

 

5 hours ago, hillz said:

I know that firmware https://forum.armbian.com/index.php/topic/3506-share-orangepizero-openwrt-chaos-calmer-15051/ but I want to learn how to build one myself, can you suggest me what packages I should include in the Image Builder to make the onboard wifi work as an AP?

Again, Image Builder does not support unofficial kernels, so you need to have hostapd (which is included by default), kernel driver and firmware.

Link to comment
Share on other sites

Guys I still can't get IP address when connecting to my openwrt wifi with the built-in wifi device.

logread shows:

Spoiler

Mon Mar  6 00:33:59 2017 daemon.info dnsmasq-dhcp[1397]: DHCP, IP range 192.168.1.100 -- 192.168.1.249, lease time 12h
Mon Mar  6 00:33:59 2017 daemon.info dnsmasq[1397]: using local addresses only for domain lan
Mon Mar  6 00:33:59 2017 daemon.warn dnsmasq[1397]: no servers found in /tmp/resolv.conf.auto, will retry
Mon Mar  6 00:33:59 2017 daemon.info dnsmasq[1397]: read /etc/hosts - 1 addresses
Mon Mar  6 00:33:59 2017 daemon.info dnsmasq[1397]: read /tmp/hosts/dhcp - 1 addresses
Mon Mar  6 00:33:59 2017 daemon.info dnsmasq-dhcp[1397]: read /etc/ethers - 0 addresses
Mon Mar  6 00:34:17 2017 daemon.warn odhcpd[1137]: DHCPV6 CONFIRM IA_NA from 00045828923d39467ac85122b5fc7e596b99 on eth0: not on-link 
Mon Mar  6 00:34:17 2017 daemon.info dnsmasq[1397]: read /etc/hosts - 1 addresses
Mon Mar  6 00:34:17 2017 daemon.info dnsmasq[1397]: read /tmp/hosts/odhcpd - 0 addresses
Mon Mar  6 00:34:17 2017 daemon.info dnsmasq[1397]: read /tmp/hosts/dhcp - 1 addresses
Mon Mar  6 00:34:17 2017 daemon.info dnsmasq-dhcp[1397]: read /etc/ethers - 0 addresses
Mon Mar  6 00:34:17 2017 daemon.warn odhcpd[1137]: DHCPV6 SOLICIT IA_NA from 00045828923d39467ac85122b5fc7e596b99 on eth0: no addresses available 
Mon Mar  6 00:34:18 2017 daemon.warn odhcpd[1137]: DHCPV6 SOLICIT IA_NA from 00045828923d39467ac85122b5fc7e596b99 on eth0: no addresses available 
Mon Mar  6 00:34:20 2017 daemon.warn odhcpd[1137]: DHCPV6 SOLICIT IA_NA from 00045828923d39467ac85122b5fc7e596b99 on eth0: no addresses available 
Mon Mar  6 00:34:24 2017 daemon.warn odhcpd[1137]: DHCPV6 SOLICIT IA_NA from 00045828923d39467ac85122b5fc7e596b99 on eth0: no addresses available 
Mon Mar  6 00:34:33 2017 daemon.warn odhcpd[1137]: DHCPV6 SOLICIT IA_NA from 00045828923d39467ac85122b5fc7e596b99 on eth0: no addresses available 
Mon Mar  6 00:34:49 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db IEEE 802.11: authentication OK (open system)
Mon Mar  6 00:34:49 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db MLME: MLME-AUTHENTICATE.indication(90:61:0c:14:cd:db, OPEN_SYSTEM)
Mon Mar  6 00:34:49 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db MLME: MLME-DELETEKEYS.request(90:61:0c:14:cd:db)
Mon Mar  6 00:34:49 2017 daemon.info hostapd: wlan1: STA 90:61:0c:14:cd:db IEEE 802.11: authenticated
Mon Mar  6 00:34:49 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db IEEE 802.11: association OK (aid 1)
Mon Mar  6 00:34:49 2017 daemon.info hostapd: wlan1: STA 90:61:0c:14:cd:db IEEE 802.11: associated (aid 1)
Mon Mar  6 00:34:49 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db MLME: MLME-ASSOCIATE.indication(90:61:0c:14:cd:db)
Mon Mar  6 00:34:49 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db MLME: MLME-DELETEKEYS.request(90:61:0c:14:cd:db)
Mon Mar  6 00:34:49 2017 daemon.info hostapd: wlan1: STA 90:61:0c:14:cd:db RADIUS: starting accounting session 58BCAE74-00000000
Mon Mar  6 00:35:12 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db IEEE 802.11: deauthenticated
Mon Mar  6 00:35:12 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db MLME: MLME-DEAUTHENTICATE.indication(90:61:0c:14:cd:db, 3)
Mon Mar  6 00:35:12 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db MLME: MLME-DELETEKEYS.request(90:61:0c:14:cd:db)

 

Some more info:

Spoiler

root@OpenWrt:/# 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 interface 'lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.1.1'
        option ifname 'eth0'

config interface '3g'
        option proto '3g'
        option device '/dev/ttyUSB0'
        option service 'umts_only'
        option apn 'internet'

config interface 'eth1'
        option ifname 'eth1'
        option proto 'dhcp'

config interface 'usb0'
        option ifname 'usb0'
        option proto 'dhcp'

config interface 'wwan0'
        option ifname 'wwan0'
        option proto 'ncm'
        option apn 'internet'

 

 


root@OpenWrt:/# cat /etc/config/dhcp 

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option localservice '1'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv6 'server'
        option ra 'server'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'

 

 


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

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'platform/sunxi-mmc.1/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option htmode 'HT20'
        option log_level '1'

config wifi-iface
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

How can I fix this?

Link to comment
Share on other sites

5 hours ago, hillz said:

Guys I still can't get IP address when connecting to my openwrt wifi with the built-in wifi device.

logread shows:

  Reveal hidden contents


Mon Mar  6 00:33:59 2017 daemon.info dnsmasq-dhcp[1397]: DHCP, IP range 192.168.1.100 -- 192.168.1.249, lease time 12h
Mon Mar  6 00:33:59 2017 daemon.info dnsmasq[1397]: using local addresses only for domain lan
Mon Mar  6 00:33:59 2017 daemon.warn dnsmasq[1397]: no servers found in /tmp/resolv.conf.auto, will retry
Mon Mar  6 00:33:59 2017 daemon.info dnsmasq[1397]: read /etc/hosts - 1 addresses
Mon Mar  6 00:33:59 2017 daemon.info dnsmasq[1397]: read /tmp/hosts/dhcp - 1 addresses
Mon Mar  6 00:33:59 2017 daemon.info dnsmasq-dhcp[1397]: read /etc/ethers - 0 addresses
Mon Mar  6 00:34:17 2017 daemon.warn odhcpd[1137]: DHCPV6 CONFIRM IA_NA from 00045828923d39467ac85122b5fc7e596b99 on eth0: not on-link 
Mon Mar  6 00:34:17 2017 daemon.info dnsmasq[1397]: read /etc/hosts - 1 addresses
Mon Mar  6 00:34:17 2017 daemon.info dnsmasq[1397]: read /tmp/hosts/odhcpd - 0 addresses
Mon Mar  6 00:34:17 2017 daemon.info dnsmasq[1397]: read /tmp/hosts/dhcp - 1 addresses
Mon Mar  6 00:34:17 2017 daemon.info dnsmasq-dhcp[1397]: read /etc/ethers - 0 addresses
Mon Mar  6 00:34:17 2017 daemon.warn odhcpd[1137]: DHCPV6 SOLICIT IA_NA from 00045828923d39467ac85122b5fc7e596b99 on eth0: no addresses available 
Mon Mar  6 00:34:18 2017 daemon.warn odhcpd[1137]: DHCPV6 SOLICIT IA_NA from 00045828923d39467ac85122b5fc7e596b99 on eth0: no addresses available 
Mon Mar  6 00:34:20 2017 daemon.warn odhcpd[1137]: DHCPV6 SOLICIT IA_NA from 00045828923d39467ac85122b5fc7e596b99 on eth0: no addresses available 
Mon Mar  6 00:34:24 2017 daemon.warn odhcpd[1137]: DHCPV6 SOLICIT IA_NA from 00045828923d39467ac85122b5fc7e596b99 on eth0: no addresses available 
Mon Mar  6 00:34:33 2017 daemon.warn odhcpd[1137]: DHCPV6 SOLICIT IA_NA from 00045828923d39467ac85122b5fc7e596b99 on eth0: no addresses available 
Mon Mar  6 00:34:49 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db IEEE 802.11: authentication OK (open system)
Mon Mar  6 00:34:49 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db MLME: MLME-AUTHENTICATE.indication(90:61:0c:14:cd:db, OPEN_SYSTEM)
Mon Mar  6 00:34:49 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db MLME: MLME-DELETEKEYS.request(90:61:0c:14:cd:db)
Mon Mar  6 00:34:49 2017 daemon.info hostapd: wlan1: STA 90:61:0c:14:cd:db IEEE 802.11: authenticated
Mon Mar  6 00:34:49 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db IEEE 802.11: association OK (aid 1)
Mon Mar  6 00:34:49 2017 daemon.info hostapd: wlan1: STA 90:61:0c:14:cd:db IEEE 802.11: associated (aid 1)
Mon Mar  6 00:34:49 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db MLME: MLME-ASSOCIATE.indication(90:61:0c:14:cd:db)
Mon Mar  6 00:34:49 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db MLME: MLME-DELETEKEYS.request(90:61:0c:14:cd:db)
Mon Mar  6 00:34:49 2017 daemon.info hostapd: wlan1: STA 90:61:0c:14:cd:db RADIUS: starting accounting session 58BCAE74-00000000
Mon Mar  6 00:35:12 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db IEEE 802.11: deauthenticated
Mon Mar  6 00:35:12 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db MLME: MLME-DEAUTHENTICATE.indication(90:61:0c:14:cd:db, 3)
Mon Mar  6 00:35:12 2017 daemon.debug hostapd: wlan1: STA 90:61:0c:14:cd:db MLME: MLME-DELETEKEYS.request(90:61:0c:14:cd:db)

 

Some more info:

  Reveal hidden contents


root@OpenWrt:/# 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 interface 'lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.1.1'
        option ifname 'eth0'

config interface '3g'
        option proto '3g'
        option device '/dev/ttyUSB0'
        option service 'umts_only'
        option apn 'internet'

config interface 'eth1'
        option ifname 'eth1'
        option proto 'dhcp'

config interface 'usb0'
        option ifname 'usb0'
        option proto 'dhcp'

config interface 'wwan0'
        option ifname 'wwan0'
        option proto 'ncm'
        option apn 'internet'

 

 



root@OpenWrt:/# cat /etc/config/dhcp 

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option localservice '1'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv6 'server'
        option ra 'server'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'

 

 



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

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'platform/sunxi-mmc.1/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option htmode 'HT20'
        option log_level '1'

config wifi-iface
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

How can I fix this?

Hm, your wlan is bridged with lan interface, now i see. And dnsmasq look exactly like mine. Only difference i see is in your lan interface. This is how mine look like in /etc/config/network:

config interface 'lan'
	option type 'bridge'
	option _orig_ifname 'eth0'
	option _orig_bridge 'true'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ifname 'eth1'
	option ipaddr '192.168.1.1'
	option delegate '0'

Except of unnecessary ip6 and the replacement of eth0 with my external eth1, i don't see any difference, except your interface to be configured as bridge - "option _orig_bridge 'true' ". How is your interface look like in LuCi? In Network->Interfaces for LAN have to be br-lan with bridged eth0 and wifi interface, not just eth0. In Physical Settings, Bridge interfaces have to be checked and also Ethernet Adapter: "eth0", plus Wireless Network: Master "OpenWrt". Of course br-lan have to be present, you can check with ifconfig / ifconfig -a . If it's not there, i have no idea. Try to make new image with my root. Also, what happens if you add static addresses to your wifi client? Did it connects and have ping?

Other thing in your logs. I assume this wlan1 is your build in wifi card. But in your config in /etc/config/wireless it is still radio0. Better change it to wlan1.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines