• Seems like hotmail /outlook is blocking emails from here so please refrain from using one of these accounts as you may not receive your authorization email.. many thanks

I need a script for the tg862

Gus

New Member
#1
I need a script for the tg862 modem to be used on blackcatusb Pro.
help me thanks.
 
#2
Disclaimer: I know this is a bcusb forum so forgive the usbjtag ref

You can use your flashcat usb to read the full flash, the usbjtag software to open this full flash and edit it... Then you use your flashcat usb again to flash the full flash.

I will attach the usbjtag config files, or if somebody knows how to create a fcusb script these configs will have the layout of the upper and lower flash chips.
 

Attachments

D3m0n

Administrator
Staff member
#3
I have no issue with links to other forums , so long as it helps people out

I am working on getting a working format for scripts with the latest functions , and once i have that i will post a tutorial on how people can do it themselves , unfortunately as my normal job requires me to travel to different countries , my time is limited to work on this , but it is on the todo list...
 

tupepe

New Member
#4
[QUOTE = "D3m0n, post: 3856, miembro: 1"] No tengo problemas con los enlaces a otros foros, siempre que ayude a la gente

Estoy trabajando para obtener un formato de trabajo para los scripts con las funciones más recientes, y una vez que tenga eso, publicaré un tutorial sobre cómo las personas pueden hacerlo ellos mismos. Desafortunadamente, como mi trabajo normal requiere que viaje a diferentes países, mi tiempo es limitado. para trabajar en esto, pero está en la lista de tareas pendientes ... [/ QUOTE]

;)
 

Schmoo

New Member
#5
Hi, i find this script on the net.
Im sure this script works or at least read, because i used before to make a backup of the flash, but if i try to load in the most recent BCUSB software, i got errors in some lines, maybe somebody here fix it.

Also the script is all in one, it means, for top and bottom memory i think

Code:
#This is a script for SPI mode
MyDevice = "Arris TG862"


FwBase = 0x40000
FwSize = 0x7e0000
Fw1Base = 0x820000
Fw1Size = 0x7e0000
U-BootBase = 0x0
U-BootSize = 0x20000
NvBase = 0x7B0000
NvSize = 327680


t1 = Tab.Create(MyDevice)


Tab(t1).AddGroup("U-Boot",10,10,100,150)
Tab(t1).AddGroup("Firmware",110,10,100,150)
Tab(t1).AddGroup("Firmware1",210,10,100,150)
Tab(t1).AddGroup("Nvram",310,10,100,150)
Tab(t1).AddButton("ReadU-Boot","Read",20,42)
Tab(t1).AddButton("WriteU-Boot","Write",20,102)
Tab(t1).AddButton("ReadFirmware","Read",120,42)
Tab(t1).AddButton("WriteFirmware","Write",120,102)
Tab(t1).AddButton("ReadFirmware1","Read",220,42)
Tab(t1).AddButton("WriteFirmware1","Write",220,102 )
Tab(t1).AddButton("ReadNvram","Read",320,42)
Tab(t1).AddButton("WriteNvram","Write",320,102)


CreateEvent(ReadU-Boot)
Status("Reading the U-Boot")
Tab(t1).ButtonDisable()
MyData = Memory.ReadVerify(U-BootBase,U-BootSize)
if (MyData = Nothing)
Status("Error: data read back failed")
Tab(t1).ButtonEnable()
Exit Event
endif
Prompt = "Choose filename to save the firmware"
SaveFile(MyData,Prompt,"U-Boot.bin")
Status("Successfully read U-Boot from Flash")
Tab(t1).ButtonEnable()
EndEvent


CreateEvent(WriteU-Boot)
Tab(t1).ButtonDisable()
Prompt = "Choose a U-Boot to write into Flash" 
MyData = OpenFile(Prompt,"U-Boot files (*.bin)|*.bin")
if (MyData = Nothing)
goto    WriteU-BootExit
endif
if not (Len(MyData) = U-BootSize)
Status("Error: File is not the size of the U-Boot")
goto    WriteU-BootExit
endif
Memory.Write(MyData,U-BootBase,U-BootSize)
Status("New U-Boot successfully written")
WriteU-BootExit:
Tab(t1).ButtonEnable()
EndEvent


CreateEvent(ReadFirmware)
Status("Saving the Arris TG862 Firmware")
Tab(t1).ButtonDisable()
MyData = Memory.ReadVerify(FwBase,FwSize)
if (MyData = Nothing)
Status("Error: data read back failed")
Tab(t1).ButtonEnable()
Exit Event
endif
Prompt = "Choose filename to save the firmware"
SaveFile(MyData,Prompt,"tm802g.bin")
Status("Successfully read firmware from Flash")
Tab(t1).ButtonEnable()
EndEvent


