OpenWrt Forum Archive

Topic: P-2812HNU-FX: getting OpenWrt installed

The content of this topic has been archived between 6 Jun 2015 and 5 May 2018. Unfortunately there are posts – most likely complete pages – missing.

DGDodo,

I have some further information.

It looks like the VDSL config is the problem.
If I change

config vdsl 'dsl'
    option annex 'a'
    option firmware '/lib/firmware/vdsl.bin'
    option tone 'av'
    option xfer_mode 'ptm'

into

config vdsl 'dsl'
    option annex 'a'
    option firmware '/lib/firmware/vdsl.bin'
    option tone 'av'
    option xfer_mode 'atm'

I cannot reboot from the command line anymore after the second time. Only by power down/up.
This happens in BB and CC.
After changing 'atm' back to 'ptm' it works normal.

DD (r48507) is doing ok. No problems with rebooting from CLI.

(Last edited by wvdakker on 3 Jan 2017, 23:10)

DGDodo,

Thanks very much for your answer. After several hours of debugging I decided to post my experiences for reference to others, but now I see it wasn't very clear that I sort-of figured out a working config. I edited the post to make it more clear.
I do like it all to work together in one LAN, but keep my hands off my router for the next few weeks - to see if it works stable and well in this configuration. Afterwards, I'll try your configs.

wvdakker wrote:

I have installed CC 15.5.01 on my 2812 F1 router.
After installing I cannot reboot from the CLI. I have to turn the
router off and on with the power switch.

The serial interface gives after the [reboot] command:

ROM VER: 1.0.5
CFG 06
NAND
NAND Read OK

U-Boot SPL 2013.10-openwrt5 (Nov 18 2014 - 19:54:01)
SPL: initializing NAND flash
SPL: checking U-Boot image
SPL: loading U-Boot to RAM
SPL: decompressing U-Boot with LZO
SPL: cannot start U-Boot

I could softboot when I had installed BB.

Any ideas?

Some time ago I traced this bug to an uninitialized variable in bootloader code.
I've fixed the code and made a new version:

http://ase.pp.fi/openwrt/openwrt-lantiq … -fixed.img

This is for the F1 version only, and obviously you replace the bootloader with your own risk.

Hope this helps!

Hello
After having some freezes on my P-2812HNUL*-F1 and because of some privacy concerns about the TCP port 50805 being reserved for TR069 connections I decided to install Openwrt but I got stuck at the factory U-Boot step

1- I made the cable by soldering the pins of USB-to-RS232 dongle (brand name: FTDI, Vendor ID: 0403, Product ID: 6001) (2nd RX, 3rd TX, 5th pin: GND) I plugged the dongle to my WinXP laptop and installed its drivers. Dongle appeared as COM10 in device manager.

2- I installed both Termite and Putty to use as terminal. I first opened Termite , it automatically detected the dongle as connected on COM10

3- I short circuited the R17 bridge by a screwdriver and powered up the router waited for a second or two and released the screwdriver.

4- Termite stopped running and closed itself.

5- I tried the same with Putty, selecting Serial as connection. Putty went on running but crambled characters came up. Here's one sample screenshot: i . hizliresim. com / Ja5jDj.png
Those crambled characters come up whether I short or not. On my previous try those crambled chars covered the whole screen.

