OpenWrt Forum Archive

Topic: Technicolor TG582n (BCM63281) and OpenWRT

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

I've got one of these routers and it seems to work fine with openwrt. I gather the info from this forum and the internet.
This is what I did:

- get a new CFE bootloader

e.g. use danitool's CFE or build your own from source e.g. danitool's source

- flash the new CFE

I used SPIPGM (http://rayer.g6.cz/programm/programe.htm) with a parallel cable as in https://www.ilpuntotecnicoeadsl.com/for … ic=74457.0

- build openwrt:

I used Chaos Calmer 15.05-rc3 adding these patches:

https://patchwork.ozlabs.org/project/op … mp;state=*

to fix this error

CC      arch/mips/bcm63xx/boards/board_bcm963xx.o
arch/mips/bcm63xx/boards/board_bcm963xx.c:2413:2: error: invalid
operands to binary & (have 'struct board_info *' and 'struct
board_info')
  &board_96338gw,
  ^
scripts/Makefile.build:257: recipe for target
'arch/mips/bcm63xx/boards/board_bcm963xx.o' failed
make[7]: *** [arch/mips/bcm63xx/boards/board_bcm963xx.o] Error 1

you just need to add a missing comma in patch 2/3:

++        &board_TG582N

change by

++        &board_TG582N,

and to fix the CRC error after flashing the image, you would need to use the same name as in the patch:

+    "THOMSON TG582N")
+        board_name="tg582n"
+        ;;

should be

+    "TG582N")
+        board_name="tg582n"
+        ;;

As this router is similar to A4001N1, to get the switch configuration right, you would also need to add the board to 02_network script:

--- a/target/linux/brcm63xx/base-files/etc/uci-defaults/02_network    2015-08-20 13:19:50.175817024 +0200
+++ b/target/linux/brcm63xx/base-files/etc/uci-defaults/02_network    2015-08-20 19:28:07.007030133 +0200
@@ -94,6 +94,7 @@
 fast2704v2 |\
 hg655b |\
 p870hw-51a_v2 |\
+tg582n |\
 vr-3025un |\
 vr-3025u)
     ucidef_set_interface_lan "eth0.1"

I didn't test the leds but it should be similar to A4001N1 router.

- Then flash the image as in other broacom routers and voila.

The pacthes might be included in openwrt (after polishing a bit ...) I hope this helps.

I've tried to get OpenWRT (trunk r47048) on a TG582N DANT-1 board flashing danitool CFE and adapting what router7 wrote.
From the serial console I can tell the squashfs image is flashed and boots and everything seems to work until I reboot when I get:

Booting from only image (0xb8010000) ...
Code Address: 0x80A00000, Entry Address: 0x80a00000
Linux file system CRC error.  Corrupted image?
enter ui_cmd_tftpd
Start TFTP server
Loading : ...

I can't understand where the CRC error comes from. Any help apprecciated.

my router board name is "TG582N"

[    0.000000] board: board name: TG582N

you can see yours with the serial console if you flash again your openwrt image.

The file target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc in my source tree already includes an entry for "tg582n" so I guess it should be fixed with the changes of patch 2/3.

Maybe you should check again the patches and rebuild your openwrt image. I tested them with r46692 and linux kernel 3.18.20 and it works.

router7 wrote:

my router board name is "TG582N"