CreateEvent(WriteFirmware)
Status("Programming the Arris TG862 Firmware")
Tab(t1).ButtonDisable()
Prompt = "Choose a firmware to install" 
MyData = OpenFile(Prompt,"Firmware files (*.bin,*.p7)|*.bin;*.p7")
if (MyData = Nothing)
WriteErr = "User cancelled opperation"
goto    ExitWriteFwErr
endif
If (HWORD(MyData,0) = 12418)    #Remove header if .p7 fw
Writeline("Removing .p7 firmware header")
HeadLen = HWORD(MyData,2) + 52    #increases Headlen by 7
NewLen = Len(MyData) - HeadLen
Resize(MyData,HeadLen,NewLen)    #Removes the p7 header
endif
If not (HWORD(MyData,0) = 0x2705)
Status("Error: File does not appear to be compatible firmware")
exit event
endif
FwLen = Len(MyData)
Memory.Write(MyData,FwBase,FwLen)
FwSize = FwLen
Status("New firmware successfully installed")
Tab(t1).ButtonEnable()
Exit
ExitWriteFwErr:
Status(WriteErr)
Tab(t1).ButtonEnable()
EndEvent


CreateEvent(ReadFirmware1)
Status("Saving the Arris TG862 Firmware")
Tab(t1).ButtonDisable()
MyData = Memory.ReadVerify(Fw1Base,Fw1Size)
if (MyData = Nothing)
Status("Error: data read back failed")
Tab(t1).ButtonEnable()
Exit Event
endif
Prompt = "Choose filename to save the firmware"
SaveFile(MyData,Prompt,"tm802g_1.bin")
Status("Successfully read firmware1 from Flash")
Tab(t1).ButtonEnable()
EndEvent


CreateEvent(WriteFirmware1)
Status("Programming the Arris TG862 Firmware")
Tab(t1).ButtonDisable()
Prompt = "Choose a firmware to install" 
MyData = OpenFile(Prompt,"Firmware files (*.bin,*.p7)|*.bin;*.p7")
if (MyData = Nothing)
WriteErr = "User cancelled opperation"
goto    ExitWriteFwErr
endif
If (HWORD(MyData,0) = 12418)    #Remove header if .p7 fw
Writeline("Removing .p7 firmware header")
HeadLen = HWORD(MyData,2) + 52    #increases Headlen by 7
NewLen = Len(MyData) - HeadLen
Resize(MyData,HeadLen,NewLen)    #Removes the p7 header
endif
If not (HWORD(MyData,0) = 0x2705)
Status("Error: File does not appear to be compatible firmware")
exit event
endif
FwLen = Len(MyData)
Memory.Write(MyData,Fw1Base,FwLen)
Fw1Size = FwLen
Status("New firmware successfully installed")
Tab(t1).ButtonEnable()
Exit
ExitWriteFwErr:
Status(WriteErr)
Tab(t1).ButtonEnable()
EndEvent


CreateEvent(ReadNVRAM)
Status("Reading the NVRAM")
Tab(t1).ButtonDisable()
MyData = Memory.ReadVerify(NvBase,NvSize)
if (MyData = Nothing)
Status("Error: data read back failed")
Tab(t1).ButtonEnable()
Exit Event
endif
Prompt = "Choose filename to save the firmware"
SaveFile(MyData,Prompt,"NVRAM.bin")
Status("Successfully read NVRAM from Flash")
Tab(t1).ButtonEnable()
EndEvent


CreateEvent(WriteNVRAM)
Status("Programming the NVRAM")
Tab(t1).ButtonDisable()
Prompt = "Choose a firmware to install" 
MyData = OpenFile(Prompt,"Firmware files (*.bin,*.p7)|*.bin;*.p7")
if (MyData = Nothing)
WriteErr = "User cancelled opperation"
goto    ExitWriteFwErr
endif
NvLen = Len(MyData)
Memory.Write(MyData,NvBase,NvLen)
NvSize = NvLen
Status("New NVRAM successfully installed")
Tab(t1).ButtonEnable()
Exit
ExitWriteFwErr:
Status(WriteErr)
Tab(t1).ButtonEnable()


EndEvent
Please, double check, im not responsible for any data lose or bricked device and share if you fix it
 
Last edited:
Top