In 2012 I tried to resque my bricked Zyxel 661HW-61 using the same USB2Serial dongle (which Terminal I used I can't remember now) and I had got a similar result and I could not resque it, that's when I bought this one, P-2812HNUL-F1.

How can I install Openwrt on this modem? Thank you.

* (L is documented by ZyXEL as: L Models users need a splitter to use the FXO port so I guess it's not something to alter the installation process)

While I don't know for sure what kind of an interface chip the P-2812HNUL-F1 has, I somehow doubt that it does not have an RS-232 receiver chip. Instead, the UART pins are wired more or less directly to the UART interface of the onboard microcontroller. This is at least the case for my P-2812HNU-F1.

I think you should start by using a voltage multimeter connected to the TX and GND pins and power up the router. It will send out data through the serial interface when it boots up, and hence you can determine the maximum output voltage. If the voltage really goes all the way to +-12V, then using an RS-232 dongle is safe. But if the maximum measured voltage is around 5V, then you're better off using a USB-to-TTL dongle instead.

The garbled characters syndrome usually indicates that the serial line settings (baud rate, parity, stop bit etc) might be off. I have a P-2812HNU-F1, and at least for it, the correct settings are:
- Baud rate 115200
- Data bits: 8
- Parity: N
- Stop bits: 1

Since I use BusPirate to interface with my router's serial line, I also need to set the Receive polarity to Idle 0 and Output type to Normal (3.3V high, GND low). These settings only apply to BusPirate, though. They might not apply to your dongle.

Start your experiments by trying to capture the regular bootlog of your router (i.e. by not shorting the R17 resistor) Once you can see the full bootlog, restart the router and ensure that you can interrupt the Z-Boot sequence during the appropriate window. You should see a timer running from 3 secs to 0 where you can interrupt it. This happens before Zyxel's own kernel starts booting.

Thank you for the reply it's helpful.

Now I tried with all those settings on Putty and let it start without shorting and results's the same. I ve noticed  2 things though:

1- TX and GND pins on the router measured about 5V
2- TX and GND pins on the RS-232 outlet (connected to the Laptop via USB) measured 12V but I had to connect voltagemeter's red end to the GND not to the TX, and the black end to the TX, that is the pins on the RS-232 seems to be reverse. The same FTDI RS-232 dongle works perfectly on my Powercom Uninterrupted Power Supply's RS-232 output, so I don't think it's defect. Still I guess I have to buy a USB-to-TTL dongle, though I don't know exactly what kind of a device it is.

The serial port on the router is not rs232. Rs232 is indeed 12V, while the TTL on the SoC is 3.3V. So you'll need an rs232 to TTL or an USB to TTL device, and hope that you didn't fry your router.

revivo73 wrote:

1- TX and GND pins on the router measured about 5V

Alright, so it is probably using the 5V TTL levels. See https://learn.sparkfun.com/tutorials/lo … gic-levels

What you need, then is one of these: http://www.ftdichip.com/Products/Cables … Serial.htm

Since the pins are measuring at about 5V, I think the TTL-232RG-VSW3V3-WE will be enough for you. And before you ask, the 3.3V cables are intended for CMOS circuits. See https://learn.sparkfun.com/tutorials/lo … gic-levels. A CMOS-compatible cable can interface with a device that uses 5V voltages, but the reverse (A 5V cable) cannot always interface a device that expects CMOS voltage levels. Buying the 3.3V cable gives you more bang for the buck.

However, if you intend to do more hardware hacking, I heartily recommend the BusPirate v3 prototype board (http://dangerousprototypes.com/docs/Bus_Pirate). This board do a lot more than just interface with UART. It is an extremely useful device in my opinion. I own one myself, and used it to flash my P-2812HNU-F1. Remember to get both the board and a suitable probe kit to go with it, otherwise you can't connect BusPirate to the router's pins! smile

revivo73 wrote:

2- TX and GND pins on the RS-232 outlet (connected to the Laptop via USB) measured 12V but I had to connect voltagemeter's red end to the GND not to the TX, and the black end to the TX, that is the pins on the RS-232 seems to be reverse.

They are not "reversed". The RS-232 standard defines voltages from positive 15V to negative 15V while your voltmeter probably just measures voltages from 0V upwards. Hence you need to 'reverse' the connectors to see the real voltage value. See https://en.wikipedia.org/wiki/RS-232#Voltage_levels for more details.

Also, if you want to learn more about TTL and CMOS, check out Wikipedia: https://en.wikipedia.org/wiki/Transisto … stor_logic and https://en.wikipedia.org/wiki/CMOS

(Last edited by Antek on 1 Jun 2017, 12:22)

Mijzelf wrote:

The serial port on the router is not rs232. Rs232 is indeed 12V, while the TTL on the SoC is 3.3V. So you'll need an rs232 to TTL or an USB to TTL device, and hope that you didn't fry your router.

No, the router's fine. Afterwards I connected it to the Internet just to check it works then it worked.

Antek wrote:
revivo73 wrote:

1- TX and GND pins on the router measured about 5V

Alright, so it is probably using the 5V TTL levels. See #
What you need, then is one of these: #

Since the pins are measuring at about 5V, I think the TTL-232RG-VSW3V3-WE will be enough for you. And before you ask, the 3.3V cables are intended for CMOS circuits. See #. A CMOS-compatible cable can interface with a device that uses 5V voltages, but the reverse (A 5V cable) cannot always interface a device that expects CMOS voltage levels. Buying the 3.3V cable gives you more bang for the buck.

However, if you intend to do more hardware hacking, I heartily recommend the BusPirate v3 prototype board (#). This board do a lot more than just interface with UART. It is an extremely useful device in my opinion. I own one myself, and used it to flash my P-2812HNU-F1. Remember to get both the board and a suitable probe kit to go with it, otherwise you can't connect BusPirate to the router's pins! smile

revivo73 wrote:

2- TX and GND pins on the RS-232 outlet (connected to the Laptop via USB) measured 12V but I had to connect voltagemeter's red end to the GND not to the TX, and the black end to the TX, that is the pins on the RS-232 seems to be reverse.

They are not "reversed". The RS-232 standard defines voltages from positive 15V to negative 15V while your voltmeter probably just measures voltages from 0V upwards. Hence you need to 'reverse' the connectors to see the real voltage value. See # for more details.

Also, if you want to learn more about TTL and CMOS, check out Wikipedia: # and #

I think I 'll have to buy a coverter cable like the USBTTLSerial cable of FTDI. I really never knew that such category of cables existed.  They have put that tiny circuit inside the USB end, that's really suprising. I'd better search fot it locally as I will have a chance to try it before I buy it; I 'll go to the store with my laptop and the router.

The prototype board looks fine but it 's way beyond me : )  Thank you.

Anyone got Wi-Fi on the F3 to work on Chaos Calmer? Perhaps because this file was built for Designated Driver and I need to get new calibration data for CC by doing cross-compilation.

[   10.504000] rt2800pci 0000:02:00.0: failed to load eeprom property
[   10.508000] ieee80211 phy0: rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'RT3092.eeprom'.
[   10.520000] rt2800pci 0000:02:00.0: Direct firmware load for RT3092.eeprom failed with error -2
[   10.528000] rt2800pci 0000:02:00.0: Falling back to user helper
[   10.564000] firmware RT3092.eeprom: firmware_loading_store: map pages failed
[   10.568000] ieee80211 phy0: rt2x00lib_request_eeprom_file: Error - Failed to request EEPROM.
[   10.580000] rt2800pci: probe of 0000:02:00.0 failed with error -11
    OpenWrt Chaos Calmer 15.05.1 / LuCI 15.05-149-g0d8bbd2 Release (git-15.363.78009-956be55)
[   10.508000] ieee80211 phy0: rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'RT3092.eeprom'.
[   10.520000] rt2800pci 0000:02:00.0: Direct firmware load for RT3092.eeprom failed with error -2

The EEPROM calibration data cannot be loaded.

As stated in https://wiki.openwrt.org/toh/zyxel/p281 … ation_data you need to put the calibration data file to /lib/firmware/ folder.

Check the Wiki-page I linked. At the beginning of the page, you'll find a link to a GitHub repo by ScApi that contains pre-built images for both F1 and F3 variants. In the F3 variant's folder, you'll find the correct EEPROM file. Copy this file to /lib/firmware/ and reboot your router.

As far as I know, this file isn't available anywhere else and it cannot be built from sources. I do not know where ScApi got the original file from, or what it actually contains. But for my P-2812HNU-F1, putting the corresponding file to /lib/firmware/ made WiFi work.

Antek wrote:

The EEPROM calibration data cannot be loaded.

As stated in https://wiki.openwrt.org/toh/zyxel/p281 … ation_data you need to put the calibration data file to /lib/firmware/ folder.

Check the Wiki-page I linked. At the beginning of the page, you'll find a link to a GitHub repo by ScApi that contains pre-built images for both F1 and F3 variants. In the F3 variant's folder, you'll find the correct EEPROM file. Copy this file to /lib/firmware/ and reboot your router.

As far as I know, this file isn't available anywhere else and it cannot be built from sources. I do not know where ScApi got the original file from, or what it actually contains. But for my P-2812HNU-F1, putting the corresponding file to /lib/firmware/ made WiFi work.

Thanks. I must've done a mistake and put it into /lib/ somewhere instead of /lib/firmware/ as it is now working perfectly. The only thing I don't like now is that the MAC seems to be randomly generated (or taken from u-boot like @Scapi build?) and the macaddr override in the wifi-iface section does not work unless I run one single ap with the driver. But that's no big deal, I just want to use the same MAC as written on the sticker under the router (it shows up as Ralink instead of ZyXEL)

Actually I was looking at the OEM bootlog (how it generated 7 MACs for wi-fi ifaces at boot) and the OpenWRT bootlog and realized if I specified the same for more than one iface and/or did not specify it then it would create a conflict, I simply set up the logical next one(s) as how the OEM would generate them and the override works. My bad again.

(Last edited by courfazor on 5 Jul 2017, 12:28)

I recall that at least on the P2812HNU-F1, there's a configuration section somewhere in the flash memory which the bootloader can access. It contains the first and last MAC address, and this range is used to generate MAC addresses for the interfaces dynamically. I stored the details that my router originally had into a "ZHAL configuration file", but so far I haven't actually applied these MAC addresses elsewhere except enforced the WAN interface's MAC address since it is facing towards the ISP.

As far as I know, OpenWRT doesn't use or read these details automatically, but you can enforce the MAC addresses in the /etc/config/network and /etc/config/wireless configuration files manually. That's what I did, too.

I'm an absolute blank when it comes to any of this but I wanted to use my old router as a wireless adapter for my desktop computer.

I've been trying out stuff like the zyxel firmware driivers and the/chaos_calmer/15.05/lantiq/xrx200/openwrt-15.05-lantiq-xrx200-P2812HNUF3-squashfs-sysupgrade.tar file. They all get declined by the router.

It apparantly has firmware version V3.11(BLN. 17) so I'm at a loss here. Anything you guys want me to try on this thing let me know. I'd need detailed instrucions for dummies type stuff though.

ZyXEL P-2812HNU-F3 Owner wrote:

I'm an absolute blank when it comes to any of this but I wanted to use my old router as a wireless adapter for my desktop computer.

I've been trying out stuff like the zyxel firmware driivers and the/chaos_calmer/15.05/lantiq/xrx200/openwrt-15.05-lantiq-xrx200-P2812HNUF3-squashfs-sysupgrade.tar file. They all get declined by the router.

It apparantly has firmware version V3.11(BLN. 17) so I'm at a loss here. Anything you guys want me to try on this thing let me know. I'd need detailed instrucions for dummies type stuff though.

I'm not sure I understand you. You want to disassemble the entire router, and re-purpose the raw hardware to act like some sort of a USB-connected wireless adapter card?

That sounds... insanely bloody f*cking difficult, to put it mildly. I believe you'll save yourself a lot of time and frustration by simply purchasing a dedicated wireless adapter from a computer store.

Seems I might not have been quite clear. I want to plug a regular ethernet cable into my router from my desktop so I get access to the wi-fi from a completely diffrent router that I don't have physical access to.

ZyXEL P-2812HNU-F3 Owner wrote:

Seems I might not have been quite clear. I want to plug a regular ethernet cable into my router from my desktop so I get access to the wi-fi from a completely diffrent router that I don't have physical access to.

Ok, so there was a misunderstanding smile

The instructions on how to flash P-2812HNU-F3 can be found from the device-specific page: https://wiki.openwrt.org/toh/zyxel/p2812hnu-f3.

You'll need to have a TTL cable (USB-to-TTL cable from FTDI will do fine, just make sure the voltage is 3.3V), and you'll need to know your way around the hardware in order to short the correct pin so the router will start in the UART mode.

ZyXEL P-2812HNU-F3 Owner,

You mean: program the F1 (or F3) device, so it acts like a repeater.
Yes this is possible by changing network configuration.
With my F1 there are even 4 wlan channels, which can be programmed as you wish i.e. 1wlan=WAN , all ethports (5) and 3wlan works as LAN.
Anything is possible ...
Although a USB device as  wrote, are easier & cheaper, bought mine under $2/piece.

I've been trying to install OpenWRT to my P-2812. However, when uploading the boot image in ASCII (in CFG 02), nothing happens afterwards. When I try adding a 1ms character delay, the upload takes hours.

It hasn't actually finished, I'm posting this to verify that it's normal that it's taking this long? I don't want to have to wait for almost a day, just to find out that again nothing happens after the upload.

reynard80 wrote:

it's normal that it's taking this long?

No.

Some people can upload the bootloader normally, without delays. I couldn't, and had to add a delay on line endings.

Mijzelf wrote:
reynard80 wrote:

it's normal that it's taking this long?

No.

Some people can upload the bootloader normally, without delays. I couldn't, and had to add a delay on line endings.

I see, delay on line endings did work for me.

Is anybody running the LEDE version of OpenWRT on their 2812 and using VDSL? I can't get it to work. Also, the DSL section of LuCI is empty; 'DSL This section contains no values yet', although I have configured these settings in the network file

I'm actually looking for the best version to run the modem/router stable with both DSL and Wifi. What build would that be?

(I'm in the Netherlands, on the Telfort provider, as more people are, I suspect smile)

(Last edited by reynard80 on 7 Sep 2017, 13:55)

I'm using "LEDE Reboot 17.01.2 r3435-65eec8bd5f / LuCI lede-17.01 branch (git-17.152.82987-7f6fc16)" on a P2812HNU-F1 here. Built it myself from the sources.

Everything works quite well, except that sometimes the Wi-Fi mysteriously stops working and I need to power cycle the router in order to get it back online. Try as I might, I haven't managed to pinpoint why exactly the wireless network stops working. Connecting to the router through Ethernet cable allows me to review the kernel and system logs, but there's nothing there.

Antek wrote:

I'm using "LEDE Reboot 17.01.2 r3435-65eec8bd5f / LuCI lede-17.01 branch (git-17.152.82987-7f6fc16)" on a P2812HNU-F1 here. Built it myself from the sources.

Everything works quite well, except that sometimes the Wi-Fi mysteriously stops working and I need to power cycle the router in order to get it back online. Try as I might, I haven't managed to pinpoint why exactly the wireless network stops working. Connecting to the router through Ethernet cable allows me to review the kernel and system logs, but there's nothing there.

And what does your network file look like? And are you getting DSL settings in the LuCI interface?

WIth my LEDE install, it's loading the rt2860.bin firmware. That should be rt30262 I think, at least that's the chip in my F1. Maybe that's the problem in your setup?

(Last edited by reynard80 on 8 Sep 2017, 15:07)

Here's a copy of my network config file:

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

config globals 'globals'

config dsl 'dsl'
        option xfer_mode 'ptm'
        option tone 'av'
        option line_mode 'vdsl'
        option annex 'a'
        option firmware '/lib/firmware/lantiq-vrx200-a.bin'

config interface 'wan'
        option ifname 'ptm0'
        option proto 'dhcp'
        option delegate '0'
        option ipv6 '0'

config device 'wan_dev'
        option name 'ptm0'
        option macaddr 'YY:YY:YY:YY:YY'

config interface 'lan'
        option proto 'static'
        option ipaddr '192.168.10.1'
        option netmask '255.255.255.0'
        option ipv6 '0'
        option delegate '0'
        option type 'bridge'
        option ifname 'eth0.1'
        option stp '1'

config device 'lan_dev'
        option name 'eth0.1'
        option macaddr 'XX:XX:XX:XX:XX'

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

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

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '5 6t'

With this config, the DSL section in my "Network" -> "Interfaces" is filled, and shows the same data.

My wireless system is loading the 'rt2860.bin' firmware file as well, and is using the 'RT3062.eeprom' file for calibration data:

root@OpenWrt:~# dmesg | grep ieee80211
[   16.600770] ieee80211 phy0: rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'RT3062.eeprom'.
[   16.627412] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3572, rev 0223 detected
[   16.633802] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0008 detected
[   16.641357] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   32.341965] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'
[   32.721637] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.40

There's also a 'rt3290.bin' file in my /lib/firmware folder, but I'm not sure how I can configure the rt28xx module to use this firmware file instead.

On the other hand, I'm not even sure if I should do that. The wireless outages are extremely random. I'd need to pop open the case in order to verify the exact wireless chip that I have. And then I'd need to find the firmware file itself, but I have no idea where to even start looking. I tried unpacking Zyxel's own firmware archive, but they're using some special type of compression in the SquashFS partition, so my tools refused to unpack it.

Come to think of it, I have a USB dongle attached to my desktop computer, and Windows 10 was loading incorrect drivers for this device for quite a while. I replaced the drivers only yesterday. The wireless outages might be caused by a malfunctioning client as well. I'll need to wait and see if the outages continue.