mine too !
Indeed, shortly after I had posted, I found that inserting "tg582n" in the list of boards (it wasn't) in target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc made the image working (r47048).

If I succeed in polishing/updating the patches I'll post them.

Hi.

I own 3 of these routers and would be interested in using OpenWRT firmware.

From what i was able to absorb, the achivements ar still in an eraly alpha stage, am i correct?

I would also like to know if all this wiring and possible soldering is something we will be able to bypass in the future, or if we will always be forced to open the router and mess with it's flash chip?

Thank you for your attention and all the hard work trying to elevate this equipment to higher quality.

Best regards,
Paulo Brinca.

Anyone can share the source of danitool's CFE? link is dead now and i would like t give it a try.


Thanks

begreat wrote:

From what i was able to absorb, the achivements ar still in an eraly alpha stage, am i correct?

it works as the other broadcom routers, it's quite similar to P.DG A4001N1

begreat wrote:

I would also like to know if all this wiring and possible soldering is something we will be able to bypass in the future, or if we will always be forced to open the router and mess with it's flash chip?

if someone finds another way to unlock the original boot loader...

malefic_z wrote:

Anyone can share the source of danitool's CFE? link is dead now and i would like t give it a try.

the CFE source code for the BCM6328 can be found in some netgear firmwares, e.g. search in google for

 DGN2200v2-V1.0.0.21_1.7.21BEZEQ_with_toolchain_src.tar.bz2.zip

hope this helps.

Hi,I'm trying to add USB router (TG582Tn)

I think missing parts to work usb, resistors, diodes,regulator,etc. I would like if someone could upload some pictures or part number to add this feature to my router would appreciate it. Thank you

This is my Router:
Router

Without Usb:

Without Usb

With USB port:

With Usb

Hello everyone, Happy new year.

Does anyone tryed to work with adsl modem?

I followed the steps that are described in the Wiki and was able to flash CFE and upload OpenWRT.
However I'm getting a kernel panic when booting. From what I can see this is related to not properly detecting the SPI Memory.

I've attached the boot log here:
https://gist.github.com/PedroDiogo/acf8dfe5ed0d0955d42d

I'm using OpenWRT Chaos Calmer 15.05 - A4001N1 image, but I've tried the image for the A4001N and got the same results.

Does anyone have this problem?

PedroDiogo wrote:

I followed the steps that are described in the Wiki and was able to flash CFE and upload OpenWRT.
However I'm getting a kernel panic when booting. From what I can see this is related to not properly detecting the SPI Memory.

I've attached the boot log here:
https://gist.github.com/PedroDiogo/acf8dfe5ed0d0955d42d

I'm using OpenWRT Chaos Calmer 15.05 - A4001N1 image, but I've tried the image for the A4001N and got the same results.

Does anyone have this problem?

This is the problem "name EN25P128, id 0x1c18"

You need to add this line in "/linux-brcm63xx_generic/linux-3.18.23/drivers/mtd/spi-nor/spi-nor.c"

    /* EON -- en25xxx */
    { "en25f32",    INFO(0x1c3116, 0, 64 * 1024,   64, SECT_4K) },
    { "en25p32",    INFO(0x1c2016, 0, 64 * 1024,   64, 0) },
    { "en25q32b",   INFO(0x1c3016, 0, 64 * 1024,   64, 0) },
    { "en25p64",    INFO(0x1c2017, 0, 64 * 1024,  128, 0) },
    { "en25q64",    INFO(0x1c3017, 0, 64 * 1024,  128, SECT_4K) },
+    { "en25p128",   INFO(0x0x1c18, 0, 64 * 1024,  256, 0) },
    { "en25qh128",  INFO(0x1c7018, 0, 64 * 1024,  256, 0) },
    { "en25qh256",  INFO(0x1c7019, 0, 64 * 1024,  512, 0) },

and change this line in "/linux-brcm63xx_generic/linux-3.18.23/drivers/mtd/devices/m25p80.c"

-    {"en25q64"},    {"en25qh128"},    {"en25qh256"},

to

+    {"en25q64"},    {"en25p128"},  {"en25qh128"},    {"en25qh256"},

Bye.

(Last edited by larsen on 4 Mar 2016, 19:01)

I've followed the guide on the wiki page to change the bootloader, and everything seems to go well until I've finished flashing it on, and the device is dead sad
If I reflash with the original dumped image it springs back to life, so I haven't damaged the hardware!!
On further investigation I've found that in the zip file for the bootloader linked from the wiki page, both of the binaries don't contain firmware, but some link data to the ftp site to get them. However the ftp site requires a username and password.
Does anyone have a working bootloader, or even a fully working device that they could share a flash image with me from?
I can't seem to get my serial port working for some reason, so a configured CFE that has an IP address would be appreciated, or an image with Openwrt installed.
Thanks

Hi

I have a TG582n which I hope to OpenWrt.
I'm ok with building the PC, doing the soldering, and MOST of the steps in;
https://wiki.openwrt.org/toh/thomson/tg … er_upgrade

My ISP default http UI informs me I have a DANT-T board, but visual inspection proves I have a Spansion S25FL064P flash (marked FL064PIF http://www.spansion.com/Support/Datashe … G4.1259901), so there isn't explicit instructions for this combination, in particular the erase step.

Can anyone help me with the following;
I assume regardless of flash I should ultimately try to deploy the 15.05 - A4001N image because I have a DANT-T?
https://wiki.openwrt.org/toh/thomson/tg … d_versions
EDIT: i've taken a closer look in the image parent directory and now assume the main significant difference between the 2 options is the size and thus dictated by the flash capacity, of which I have 8MB, thus I choose the smaller?

Also could someone please add to the wiki, point me to existing docs, or advise me if there is an appropriate series of steps for installing a CFE on an S25FL064P, in particular the erase step which appears to differ for 2 of the other flash variants ...
https://wiki.openwrt.org/toh/thomson/tg … er_upgrade

Or do I have an unsupported combination?
EDIT: it appears i misinterpretted the SPIPGM notes "10.1.2009 Detection of Spansion S25FL004A - S25FL128P memories was added - tested with S25FL032A.", and the "-" range includes my S25FL064P, confirmed in the package readme. I still welcome tips on switches for erasing and writing my Spansion.

Also it would ease my mind a whole bunch if there was a link to the process for rollback option to the saved stock dump.bin

Thanks in advance, and please do keep up the great work
smile

(Last edited by motard on 18 Mar 2016, 11:49)

Hello,

If someone has trouble running the openwrt image with the en25p128 flash, i have made a patch to support that flash chip.

https://drive.google.com/folderview?id= … sp=sharing

In that folder is a image ready to be loaded and the patch that i user to compile the image.

Compile info:
Firmware Version    OpenWrt Designated Driver r49081 / LuCI Master (git-16.083.53894-5b79e62)
Kernel Version    4.1.20
No luci installed, only cli available trough ssh.


Best regards.

westiej wrote:

Does anyone have a working bootloader, or even a fully working device that they could share a flash image with me from?  I can't seem to get my serial port working for some reason, so a configured CFE that has an IP address would be appreciated, or an image with Openwrt installed.
Thanks

The CFE for the Orange/EE Bright Box works fine on the TG582n (my TG582n, anyway!); it's what danitool built but is a bit more friendly when serial access is inconvenient/unavailable:

  • has a tweak to alter boot behaviour based on buttons held at boot (since the Bright Box), exposing CFE's web-based flashing, router-as-TFTP-server flashing, and router-as-TFTP-client network boot

  • doesn't require a custom header on TFTP-d firmware, like the upstream sources do when you have no serial access

Read about buttons/boot behaviours, and find the link for this CFE, on the AR7516 page.

If you already have a custom CFE but didn't set up serial and can't upload new firmware, you can trigger web upload mode by temporarily connecting the TX and RX pad together with a paperclip while switching the unit on, and keeping them connected for ~5 more seconds.  When CFE sees input it drops to a prompt and starts its web server in the background, so you're just feeding it its own output to fool it into doing that.

Added LED and GPIO info to the wiki page.

Hi,
I've successfully installed Openwrt on TG582n, version 15.05.1 (not 15.05 as per the wiki).
Everything worked as expected, but I can't get wireless to 802.11n to work, the maximum I can get is 54Mbps. I tried to follow various guides to set the "n" speed but with no success.

Question is: is there any way to make it work??? Does it work with 15.05?

Thank you. Ciao.

I've just installed OpenWRT 15.05 on a spare Plusnet TG582N router without issue.
LAN and wireless are working fine but I cannot get it to connect to WAN on my separate Openreach modem (FFTC using pppoe).

The 4th ethernet switch port (marked red) is designated for the WAN connection to the modem with the original firmware.  I do not know how to configure this in OpenWRT.

Unfortunately the wiki is very confusing to me.
_wiki.openwrt.org/toh/thomson/tg582n#switch_ports_for_vlans

I have

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 ifname 'eth0.1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.0.xxx'
    option netmask '255.255.255.0'
    option dns '212.159.6.10 212.159.6.9'
    

config interface 'wan'
    option _orig_ifname 'eth0'
    option ifname 'eth0'
    option _orig_bridge 'false'
    option proto 'pppoe'
    option username 'xxxxxxxx@plusdsl.net'
    option password 'xxxxxx'
    option mtu '1500'
    
config globals 'globals'
    option ula_prefix 'fd5c:27c2:de6b::/48'

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

config switch_vlan
    option device 'eth0'
    option vlan '1'
    option ports '0 1 2 3 8t'

I think the ports numeration in "config switch_vlan" is wrong.
Also, I think there should be another vlan using the correct port (bridged???) for the WAN but I do not know how to configure it.

Can someone please show me a correct configuration.

Many thanks
Pico

(Last edited by picoman on 21 Dec 2016, 17:09)

Well after a bit of trial and error I eventually got connected to the internet myself. I had to setup an additional vlan with the wan port in it.
For anyone else having similar troubles this is my working network settings file with sensitive data xxx'ed for TG582N with OpenWRT 15.05 on Plusnet (UK) ISP (FFTC).
DNS servers are optional.

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 ifname 'eth0.1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.0.xxx'
    option netmask '255.255.255.0'
    option ip6assign '60'
    option dns '212.159.6.10 212.159.6.9'

config interface 'wan'
    option ifname 'eth0.2'
    option _orig_ifname 'eth0'
    option _orig_bridge 'false'
    option proto 'pppoe'
    option username 'xxxxxxxx@plusdsl.net'
    option password 'xxxxxxxx'
    option mtu '1500'

config globals 'globals'
    option ula_prefix 'fd5c:27c2:de6b::/48'

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

config switch
    option name 'eth0'
    option reset '1'
    option enable_vlan '2'

config switch_vlan
    option device 'eth0'
    option vlan '1'
    option ports '0 1 2 3 8t'

config switch_vlan
    option device 'eth0'
    option vlan '2'
    option ports '0 8t'

Cheers
Pico

gianfranco74 wrote:

Hi,
I've successfully installed Openwrt on TG582n, version 15.05.1 (not 15.05 as per the wiki).
Everything worked as expected, but I can't get wireless to 802.11n to work, the maximum I can get is 54Mbps. I tried to follow various guides to set the "n" speed but with no success.

Question is: is there any way to make it work??? Does it work with 15.05?

Thank you. Ciao.

Up!

In the meantime I confirm "n" doesn't work neither in 15.05 nor in the latest trunk images from dec 26th. Anybody successful in making it work over 54Mbps??

Thank you. Ciao.

gianfranco74 wrote:

I can't get wireless to 802.11n to work, the maximum I can get is 54Mbps.
Question is: is there any way to make it work??? Does it work with 15.05?

The b43 driver which is used to support the integrated BCM43227 doesn't support HT/5GHz modes.

I'll edit the device page to point out this limitation explicitly.

Given that Cypress has recently released some datasheets, maybe there's a chance this situation will change, but I would say don't hold your breath.  I've no idea whether the sheets they released cover any N-mode features, nor whether they're planning to release any more.

Thanks zx82,
but now I have a couple of doubts. I'll explain.

Based on the b43 info you linked, BCM43227 should be supported by wl driver as well: well, I've tried to set it up with no success. wl0 doesn't get detected in any way.
I see (lspci -n) that the wlan device is PCI ID 14e4:a8dc : may be te reason why broadcom-wl driver doesn't detect it?

Any help is welcome. Thanks. Ciao.

gianfranco74 wrote:

Based on the b43 info you linked, BCM43227 should be supported by wl driver as well: well, I've tried to set it up with no success. wl0 doesn't get detected in any way.

OpenWrt packages an old version of Broadcom's proprietary driver which might pre-date BCM43227 support. 

gianfranco74 wrote:

I see (lspci -n) that the wlan device is PCI ID 14e4:a8dc : may be te reason why broadcom-wl driver doesn't detect it?

Could be.  I prefer open-and-hobbled to closed-and-fully-functional so I haven't tried this, but I gather you might be able to dynamically add a PCI ID to the list a driver recognises:

echo "14e4 a8dc" >/sys/bus/pci/drivers/wl/new_id
# I think it'd be easier to "rmmod b43" or uninstall the b43 module entirely,
# but if you can't you may need this...
echo 0000:01:00.0 >/sys/bus/pci/drivers/b43/unbind
# Nudge wl to consider the device...
echo 0000:01:00.0 >/sys/bus/pci/drivers/wl/bind

That assumes the wl driver appears as "wl" (otherwise look in /sys/modules/) and that the WiFi is at 01:00.0 on the PCI bus (otherwise look in the output of "lspci -n").

However, this might not work if bcma-pci-bridge or b43-pci-bridge gets in the way.

Hi all,

I followed the guide, but I can't get a working route after flash and I would like some questions to experts.
First of all, the original image that I have extracted with flahsrom is 8388608 bytes long, in fact, when I try to write the  lede-17.01.1-brcm63xx-smp-A4001N1-squashfs-cfe.bin, which is 8388864, I get an error message about rom size.
I've dumped the rom and seen that at the end is full of 0xff, so I trimmed it in order to fit the required size.
After the flash, the router is completely dead, i Mean, no led lights on, including the one on the ethernet side when i plug the ethernet cable.
Is this the normal behaviour before load openwrt firmware ?
I don't get any answer pinging 192.168.2.50 (as written on the wiki).
I feel a little lost ...

It works !
I've found my mistake, I was trying to flash the lede-1701.1 bin directly instead of the cfe.

The discussion might have continued from here.