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.

Hi!

I just got one of these and I never liked the stock Alcatel/Thomson firmware. I started an article @ the wiki: TG582n (based on a draft @ http://wiki.openwrt.org/tg582n by a fellow member). I'll do some soldering later this week and I'll update as I go.

If anyone else is testing OpenWRT on TG582n, please post any info/feedback here.

Some quick info on the TG582n:

-They come in 2 hardware/board variants, DANT-T (8MB Flash) or DANT-1 (16MB Flash). The stock firmware images are not interchangeable between the different boards.

-I've only quickly poked around but other than the Flash chip the rest of the hardware looks identical, ditto for the pcb layout

  • Serial port @ J3

  • JTAG @ J4

JTAG pinout:
8 - N/C (Diode missing to 3.3V) 
7 - TDI 
6 - TDO 
5 - GND 
4 - TMS 
3 - TCK 
2 - N/C (3.3V Pullup / Possible nTRST) 
1 - N/C (resistor missing to 3.3V)

http://i.imgur.com/F64ReaUl.jpg

(Last edited by spacebass on 15 Oct 2013, 11:30)

Believe it or not, Technicolor themselves have OpenWRT running on a TG582n V2 wink

Whiterat wrote:

Believe it or not, Technicolor themselves have OpenWRT running on a TG582n V2 wink


How would one go about liberating this into something resembeling OpenWRT?

The stock firmware is so, so awefull with regard to the web UI.

The telnet is locked down to specific commands, theres a big pdf list of them somewhere on the internets, but not very useful.

(Last edited by AnonCh4rl1 on 22 Oct 2013, 02:22)

Hello everybody, it is the first time that i write on this forum smile
I'm interested to flash the OpenWrt on Tecnicolor TG582 (DANT-T)
How can i do this?
Thanks ^_^

(Last edited by federico.rib94 on 2 Mar 2014, 11:33)

Hi Guys,

This is my first post on here and that mainly due to me having several of the TG582n routers. It would be great if Openwrt could be used on this router as this is now quite a common router here in the UK and a lot of service providers now send this router out.

So I would be more than happy to work with some one on this as a project. I have access to a couple of these routers and am aware of at least 3 different variants of these. Also due to my job i have access to the wholesale firmware as well.

So will personally will be giving this ago, however this is my first project of this kind so would appreciate any help that would be available.

Hi, got myself a DANT-1 unit hoping to have a chance to put OpenWRT on it.
Switch serves almost all my needs (mwan3 if possible), mabe usb.
But need some guidance, does this serve for a start?
https://forum.openwrt.org/viewtopic.php … 70#p112870

Tried to flash a unlocked firmware by wizard but it quits about 20% flash going back to original (vodafone pt).

Thank you!

Hello everybody.

I've a Alice DANT-T router (telecom) with brand firmware.

I've repleace the brand firmware with SPIPGM for dos and i've upload a technicolor TG582n stock firmware and it's succesfuly.

Now, it's possible to flash a Openwrt firmware in this router?

Thanks.

OK Like Foster82, this is my first post to the forum. I have a Technicolor TG582n from Direct Save, a UK based ISP. I had decided not to use it as I already had a working router with all my settings for DMZ, port forwarding etc. Unfortunately my existing router just went bang. I've readjusted the IP ranges of my firewall to work with the TG582n but the router is locked down and I can't access it to finnese the settings. I'm hoping that OpenWRT is the solution, but I need to know how to get the firmware onto a locked box. Any help would be appreciated.

Many Thanks

JB

Hello,
any news ?
Thanks in advice

Hi M4rk,

No news from anyone yet. I'll probably end up having to buy an off-the-shelf router and go from there. I'll wait a little longer though and live in hope.

JB

I have connected wires to the serial pins on the board, will check what comes out of there tomorrow.

From what I read here and there it turns out that if the router is branded, that is, having a "_VARIANT_ID" system variable set:

{SuperUser}=>:env get
var = _VARIANT_ID
:env get var=_VARIANT_ID
O2

you cannot flash custom firmwares.

Also according to this the serial console outputs things similar to the telnet CLI. This means that it will be useless for reflashing.

The only option now left is to experiment with JTAG. The surface for each of the pins on the board is insanely small and I will probably smother solder and short-circuit stuff. What's a good (and cheap) way to connect a header to such tiny spaces?

unpopular_opinion wrote:

I have connected wires to the serial pins on the board, will check what comes out of there tomorrow.

From what I read here and there it turns out that if the router is branded, that is, having a "_VARIANT_ID" system variable set:

{SuperUser}=>:env get
var = _VARIANT_ID
:env get var=_VARIANT_ID
O2

you cannot flash custom firmwares.

I have one of those devices (BeBox) and _VARIANT_ID env variable returns 0, I think it means it is not set.

I have serial on it and posted OEM boot log on the wiki page.

As with other Thomson routers, probably the best way to install OpenWrt isfirst to replace the bootloader for a custom one. Sourcecode for building BCM6328 CFE is available somewhere in internet.

If JTAG doesn't allow to flash the bootloader this isn't a problem. These boards use an SPI flash memory. It's a piece of cake to flash a flash chip memory, you only need to wire 6 pins. And probably without desoldering the flash chip could work.

(Last edited by danitool on 1 Apr 2015, 21:19)

As danitool suggested, I hooked up the flash memory to a raspberry pi and can read and write to it. At first, however, I wired the connections wrong and the chip got really hot. After that the router now cannot power up (the serial line shows nothing, the LEDs don't flash during POST).

For anyone else that wants to brick their router, I did the following:

On the raspberry follow this to get the SPI working. You will need this piece of code instead of the current one linked in the post. Then install flashrom.

Connect 8 pins from the chip to the raspberry. I have SPANSION S25FL129P (variant 0). For the RPI I use this layout information. So the connection looks like this table. (the forum's bbcode don't recognize tables?)

After you've loaded the SPI kernel module on the RPI, tested it works, installed flashrom and *connected the pins correctly*, dump the contents of the flash to a file:

  machine# ./flashrom -p linux_spi:dev=/dev/spidev0.0 -c "S25FL129P......0" -r flash_0.data

danitool, do you have more info where I can CFE sources with a BCM63281 build target? All I can find are things with makefiles for development boards (that are not BCM63281).

I used the sources to generate a BIN file and uploaded it fine to the board, but it doesn't indicate in any way that it's alive.

danitool wrote:

This is the cfe6328 bootloader I built

https://drive.google.com/file/d/0B-EMoB … sp=sharing

can you test it?

Yes, uploads fine, but router still doesn't boot. If it's of any interest, I have to zero (or one)-pad the bin files to 16mb so that flashrom allows me to write them to the flash memory.

Hi friends, any advance about this ruter/modem??. I have not experience with the hardware but i'm interested because this model on the DANT-T variant is very common in my contry because is used by an IPS tha haves the monopoly here.

The price for unit (used) is aroud $ 6.45 USD. So is a cheap hardware but is powerful compared with the WRT54G, more RAM, more processor clock.

So, if somebody need a unit for test i can send, mabe the shipment will cost more that the unit xD. Really, i can donate 1 o 2 units if is necesary.


Sorry by my bad english, i have'n used google traslator.

See you.

(Last edited by ras_jack on 16 May 2015, 10:24)

this topic looks very interesting , anyone have any more news about turning a thomson tg582n into an openwrt router ?
I have ordered an raspberry pi to start playing with my old isp modems witch are blocked to upgrades .
turning a thomson firmware into an openwrt firmware will be the cherry on the to of the cake .

Is there any expansion board to raspberry that can be useful to an universal jtag programmer ?
I know that there are expansion boards for raspberry to avoid breaking the device in case anything goes wrong , so anyone here try this one :

http://i00.i.aliimg.com/wsphoto/v1/1296 … board-.jpg

Found an italian page with more information about how to do jtag to this device .

http://hardware371.rssing.com/browser.p … amp;item=7

Wiring connection between raspberry and the device can be found here (user tested on 2012 raspberry)(wiring linkys) :
https://github.com/oxplot/tjtag-pi/blob … wiring.jpg 

Wiring should be connected according tg582n jtag pinout here :
http://wiki.openwrt.org/toh/thomson/tg582n#jtag

software (linux can be found here)
https://github.com/oxplot/tjtag-pi

(Last edited by pedropt on 28 Jun 2015, 08:36)

i was able to create an serial connection from tg582n to my laptop , but i have some issues with the communication , i already tryed multiple baudrates without any success .
Anyone one have any more details about the configuration of putty to syncronize with tg582n ?
here is what i got .
http://s4.postimg.org/5rie0qnm5/dev_tty … TY_071.png

Jtag with raspberry on tg582n is not working for me , i did multiples configurations without connection succefully .
It could be some missing stuff in raspberry , dunno , i also looked up the net for wiring configs and i try multiple options , but no success either .
Anyway , i ordered a jtag programmer on the net just to make sure if it is the raspberry connection is giving issues or not .
i ordered a blackcat usb programmer for testing because it have the multiple voltage options , 3.3V and 5V witch are important depending on the router/modem model i may found in future .
http://psx-scene.com/tmp/psx-scene/revi … at-sml.jpg

(Last edited by pedropt on 28 Jun 2015, 14:52)

I bough an flashcat 1.08 but i have some issues getting the openwrt firmware uploaded to the chip .
Flashchip on tg582n
http://s9.postimg.org/93b9oa1ln/DSCF1807.jpg

Flshchip with jtag socket on top and blackcatusb connected :
http://s13.postimg.org/m8fofqpab/DSCF1803.jpg

Flashcat results :
http://s30.postimg.org/kzf8j30jh/Image3.jpg

Is there any way to do this flash with other tool compatible with flashcat device ?

I have got a working Openwrt on my TG582n router with the help from the community and google(Thanks!), although I only have the features I want included in the build thus can't gurantee all the features will work, I still want to share what I have done in case it benifits anybody. The source with TG582n support can be found at git@github.com:kplus/openwrt-tg582n.git

Apart from the Openwrt firmware image, you will also need CFE to override ISP's bootloader.

The steps I have taken are:

1. flash the CFE bootloader into the flash(using FTDI programmer)
2. short-circuit R62 and R63 on the router, and connect to serial port, baudrate set to 115200
3. connect the route to PC with an Ethernet cable, and set the ip of PC to static 192.168.1.100
4. power on the router, and interrupt bootloader by press anykey during booting.
5. open 192.168.1.1 in browser and upload Openwrt CFE image.
6. router will reboot automatically after flashing, and then you should be able to login through the serial console.

Hope this helps.
Enjoy.

(Last edited by qiushengfu on 17 Jul 2015, 21:22)

thanks for the reply qiushengfu , i will try it your way .
for a week i have been trying to find ways to put an openwrt firmware over my tg582n without success .
I am using a jtag connection directly to the chip with a blackcat usb jtag .
I was able to extract the full flash from the chip and decompile it , but when i recompile again and program it on tg582n it just dont work .
I am even unable to change the serial number and flash the original firmware i grabbed , because somehow there is an ssl certificate connected to a specific serial number of the device , changing a number on the serial then it wont work .

To be able to detect the right ID of chip i had to use an external 3,3v power source , i used my raspberry .
Here are some pictures from my progress and findings until now .

Jtaging tg582n with external power source :
http://s3.postimg.org/xsv63aiub/DSCF1813.jpg

then i was able to detect the proper chip with blackcat jtag programmer , and i flashed the CFE .
http://s21.postimg.org/93bq7xlaf/Image6.jpg

of course without success .

Then i started to think to change the serial numbel of the device , but everytime i did , then router wont start .
so i opened the bin to lookup :
http://s29.postimg.org/5pzpal6kn/thssl.jpg
i notice the ssl certificate must be related to this issue , but i never figured out how to solve this problem .

So , i decided to extract the complete binary file :
http://s3.postimg.org/r0symtm6r/firmwar … nk_001.jpg

to try to unblock modem to a specific ISP , but when i recompile the firmware again and programm it then it wont work .
On compilation tells me that header is not compatible .

Anyway , this is my story until now .
I will try your way on next weekend to see if it works .

I have tested qiushengfu solution without success .
I compiled BCM chipset using the git clone , their options are only 6338 cpu as minimum , and you are not able to compile for 63281 cpu .
What happens is that when you flash that cfe on the flash and start the device , nothing will happen , it stays dead .
I was looking at the flashed bin on the device using a jtag programmer and only 0000 were flashed , i can see the result of the programming in hex format on the programmer .
i have used blackcat 3.40 version to flash the chip .
The only way until now that worked , is to re-flash the original firmware that was previous in the device from ISP , or flashing a similar firmware from an identical model .

the git that have the bcm63xx is in here :
https://github.com/kplus/cfe_bcm63xx

and in the instructions you have to compile your cpu model , not all 3 .

you have 3 options :
1 - make BRCM_CHIP=6338
2 - make BRCM_CHIP=6348
3 - make BRCM_CHIP=6358

but the chipset 6328 is not there , and even if you try to compile it  , you will get a considerable ammount of errors and will get you nowhere .
the example i just said was this :
make BRCM_CHIP=6328   , but it wont work .

Also in the build script , there are by default a compilation for another cpu :
https://github.com/kplus/cfe_bcm63xx/bl … r/build.sh

"cd cfe/build/broadcom/bcm63xx_rom

make clean
make BRCM_CHIP=6348"

witch is pointing the build to 6348 cpu no matter what you choose .

anyone could give an help in this one ?

(Last edited by pedropt on 15 Aug 2015, 01:32)