OpenWrt Forum Archive

Topic: WR1043ND v1.8 + 10.03.1-rc5: No WiFI

The content of this topic has been archived on 3 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I think I read here something in the past about this issue but am not able to find it again.
Any hint, please please?

(Last edited by uqbar on 8 Sep 2011, 09:42)

Wireless in OpenWRT is disabled by default you either have to edit /etc/config/wireless or enable it by Luci

I knew that. The point is that even after I've enabled the device in Network-->WiFi the WLAN led stays off and, of course, there's no SSID in the air!

uqbar wrote:

I knew that. The point is that even after I've enabled the device in Network-->WiFi the WLAN led stays off and, of course, there's no SSID in the air!

I can see there's no hostapd running...

uqbar wrote:
uqbar wrote:

I knew that. The point is that even after I've enabled the device in Network-->WiFi the WLAN led stays off and, of course, there's no SSID in the air!

I can see there's no hostapd running...

I made some steps forward and one backward.
I installed "ATTITUDE ADJUSTMENT (bleeding edge, r28173)" from trunk.
Now WiFi seems to be working (I can detect the SSID and see the WLAN led is on).
But there was no web UI!
Luckily, as my usual, I had previously enabled SSH on LAN so I could log with CLI.

# opkg list-installed | grep -i luci
# _

Nothing related to LuCi was installed.
As this is a trunk build, I (luckily) checked the opkg configuration in /etc/opkg.conf and fixed it with vi editor like this:

#src/gz packages http://downloads.openwrt.org/backfire/10.03/ar71xx/packages WRONG
src/gz packages http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay

Then I've done:

