New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ar71xx: add netgear wnr2000v5 support #1256

Closed
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
@rcatolino

rcatolino commented Jul 30, 2017

Specifications :

  • Chispet : Qualcomm Atheros QCA953x
  • 32 MB of RAM
  • 4 MB of FLASH
  • 1x 10/100Mbps Ethernet
  • 1x switch with 4x 10/100Mbps port
  • 2.4GHz wifi
  • 2 Antennas on PCB
  • UART pads on JP2 header

Flash instructions:

The dni image can be flashed over tftp using uboot firmware recovery
mode via UART or Ethernet.
Via UART, interupt the boot sequence by pressing any key, then use
the 'fw_recovery' command to start the tftp server.
Via ethernet, turn off the router, then power it on while pressing
the reset button. When the status led starts blinking the tftp server
has started. Maintain the reset button pressed until the flash has
started.
The recovery tftp server listens on 192.168.1.1, port 69.

Alternatively you can boot the initramfs without flashing the device
via the UART interface.
Start a tftp server listening on 192.168.1.10.
Use the 'tftpboot ' command to load the initramfs uImage.
Then use the 'bootm' command to start it.

Signed-off-by: Raphael Catolino raphael.catolino@gmail.com

@mkresin mkresin added the ar71xx label Jul 31, 2017

@@ -1079,7 +1079,15 @@ config ATH79_MACH_WNR2000_V3
select ATH79_DEV_LEDS_GPIO
select ATH79_DEV_M25P80
config ATH79_MACH_WNR2200
config ATH79_MACH_WNR2000_V5
bool "NETGEAR WNR2000 V5 board support (test kconfig.openwrt)"

This comment has been minimized.

@karlp

karlp Sep 20, 2017

Contributor

the (test kconfig.openwrt) doesn't seem necessary/useful

select ATH79_DEV_LEDS_GPIO
select ATH79_DEV_M25P80
config ATH79_MACH_WNR2200

This comment has been minimized.

@karlp

karlp Sep 20, 2017

Contributor

I think you should add this after _V4, not between V2,3 and original. (even if v3 appears to be in teh wrong place)

#define WNR2000V5_SPI_GPIO_RESET 14
#define WNR2000V5_SPI_GPIO_MOSI 15
#define WNR2000V5_SPI_GPIO_CLK 16
#define WNR2000V5_74X164_GPIO_BASE QCA953X_GPIO_COUNT // The 74x614 muxer adds 8 new gpio after the regular 18 QCA953X gpios

This comment has been minimized.

@karlp

karlp Sep 20, 2017

Contributor

Wrong comment style, line too long, and it seems suspicious that the GPIO_BASE is the same as the GPIO_COUNT.

This comment has been minimized.

@rcatolino

rcatolino Oct 15, 2017

Actually this is right. GPIO_COUNT corresponds to the number of gpios without the 74x164 muxer. That chip adds additional gpios and those are numbered starting from GPIO_COUNT.

}
static u8 wnr2000v5_ssr_initdata[] __initdata = {
0xdf,

This comment has been minimized.

@karlp

karlp Sep 20, 2017

Contributor

wat

This comment has been minimized.

@rcatolino

rcatolino Oct 15, 2017

It's a bitfield, frankly I'm not sure why I initialized it without BIT(5) but i can't test it anymore and it worked like that, so I'm not too willing to change it.

static struct spi_gpio_platform_data wnr2000v5_spi_gpio_data = {
.sck = WNR2000V5_SPI_GPIO_CLK,
.mosi = WNR2000V5_SPI_GPIO_MOSI,
.miso = SPI_GPIO_NO_MISO,

This comment has been minimized.

@karlp

karlp Sep 20, 2017

Contributor

is the whitespace here consistent or is this just a diff issue?

.chip_select = 0,
.max_speed_hz = 400000,
.modalias = "74x164",
//.mode = SPI_CS_HIGH,

This comment has been minimized.

@karlp

karlp Sep 20, 2017

Contributor

dead code should be dropped, and all comments should be C style anyway

dd if=/dev/zero bs=32 count=1 >> $@
endef
define Build/unappend-zero

This comment has been minimized.

@karlp

karlp Sep 20, 2017

Contributor

Is this function even used?

@@ -378,7 +414,8 @@ define Device/wndrmacv2
DEVICE_TITLE := NETGEAR WNDRMAC v2
NETGEAR_BOARD_ID := WNDRMACv2
endef
TARGET_DEVICES += wndr3700 wndr3700v2 wndr3800 wndr3800ch wndrmac wndrmacv2
TARGET_DEVICES += wnr2000v5 wndr3700 wndr3700v2 wndr3800 wndr3800ch wndrmac wndrmacv2

This comment has been minimized.

@karlp

karlp Sep 20, 2017

Contributor

I think adding after v2 makes more sense than before original

@oaaeruak

This comment has been minimized.

oaaeruak commented Sep 20, 2017

Side note:
I have tested this patch by git cloning https://github.com/rcatolino/lede-source and building it. I have connected while flashing the serial connector to be able to read the serial logs to know what is been happening.

Summery:

  1. The patch is working it can be flashed with tftp as described.
  2. In "make menuconfig" the device is listed as "WNR2000 V5" instead of "WNR2000V5". This is the reason why it stands on top (before WNR2000 v2, v3 ...). So it should be changed to "WNR2000V5".
  3. You DO NOT HAVE to use serial for flashing. Just use OEM firmware. The OEM firmware would say that it only accept .img files and stop. How to fix: Rename .bin to .img. Then flash. Thats all. It would be nice if there could be written a "factory" image that does not require renaming like for other devices.

Thanks a lot for your work 👍

@tmo26

This comment has been minimized.

tmo26 commented Sep 20, 2017

For the documentation of this device: What serial parameters does the UART run on? 115200 8N1?
People keep having problems with serial due to wrong parameters (in general, not with this specific device), therefore it would be good to have a reliable source, e.g. the pullrequest.

@oaaeruak

This comment has been minimized.

oaaeruak commented Sep 24, 2017

Yes, the serial ttl is 115200 8N1 and works same like for example wnr2000v3. It also have the same design with the white dot at VCC pin like the other wnr2000 devices:
https://wiki.openwrt.org/_detail/media/netgear/wnr2000/wnr2000v1_pcb_up.jpg?id=toh%3Anetgear%3Awnr2000

ar71xx: add netgear wnr2000v5 support
Specifications :
- Chispet : Qualcomm Atheros QCA953x
- 32 MB of RAM
- 4 MB of FLASH
- 1x 10/100Mbps Ethernet
- 1x switch with 4x 10/100Mbps port
- 2.4GHz wifi
- 2 Antennas on PCB
- UART pads on JP2 header, default comm parameters : 115200 baud 8N1

Flash instructions:

The dni image can be flashed over tftp using uboot firmware recovery
mode via UART or Ethernet.
Via UART, interupt the boot sequence by pressing any key, then use
the 'fw_recovery' command to start the tftp server.
Via ethernet, turn off the router, then power it on while pressing
the reset button. When the status led starts blinking the tftp server
has started. Maintain the reset button pressed until the flash has
started.
The recovery tftp server listens on 192.168.1.1, port 69.

Alternatively you can boot the initramfs without flashing the device
via the UART interface.
Start a tftp server listening on 192.168.1.10.
Use the 'tftpboot <img name>' command to load the initramfs uImage.
Then use the 'bootm' command to start it.

Signed-off-by: Raphael Catolino <raphael.catolino@gmail.com>
@rcatolino

This comment has been minimized.

rcatolino commented Oct 15, 2017

Updated pull request.
I've addressed @karlp comments and I've added the serial comm parameters in the pull request commit message.
@oaaeruak I've renamed the squashfs image extension to .img

I haven't been able to test the updated pull request because I've given away this router a few weeks ago. It still builds fine, but if @oaaeruak, or anybody else with this hardware, could test it that would be great.

@chittti

This comment has been minimized.

chittti commented Oct 21, 2017

I was able to build and test this with the latest changes. Everything worked fine. Thanks @rcatolino !

Is there any way I can help so that this can be merged?

@msbit

This comment has been minimized.

msbit commented Oct 22, 2017

@chittti I've built the firmware and updated the router with the resulting lede-ar71xx-generic-wnr2000v5-squashfs-dni.img file, but the device ended up in a weird state. Any chance you could provide your .config file?

@msbit msbit referenced this pull request Oct 22, 2017

Closed

usbip: update hash #4994

@chittti

This comment has been minimized.

chittti commented Oct 22, 2017

@msbit How did you load the image? In my experience Netgear devices handle OpenWrt images very poorly if you use the GUI - they go into the weird state you talk about. I've never been able to flash them properly using the Web interface. I didn't even try with this device. This might be the reason for you too. Maybe @oaaeruak can offer their experience?

I soldered some pins on the J2 header (I suggest on the backside) and then loaded the firmware to tftp server started using UART (bootm command starts it). You might be able to get away without soldering though. The white dot is the VCC pin, then TX, RX and GND.

I've tried building it with various settings since the first build so my initial .config is gone. I have the .img (here) file build with no big menuconfig changes except set the target profile to wnr2000v5.

Let me know if I can help with anything.

@msbit

This comment has been minimized.

msbit commented Oct 23, 2017

Hey @chittti thanks for those instructions, they may come in very handy down the track! My initial update was via the web UI and I then managed to get back to factory firmware using TFTP (but through restarting the device with the reset button held in, etc).

Since then I've:

  • rebased this branch onto master
  • rebuilt starting with the config.seed (located here), changing only the specific WNR2000v5 target config option
  • updated the firmware on the device through the web UI again

At this point it looked like it was acting the same as my initial update, but I thought to investigate a little further and found that it was sending DHCP requests out the LAN ports. I was able to switch around the cables, and connect to the device from a static IP in 192.168.1.0/24. From here I needed to switch the logical interfaces in the web UI to get the internet up, and manually restart dnsmasq to ensure that DHCP was being served on the LAN ports.

So for me:

  • LAN and WAN interfaces were swapped:
    • initially eth1 => wan, eth0 => br-lan
    • should be eth0 => wan, eth1 => br-lan
  • dnsmasq doesn't restart automatically on interface reassignment (this could very well be a generic LEDE/OpenWRT issue)
@chittti

This comment has been minimized.

chittti commented Oct 23, 2017

@msbit I had the same problem. I didn't include luci in the first image so I had to go through the trouble of making those changes using UART command line. I'm new to this project so I don't know where this needs to be corrected before building.

Also, would you mind posting the image you've built here? Is there anything else a new device addition needs to go through?

@msbit

This comment has been minimized.

msbit commented Oct 23, 2017

@chittti me too, there are a fair few moving parts across all the projects! The image that I'd built is zipped up here.

As part of the build, I'd also ran:

  • ./scripts/feeds update -a
  • ./scripts/feeds install -a

before make menuconfig so this may have brought LuCI in for me (or using the config.seed, I'm not sure).

@rcatolino or @oaaeruak might have a better idea about the particulars of when/why the interfaces are set up in that direction.

@chittti

This comment has been minimized.

chittti commented Oct 23, 2017

I think those scripts pull in the sources, but including them is through menuconfig. I followed the instructions here (which are the same you did).

Thanks for the image. I'll try to check if I can get it to configure the interfaces correctly, and ask for help if I can't.

@oaaeruak

This comment has been minimized.

oaaeruak commented Oct 23, 2017

rcatolino: I've renamed the squashfs image extension to .img -> THANKS!

msbit: I've built the firmware and updated the router with the resulting lede-ar71xx-generic-wnr2000v5-squashfs-dni.img file, but the device ended up in a weird state -> What is a "weird state"? If the device boots and you can access the logs there, then please provide them from there. Else just take a usb-ttl adapter (example one with CP2104 chip).

general information: I did not had any problems flashing lede using netgear oem firmware. I used latest firmware avialble from netgear website. I just had to rename the bin to img - and thats nothing that have to be done any more. Just flash the "factory" image.

Yes, you have to follow the general build process. Feeds are required to have luci and so on in the image. Dont install luci later one with packages, because then it would get too big to fit into the ROM of the router.
To get a luci image, build it from source with luci included.

When this change would get merged, then the stable lede releases would include luci and work just fine.

@msbit

This comment has been minimized.

msbit commented Oct 23, 2017

@oaaeruak I should have been more specific.

As noted I rebuilt with this commit rebased onto master and noticed that on update the device logical NICs were switched around. I believe this was the same thing as happened with my original build, however I can't confirm at the moment.

In terms of functionality beyond this, I've had that second build on my router for a couple of days now without any issues.

@astrayal

This comment has been minimized.

astrayal commented Oct 24, 2017

Hi guys, I would like to know how to put this on my WNR2000v5 router,
Is there a step by step tut or a wiki that explains the process of building the firmware.img or perhaps pre-built images I can download anywhere?
thanks for any help
Astr4y4L
astrayal@gmail.com

@msbit

This comment has been minimized.

msbit commented Oct 25, 2017

Hey @astrayal, as @chittti mentioned above, the instructions here are quite good, the only real differences being the selection of the Target System and Target Profile from make menuconfig, and the existence of a file named lede-ar71xx-generic-wnr2000v5-squashfs-dni.img somewhere under ./bin/targets/ar71xx/generic/ when done.

Note that right now this build (for us at least) has an issue with the network interfaces being switched around, so if you're not too familiar with troubleshooting these kinds of issues it might be worth waiting until this gets sorted out, and this PR merged in. Once this has been done, official images should start being built as part of the main releases.

@telvex

This comment has been minimized.

telvex commented Oct 25, 2017

Hi msbit I flashed my wnr2000v5 with the first image you uploaded here and my router is indeed in that weird state my 4 lan ports acts as wan ports and my 1 wan port acts as a lan port so I went hardwired directly to the wan port and I'm issued and IP in 192.168.1.0/24 but I can't access the Web interface I type in 192.168.1.1 and I received erros every time I also tried going static anything I could try

@chittti

This comment has been minimized.

chittti commented Oct 25, 2017

@telvex If you built the image by yourself, I think you forgot to include luci package. @msbit has built a package and shared it (link). It includes luci. I suggest you try flashing this image.

@telvex

This comment has been minimized.

telvex commented Oct 25, 2017

Okay since I can't access the web interface I'm guessing I'm forced to Tftp flash the firmware is there any specific steps I should take also thanks for the help

@chittti

This comment has been minimized.

chittti commented Oct 25, 2017

@telvex Try using the instructions here

@blogic

This comment has been minimized.

Contributor

blogic commented Jan 2, 2018

With the remerge in progress, all PRs on the lede-project organisation will be closed. Please help getting this merged or rebase/post it on the openwrt project page (https://github.com/openwrt/openwrt/pulls). All remaining PRs will be closed in 30 days.

@jow-

This comment has been minimized.

Member

jow- commented Jan 3, 2018

@rcatolino - I squashed your three commits into one and folded the somewhat unrelated kmod-gpio-nxp-74hc164 changes into a separate commit.

Please find the commits in my staging tree at https://git.lede-project.org/?p=openwrt/staging/jow.git;a=commitdiff;h=e6c4a399fd8d2cadb792972953d2f4cd0149ca6a and https://git.lede-project.org/?p=openwrt/staging/jow.git;a=commitdiff;h=b1f39e1dd6de204380d143ae51013202c5a2d8c8 tell me if they work okay for you.

I'll merge them to master after a positive confirmation.

@pepe2k

This comment has been minimized.

Member

pepe2k commented Jan 3, 2018

@jow-, @rcatolino,

kmod-gpio-nxp-74hc164 package isn't be required, CONFIG_GPIO_74X164 is already selected by default in ar71xx kernel config: https://github.com/lede-project/source/blob/master/target/linux/ar71xx/config-4.9#L303

Cheers,
Piotr

jow- added a commit to openwrt/openwrt that referenced this pull request Jan 7, 2018

kernel: fix packaging of kmod-gpio-nxp-74hc164
The NXP 74HC164 GPIO expander driver uses a different config symbol
("CONFIG_GPIO_74X164") and module name since since at least Kernel
version 2.6.37.

Update the kmod package definition accordingly by adjusting kconfig
and module file names.

This unrelated, but correct change has been separated from the
WNR2000v5 support commits.

Ref: lede-project/source#1256
Suggested-by: Raphael Catolino <raphael.catolino@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
@lhlpuhjf

This comment has been minimized.

lhlpuhjf commented Jan 11, 2018

@jow-
Your branch seems kind of broken. I build on 11.01.2018 the WNR2000V5 image and it does not boot.
Error from serial log:
[ 1.564145] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[ 2.193424] ag71xx-mdio.1: Found an AR934X built-in switch
[ 2.246912] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[ 2.255344] NET: Registered protocol family 10
[ 2.263992] NET: Registered protocol family 17
[ 2.268773] 8021q: 802.1Q VLAN Support v1.8
[ 2.277250] squashfs: SQUASHFS error: unable to read id index table
[ 2.284101] List of all partitions:
[ 2.287730] 1f00 128 mtdblock0 [ 2.291908] (driver?)
[ 2.294351] 1f01 3904 mtdblock1 [ 2.298483] (driver?)
[ 2.300935] 1f02 1408 mtdblock2 [ 2.305069] (driver?)
[ 2.307511] 1f03 2496 mtdblock3 [ 2.311653] (driver?)
[ 2.314098] 1f04 256 mtdblock4 [ 2.318231] (driver?)
[ 2.320674] 1f05 64 mtdblock5 [ 2.324815] (driver?)
[ 2.327254] No filesystem could mount root, tried: [ 2.332119] squashfs
[ 2.334466]
[ 2.336016] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[ 2.345632] Rebooting in 1 seconds..

When i git clone the rcatolino source, i can buld a working image.

@rcatolino
Two things:

  1. There seems something have changed upstream on lede/openwrt that require some new dependency to build a image with luci inside. When you try to build now with luci the build fails. Could you please sync with upstream?

  2. Could you implement sysupgrage functionality? At the moment there is no normal way to upgrade to any other image when installed once lede/openwrt. When you try sysupgrade from command line you get:

sysupgrade openwrt-ar71xx-generic-wnr2000v5-squashfs-dni.img
Image metadata not found
Sysupgrade is not yet supported on wnr2000-v5.
Image check 'platform_check_image' failed.

@ALL
When you want to flash any other image after flashed lede/openwrt, the most simple way is to follow this guide: https://kb.netgear.com/22688/How-to-upload-firmware-to-a-NETGEAR-router-using-TFTP

Flashing for example the OEM firmware works and from the OEM firmware you can flash the lede/openwrt images from the web-gui.

jollaman999 added a commit to jollaman999/openwrt that referenced this pull request Jan 13, 2018

kernel: fix packaging of kmod-gpio-nxp-74hc164
The NXP 74HC164 GPIO expander driver uses a different config symbol
("CONFIG_GPIO_74X164") and module name since since at least Kernel
version 2.6.37.

Update the kmod package definition accordingly by adjusting kconfig
and module file names.

This unrelated, but correct change has been separated from the
WNR2000v5 support commits.

Ref: lede-project/source#1256
Suggested-by: Raphael Catolino <raphael.catolino@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
@percz

This comment has been minimized.

percz commented Jan 18, 2018

As well as having the same problem as mentioned by @lhlpuhjf, I noticed the following commit which has moved the other wnr2000 versions to a "tiny" subtarget which I'm assuming v5 should be moved to as well...

"ar71xx: create new ar71xx/tiny subtarget for 4MB flash devices"

I did wonder if this has caused the current unable to mount error, but the commit appears after the post by @lhlpuhjf , so I assume not?

@blogic blogic closed this Feb 11, 2018

@TobiasDE9

This comment has been minimized.

TobiasDE9 commented Mar 31, 2018

Please tell me that this version has a full wpad and not the wpad-mini.
I've tried all day and night to get wpad without the opkg and I don't know how :(

I need to connect to a Wifispot like this:

config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11g'
option path 'platform/ar934x_wmac'
option htmode 'HT20'
option disabled '0'
option channel 'auto'
option country 'DE'

config wifi-iface
option network 'wwan'
option ssid 'Unitymedia WifiSpot'
option device 'radio0'
option mode 'sta'
option encryption 'wpa2'
option eap_type 'ttls'
option ca_cert '/etc/luci-uploads/cbid.wireless.cfg043579.ca_cert'
option auth 'MSCHAPV2'
option identity 'unitymedia/mail@example.de'
option password 'dasEingestelltePasswort'

This is for a young Lady, taking care of my grandparents.
She is polish and doesn't has Internet and I've to leave monday for university.
Could someone compile this again with full wpad and eventually opkg?
Please, that would help us a lot and I would pay a little for that, too!

@bobafetthotmail

This comment has been minimized.

Contributor

bobafetthotmail commented Mar 31, 2018

Please tell me that this version has a full wpad and not the wpad-mini.
I've tried all day and night to get wpad without the opkg and I don't know how :(

This device has very little flash, there isn't much space. I removed opkg from the image I provided above because it's useless (there is no space to install new packages).

But I think it should be able to connect to and extend another wifi fine, people above reported that they did it.

Did you follow the tutorial here (packages for it are already integrated in the image)? https://openwrt.org/docs/guide-user/network/wifi/relay_configuration

@TobiasDE9

This comment has been minimized.

TobiasDE9 commented Mar 31, 2018

Thank you so much for your answere! I'm working all day on that problem and don't have a solution.
I know how to work with the existing Image, but I need the MSCHAPV2.

The problem is, that this Version was compiled with wpad-mini and I need a full wpad package for this encoding. I can't install it without opkg, which needs to much space.

The only way I see is, to compile it again with wpad instead of wpad-mini.
Is someone so kind to help me out of this misery?

Inconveniently I don't have the knowhow to compile it myself :(

That would help us so much and would make a young lady really really happy.

Please help, If someone has the knowhow for that.
I'm all day online, waiting for response and try my best.

@bobafetthotmail

This comment has been minimized.

Contributor

bobafetthotmail commented Mar 31, 2018

I'll pull the sources down again and try to recompile it with full wpad, but as can be seen here https://openwrt.org/packages/table/start?dataflt%5BName_pkg-dependencies*%7E%5D=wpad

the full wpad uses twice as much space (not counting dependencies). If it fits at all, there won't be the Luci web interface (i.e. you will be able to configure it with SSH only).

@TobiasDE9

This comment has been minimized.

TobiasDE9 commented Mar 31, 2018

Thank you, thank you, thank you!

I think there are these three wpad pakages for openwrt:

  1. wpad-mini
  2. wpad-supplicant
  3. wpad

I read, that the number 2 (wpad-supplicant) should work as well, but it's not testet.
Is it possible so compile two versions, a full wpad and a wpad-supplicant version?

I'm a little scared, to loose the GUI as a beginner.

You are my hero!

@bobafetthotmail

This comment has been minimized.

Contributor

bobafetthotmail commented Mar 31, 2018

wpad-supplicant does not exist, there is "wpa-supplicant", integrating that.

As anticipated, I could not fit Luci web interface with either the full wpad and the wpa-supplicant builds, even if I went in and removed all I could (ipv6 support, the firewall, opkg).
You will have to use SSH and command line to configure this router.
Here some articles to get started in using SSH interface from the wiki
https://openwrt.org/docs/guide-quick-start/sshadministration
https://openwrt.org/docs/guide-user/base-system/user.beginner.cli
https://openwrt.org/docs/guide-user/base-system/uci

This article is about setting up a tftp server on your PC so you can use the firmware recovery procedure (as described in the first post in this thread) to install another firmware, be it LEDE or the stock firmware https://openwrt.org/docs/guide-user/troubleshooting/tftpserver

So I built images with wpad + relayd, where opkg was removed (and there is no Luci web interface), this zip file contains the config I used and what packages are included, and of course the firmware image.
https://www.dropbox.com/s/ff4jemxwf4e0nnc/lede-ar71xx-generic-device-wnr2000v5_wpad_relayd.zip?dl=0

and wpa-supplicant + wpa-cli (wpa control utility) + relayd where opkg was removed (and there is no Luci web interface), this zip file contains the config I used and what packages are included, and of course the firmware image.
https://www.dropbox.com/s/wjgctbx2gmhce43/lede-ar71xx-generic-device-wnr2000v5_wpa-supplicant_wpa-cli_relayd.zip?dl=0

@TobiasDE9

This comment has been minimized.

TobiasDE9 commented Apr 1, 2018

Thank you so much! There was no way I could do that.

The configuration with SSH is very good and after lot of research I got it.
I configured everything all night/day long and installed it this evening.
Now there is a bucket on the garage roof with the WNR2000v5 and a D-Lan adapter inside.
The other D-Lan adapter is connected to a Fritz!Box inside the house.

Important is to connect to the second router and set the Gateway to the first router (WNR2000v5).
I added a contab that reboots every night and a script that pings 8.8.8.8 every 5 minutes to check if there is a internet connection. Otherwise it restarts the network.
The problem was, that it didn't reconnect to the wifi, when it lost the signal.
If someone is interessted in that, CLICK HERE for the /etc

And it works!!! Unbelievable!
I don't know why so slow, but it works!

It was so nice to see how happy she is with this.
Now I can leave the city with a better feeling (:

Thank you bobafetthotmail, you are the best!

@SterlingButters

This comment has been minimized.

SterlingButters commented May 10, 2018

@bobafetthotmail May I ask what the error is when trying to build a firmware that is "too big"? When I try to build an image I get the following:

Sterlings-MBP:lede-source sterlingbutters$ make -j1 V=s
make[1]: Entering directory `/Volumes/OpenWrt/wnr2000test/lede-source'
make[2]: Entering directory `/Volumes/OpenWrt/wnr2000test/lede-source'
+ mkdir -p /Volumes/OpenWrt/wnr2000test/lede-source/staging_dir/target-mips_24kc_musl
+ cd /Volumes/OpenWrt/wnr2000test/lede-source/staging_dir/target-mips_24kc_musl
+ mkdir -p bin lib include stamp
mkdir -p /Volumes/OpenWrt/wnr2000test/lede-source/build_dir/target-mips_24kc_musl/stamp
touch /Volumes/OpenWrt/wnr2000test/lede-source/staging_dir/target-mips_24kc_musl/.prepared
+ mkdir -p /Volumes/OpenWrt/wnr2000test/lede-source/staging_dir/host
+ cd /Volumes/OpenWrt/wnr2000test/lede-source/staging_dir/host
+ mkdir -p bin lib include stamp
mkdir -p /Volumes/OpenWrt/wnr2000test/lede-source/build_dir/host/stamp /Volumes/OpenWrt/wnr2000test/lede-source/staging_dir/host/include/sys
install -m0644 /Volumes/OpenWrt/wnr2000test/lede-source/tools/include/*.h /Volumes/OpenWrt/wnr2000test/lede-source/staging_dir/host/include/
install -m0644 /Volumes/OpenWrt/wnr2000test/lede-source/tools/include/sys/*.h /Volumes/OpenWrt/wnr2000test/lede-source/staging_dir/host/include/sys/
ln -sf lib /Volumes/OpenWrt/wnr2000test/lede-source/staging_dir/host/lib64
touch /Volumes/OpenWrt/wnr2000test/lede-source/staging_dir/host/.prepared
make[3]: Entering directory `/Volumes/OpenWrt/wnr2000test/lede-source/tools/flock'
make[3]: Leaving directory `/Volumes/OpenWrt/wnr2000test/lede-source/tools/flock'
make[3]: Entering directory `/Volumes/OpenWrt/wnr2000test/lede-source/tools/sed'
make[3]: Leaving directory `/Volumes/OpenWrt/wnr2000test/lede-source/tools/sed'
make[3]: Entering directory `/Volumes/OpenWrt/wnr2000test/lede-source/tools/patch'
make[3]: Leaving directory `/Volumes/OpenWrt/wnr2000test/lede-source/tools/patch'
make[3]: Entering directory `/Volumes/OpenWrt/wnr2000test/lede-source/tools/xz'
make[3]: Leaving directory `/Volumes/OpenWrt/wnr2000test/lede-source/tools/xz'
make[3]: Entering directory `/Volumes/OpenWrt/wnr2000test/lede-source/tools/tar'
make[3]: Leaving directory `/Volumes/OpenWrt/wnr2000test/lede-source/tools/tar'
make[3]: Entering directory `/Volumes/OpenWrt/wnr2000test/lede-source/tools/ccache'
make[3]: Leaving directory `/Volumes/OpenWrt/wnr2000test/lede-source/tools/ccache'
make[3]: Entering directory `/Volumes/OpenWrt/wnr2000test/lede-source/tools/m4'
make[3]: Leaving directory `/Volumes/OpenWrt/wnr2000test/lede-source/tools/m4'
make[3]: Entering directory `/Volumes/OpenWrt/wnr2000test/lede-source/tools/autoconf'
export SHELL="bash"; /Library/Developer/CommandLineTools/usr/bin/make -C /Volumes/OpenWrt/wnr2000test/lede-source/build_dir/host/autoconf-2.69
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in bin
autom4te_perllibdir='..'/lib AUTOM4TE_CFG='../lib/autom4te.cfg'         ../bin/autom4te -B '..'/lib -B '..'/lib         --language M4sh --cache '' --melt ./autoconf.as -o autoconf.in
autom4te: need GNU m4 1.4 or later: /Volumes/OpenWrt/wnr2000test/lede-source/staging_dir/host/bin/m4
make[6]: *** [autoconf.in] Error 1
make[5]: *** [all-recursive] Error 1
make[4]: *** [all] Error 2
make[3]: *** [/Volumes/OpenWrt/wnr2000test/lede-source/build_dir/host/autoconf-2.69/.built] Error 2
make[3]: Leaving directory `/Volumes/OpenWrt/wnr2000test/lede-source/tools/autoconf'
make[2]: *** [tools/autoconf/compile] Error 2
make[2]: Leaving directory `/Volumes/OpenWrt/wnr2000test/lede-source'
make[1]: *** [/Volumes/OpenWrt/wnr2000test/lede-source/staging_dir/target-mips_24kc_musl/stamp/.tools_compile_yyyyyyyyyynyyyyynyynnyyyyyyyyyyyyyyyyyyyynyynynyyyynny] Error 2
make[1]: Leaving directory `/Volumes/OpenWrt/wnr2000test/lede-source'
make: *** [world] Error 2
@bobafetthotmail

This comment has been minimized.

Contributor

bobafetthotmail commented May 10, 2018

This device is getting way too much attention. Why are you all so obsessed with it? XD

May I ask what the error is when trying to build a firmware that is "too big"?

Afaik it does not post errors, maybe it does print a line in the make output.

The main indicator that the firmware is too big is that it will not build the firmware image, so you will not see the firmware image in the folder. It does not delete the older ones so check the dates on the file to make sure that it was created when the compile ended and not much before.

Your error seems to have happened because it does not find a tool called m4, which it should have built on its own and placed in /Volumes/OpenWrt/wnr2000test/lede-source/tools/m4

see the following line from your log:

autom4te: need GNU m4 1.4 or later: /Volumes/OpenWrt/wnr2000test/lede-source/staging_dir/host/bin/m4

Try increasing the verbosity of the log with make -j1 V=ss and see if it says something more.

I would try with make dirclean, which deletes all compiled files so you can start again from a clean slate. Or make distclean to erase all compiled stuff and configuration, and start again from a fully clean state.

@SterlingButters

This comment has been minimized.

SterlingButters commented May 11, 2018

Well its just an old router my wife had laying around so I figured why buy a new one haha. Using your suggestion I get a new error:

...
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
...

EDIT: Using sudo gets me farther and then stops due to error at some point to check if things can be done without root privileges (but it cant check because root privileges are active I guess). Simply running make after that starts things up again and I get the same m4 error. Idk

@beret

This comment has been minimized.

beret commented Jul 10, 2018

Is anyone looking at rebasing this and making a pull request for openwrt trunk? I'm far from seasoned enough for that, but have a v5 device (no serial) and am happy to test builds, and can grab the toolchain to build from source.

The openwrt device wiki claims WNR2000v5 is supported in trunk, but it looks like the device support never made it past the staging tree @jow- worked on. (I learned the hard way by flashing a tiny generic trunk build; all came back after a tftp stock flash fortunately.)

Current trunk with no mention of WNR2000v5

Edit: For anyone looking at the prebuilt images, this build works without any hassles for me. Some of the other builds (wpad, etc?) seemed to have trouble remembering config changes across reboots due to limited free flash.

@tmo26

This comment has been minimized.

tmo26 commented Jul 11, 2018

I updated the devicepage from "trunk" to "WIP" status, linking to PR#1256.

@enricodetoma

This comment has been minimized.

enricodetoma commented Aug 5, 2018

@knekkert I have the same problem: the router doesn't work as a client (same error in dmesg).
Has anyone solved it?

@anemoiusjerry

This comment has been minimized.

anemoiusjerry commented Aug 11, 2018

Can someone please make a step by step guide? I am a bit confused with whats happening above

@bobafetthotmail

This comment has been minimized.

Contributor

bobafetthotmail commented Aug 11, 2018

A step guide for what? Installation? Porting to OpenWrt?

@shanuu95

This comment has been minimized.

shanuu95 commented Aug 13, 2018

Hey guys i am facing some issue over here see i made the firmware after compiling the source as directed above i installed luci i can also flash the image to my router . after my router rebooted it had lede and everything i can make all settings but i cant seem to be able to install openvpn from software section of the lede panel and apart from this all the settings that i change is reverted back to stock lede after it reboots everytime can anyone help me.

@shanuu95

This comment has been minimized.

shanuu95 commented Aug 13, 2018

@EtherealRachus can you tell me how did you fix the settings not saving issue i really need it please help me

@bobafetthotmail

This comment has been minimized.

Contributor

bobafetthotmail commented Aug 13, 2018

i cant seem to be able to install openvpn from software section

This device does not have enough flash storage to install that. It barely fits Luci. Read the rest of the thread where I provide pre-compiled images.

all the settings that i change is reverted back to stock lede after it reboots everytime can anyone help me.

Your router's flash storage is full, there is no space to save your settings.

Please do a reset to defaults to clean it up.

System -> Backup/Flash firmware -> Perform Reset -> Ok

@shanuu95

This comment has been minimized.

shanuu95 commented Aug 13, 2018

Any help removing the unnecessary packages that is not necessary for the router all i need mostly is the openvpn and wifi thats it any help would be really appreciated

@shanuu95

This comment has been minimized.

shanuu95 commented Aug 13, 2018

Okay i found out that my vpn supports ppp-mod-ppto and kmod-nf-nathelper-extra for setup is there anyway that i can install and setup these if anyone can please help me remove all the unnecessary packages i just need my vpn to run and my wifi to run thas it please help me @bobafetthotmail

@mkresin

This comment has been minimized.

Contributor

mkresin commented Aug 13, 2018

@shanuu95 please use the forum for support requests.

@lede-project lede-project locked as off topic and limited conversation to collaborators Aug 13, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.