# opkg update
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz.
Inflating http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/packages.
# opkg install luci
Installing luci (trunk+svn7464-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci_trunk+svn7464-1_ar71xx.ipk.
Installing luci-mod-admin-full (trunk+svn7464-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-mod-admin-full_trunk+svn7464-1_ar71xx.ipk.
...
Configuring luci-app-firewall.
Configuring luci-lib-ipkg.
Configuring luci-mod-admin-full.
//usr/lib/opkg/info/luci-mod-admin-full.postinst: line 6: /etc/init.d/luci_bwc: not found
//usr/lib/opkg/info/luci-mod-admin-full.postinst: line 6: /etc/init.d/luci_bwc: not found
Configuring luci.
Collected errors:
 * resolve_conffiles: Existing conffile /etc/config/luci is different from the conffile in the new package. The new conffile will be placed at /etc/config/luci-opkg.
# _

And here I stop as I've little idea on how to go on.
Any idea?

It could be as simple as doing:

mv /etc/config/luci-opkg /etc/config/luci

And then (re)starting uhttpd with "/etc/init.d/uhttpd restart"

Thanks,

Sam

# mv /etc/config/luci-opkg /etc/config/luci
# /etc/init.d/lucid start
Starting LuCId superserver: lucidlua: error loading module 'uci' from file '/usr/lib/lua/uci.so':
        File not found
stack traceback:
        [C]: ?
        [C]: in function 'require'
        /usr/lib/lua/luci/model/uci.lua:27: in main chunk
        [C]: in function 'require'
        /usr/lib/lua/luci/lucid.lua:17: in main chunk
        [C]: ?
        [C]: ?

:-(

How to flash a firmware image by CLI?

(Last edited by uqbar on 8 Sep 2011, 15:49)

Ouch. Looks like your UCI / LuCI install is in a mess.

You can flash from the CLI using the following (I would suggest using a "-factory.bin" image at this point):

mtd -r write <image.bin> firmware

Thanks,

Sam

Well, before jumping out of the sinking boat I'd like to try to fix it.
Unless the trunk packages are broken, which packages should I pull in in order to have a minimal web UI?

You are confusing me: one day you edit the topic about flashing from cli in the wiki, today you claim not to know how to do that?!
Anyway, I would recommend to flash again (most likely a full image like Sam mentioned, not just a sysupgrade - you might have configs in the filesystem which don't fit with the version of the new packages) and after that follow the wiki step by step. If that does not work, post a log of all the steps you took.

I apologize if I confused anyone. I have a somehow decent knowledge about *nix administration but am also willing to use web UIs as much as I can.
I've tried to use 10.03.1-rc5 with just the web UI. But wifi is not wirking at all.
With CLI I've seen the hostapd was not running and had little idea on how to manually start it.
So I did an installation of trunk via web UI. But then the web UI was gone. So, CLI was the only way to go.
I know shell CLI, but have little idea on how the OpenWRT ditribution is organized. This is why I am asking.
Back to the issue.
I've reverted back to official firmware and then went to trunk-factory (the 8MB image, I mean).

BusyBox v1.18.5 (2011-09-05 22:11:41 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 ATTITUDE ADJUSTMENT (bleeding edge, r28173) ----------
  * 1/4 oz Vodka      Pour all ingredients into mixing
  * 1/4 oz Gin        tin with ice, strain into glass.
  * 1/4 oz Amaretto
  * 1/4 oz Triple sec
  * 1/4 oz Peach schnapps
  * 1/4 oz Sour mix
  * 1 splash Cranberry juice
 -----------------------------------------------------

The web UI is not even installed so I'd like to install and run it.
Then I've fixed the /etc/opkg.conf file, updated the package list and tried to install what I thought it was the needed stuff

# opkg install uci libuci luci
Package uci (2011-07-18.3-1) installed in root is up to date.
Package libuci (2011-07-18.3-1) installed in root is up to date.
Installing luci (trunk+svn7464-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci_trunk+svn7464-1_ar71xx.ipk.
Installing uhttpd (26) to root...
...
Configuring luci-app-firewall.
Configuring luci-lib-ipkg.
Configuring luci-mod-admin-full.
//usr/lib/opkg/info/luci-mod-admin-full.postinst: line 6: /etc/init.d/luci_bwc: not found
//usr/lib/opkg/info/luci-mod-admin-full.postinst: line 6: /etc/init.d/luci_bwc: not found
Configuring uhttpd.
Configuring luci.
# _

So, at this point, either I'm missing some package or there's something wrong in the trunk packages.
What's needed in order to have the LuCI running on trunk?

(Last edited by uqbar on 9 Sep 2011, 09:31)

For 10.03.1-rc5 I've found why the WiFi is not working.
The web UI is generating the wrong /var/run/hostapd-phy0.conf file.
Once I configured the WiFi stuff from web UI I went on CLI and checked the situation.
As reported the hostapd wasn't running. From the trunk (where it's the web UI that doesn't work) I saw that hostapd was running as:

hostapd -B /var/run/hostapd-phy0.conf

And this is the output got from running hostapd on 10.03.1-rc5 CLI:

# hostapd -B /var/run/hostapd-phy0.conf 
Configuration file: /var/run/hostapd-phy0.conf
Channel not configured (hw_mode/channel in hostapd.conf)
Could not select hw_mode and channel. (-3)
wlan0: Unable to setup interface.
rmdir[ctrl_interface]: No such file or directory
# _

and this is the generated hostapd configuration file:

ctrl_interface=/var/run/hostapd-phy0
driver=nl80211
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
tx_queue_data3_aifs=7
tx_queue_data3_cwmin=15
tx_queue_data3_cwmax=1023
tx_queue_data3_burst=0
tx_queue_data2_aifs=3
tx_queue_data2_cwmin=15
tx_queue_data2_cwmax=63
tx_queue_data2_burst=0
tx_queue_data1_aifs=1
tx_queue_data1_cwmin=7
tx_queue_data1_cwmax=15
tx_queue_data1_burst=3.0
tx_queue_data0_aifs=1
tx_queue_data0_cwmin=3
tx_queue_data0_cwmax=7
tx_queue_data0_burst=1.5
hw_mode=g


country_code=IT


ieee80211n=1
ht_capab=[HT20][SHORT-GI-40][DSSS_CCK-40]
ieee80211d=1

interface=wlan0
ctrl_interface=/var/run/hostapd-phy0
wpa_passphrase=testssid
auth_algs=1
wpa=3
wpa_pairwise=CCMP TKIP
ssid=OpenWrt
bridge=br-lan
wmm_enabled=1
bssid=f4:ec:38:ca:ed:80
ignore_broadcast_ssid=0

(Blank lines as seen the file).
By adding the missing line like here:

tx_queue_data0_cwmax=7
tx_queue_data0_burst=1.5
hw_mode=g
channel=1

               
country_code=IT

           
ieee80211n=1                             
ht_capab=[HT20][SHORT-GI-40][DSSS_CCK-40]

I get this output:

# hostapd -B /var/run/hostapd-phy0.conf 
Configuration file: /var/run/hostapd-phy0.conf
Using interface wlan0 with hwaddr f4:ec:38:ca:ed:80 and ssid 'OpenWrt'
random: Cannot read from /dev/random: Resource temporarily unavailable
random: Only 0/20 bytes of strong random data available from /dev/random
random: Not enough entropy pool available for secure operations
WPA: Not enough entropy in random pool for secure operations - update keys later when the first station connects

and I can see the WiFi is now working almost as expected.
The only different thing is that in the web UI I asked for automatic channel selection, while in the manual edit of the file I had to put an actual channel number (1 to 11).  I have no idea on how to ask for automatic channel selection.

I'll try also to file a bug about this.

I have same router (TP-WR1043ND v.1.8) running with OpenWRT backfire 10.03-rc5 and had just one problem.
After enabling wlan I was able to connect as a client to WEP. Than I installed wpa-supplicant and libopenssl. But I was not able to cennect to a WPA-PEAP acess point as a client, because the router has no hardwar clock and so the check of some certificates during the handshake fails. Setting the date before WLAN connection helped to solve the issue.

uqbar wrote:

For 10.03.1-rc5 I've found why the WiFi is not working.
The web UI is generating the wrong /var/run/hostapd-phy0.conf file.
Once I configured the WiFi stuff from web UI I went on CLI and checked the situation.
As reported the hostapd wasn't running. From the trunk (where it's the web UI that doesn't work) I saw that hostapd was running as:

hostapd -B /var/run/hostapd-phy0.conf

Thank you for the hostapd hint so I can debug.
I have a problem similar to this and I can say that the bug is due to the fact that there is no error checking.
In my situation I have correctly set the channel number but I have tried to use 40 mhz (linked) channels.
It seems that it is not yet supported on wr1043nd hardware and so hostapd fails. Changing the hosapd-phy0.conf file or changing the config via luci to use only 20mhz channels made the wifi up again.

So you have to check very carefully the options you can really use.

The discussion might have continued from here.