i3roly / glibc_ddwrt

A Bluer Kind of White
22 stars 3 forks source link

DIR-3040 Firmware not update #10

Closed WilliamBernhoeft closed 2 years ago

WilliamBernhoeft commented 2 years ago

Hi friend, I'm trying to apply firmware in my device but allways received failure to update with archive: factory-to-ddwrt-SE.bin

My device information: DIR-3040 HW:A1 FW:1.20

You can help with this? Very thanks

i3roly commented 2 years ago

Hello

You must use recovery mode to apply factory bin. From: WilliamBernhoeft Sent: Wednesday, 23 February 2022 6:56 AM To: i3roly/glibc_ddwrt Reply To: i3roly/glibc_ddwrt Cc: Subscribed Subject: [i3roly/glibc_ddwrt] DIR-3040 Firmware not update (Issue #10)

Hi friend, I'm trying to apply firmware in my device but allways received failure to update with archive: factory-to-ddwrt-SE.bin

My device information: DIR-3040 HW:A1 FW:1.20

You can help with this? Very thanks

— Reply to this email directly, view it on GitHubhttps://github.com/i3roly/glibc_ddwrt/issues/10, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AITLEG6SRNNI75OGP5V4BJDU4TRSDANCNFSM5PENVOCQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.Message ID: @.***>

leandrotsampa commented 2 years ago

WilliamBernhoeft

Very thanks.

Firmware applyed, but after boot I received led 1RED and 1BLANK and no DHCP. I tryed manual IP 192.168.1.2 with mask 255.255.255.0 but withou success to access http://192.168.1.1/ or by ssh port. And ping to IP 192.168.1.1 stop response after a while.

Have a idea?

i3roly commented 2 years ago

thanks for this information

i am not sure if you are applying firmware properly.

it sounds like you are not using the right IP. mask is right.

follow instructions here:

https://openwrt.org/docs/guide-user/installation/recovery_methods/d-link_recovery_gui

must set IP to 192.168.0.1

i haven't used 3040 in a while. i know for sure i did test it extremely thoroughly before returning device. and no issues with DIR2640 user @nikhchan, which 3040 uses same rootfs except slightly different driver setting.

my firmware does not give red LED at all.

if firmware is applied right, you should at least be able to see DD-WRT radio name for SSID. at least one should work.

not sure if it is even flashed properly. could be bug in my firmware, for sure. but if 2640 is fine, then so is 3040 (for boot) since they use same flash and only slightly different driver settings.

leandrotsampa commented 2 years ago

thanks for this information

i am not sure if you are applying firmware properly.

it sounds like you are not using the right IP. mask is right.

follow instructions here:

https://openwrt.org/docs/guide-user/installation/recovery_methods/d-link_recovery_gui

must set IP to 192.168.0.1

i haven't used 3040 in a while. i know for sure i did test it extremely thoroughly before returning device. and no issues with DIR2640 user @Nikhchan, which 3040 uses same rootfs except slightly different driver setting.

my firmware does not give red LED at all.

if firmware is applied right, you should at least be able to see DD-WRT radio name for SSID. at least one should work.

not sure if it is even flashed properly. could be bug in my firmware, for sure. but if 2640 is fine, then so is 3040 (for boot) since they use same flash and only slightly different driver settings.

Very thanks @i3roly

My problem was because I was not waiting for the final step when it asks to wait for the router to restart. I thought it was over.

Now it's OK, very thanks for the help.

9) The device will reboot automatically after the flashing process finishes

leandrotsampa commented 2 years ago

Sorry @i3roly but after restart I lost access. I redownloaded file and re-apply but it's not giving DD-WRT access. After somes reflash DD-WRT run, but for a short while before stop I get the same result.

This is status now, and allways after reflash this is the result.

i3roly commented 2 years ago

what happened exactly?

can you give me any information?

so it ran once and then froze, and now you can't get back into dd-wrt?

have you tried using resetbutton after flash to reset settings?

leandrotsampa commented 2 years ago

what happened exactly?

can you give me any information?

so it ran once and then froze, and now you can't get back into dd-wrt?

have you tried using resetbutton after flash to reset settings?

Yes, after configure user and password on DD-WRT I rebooted router, after reboot not have more IP access and have this two lights.

But I still have access to recovery mode, the problem is this state not changing after reflash. I can try make a video about that.

i3roly commented 2 years ago

yes it's because of something in settings.

this is why i am saying use resetbutton.

get paper clip and press button that is on back of router by ports. cannot push button without paper clip or pin.

i think i may know issue, but to be sure i need to see status page after you reset using button (not flash. the problem has to do with settings set by firmware, not firmware itself)

leandrotsampa commented 2 years ago

Ok, I maked a reset I get this status:

But still without access to DD-WRT, router not giving DHCP so I tried with manual IP 192.168.1.2 with mask 255.255.255.0 and with this I can ping IP 192.168.1.1 but not have access to http.

And if I power off/power on get this again:

i3roly commented 2 years ago

have you tried to use telnet?

once all lights are up, do you see dd-wrt SSID from your wireless client?

leandrotsampa commented 2 years ago

have you tried to use telnet?

once all lights are up, do you see dd-wrt SSID from your wireless client?

Yes, after a while ping not response anymore. No, apparently after the reset it seems that it gets stuck.

I will try reset and reflash, to check.

i3roly commented 2 years ago

it may have to do with saving to nvram, but i'm not absolutely sure yet.

i can make nvram partitions slightly smaller in next build, but i need to know for sure if that's the problem.

i don't know why it would be.

leandrotsampa commented 2 years ago

After reset and reflash I can see ddwrt wi-fi, but not can connect. And after Power off/on go back to te same problem.

i3roly commented 2 years ago

are there many SSIDs or just one?

have you tried all of them?

wish you had serial access lol -_-

leandrotsampa commented 2 years ago

are there many SSIDs or just one?

have you tried all of them?

wish you had serial access lol -_-

Only one in 5GHz mode. Maybe, I never open.

i3roly commented 2 years ago

i may be able to get one tomorrow and fix this.

sounds to me like there's an issue with radios because you're only seeing one.

i think when you are rebooting the radios try to start up and fail

leandrotsampa commented 2 years ago

Yes, probably is it. Very very thanks my friend, I will wait news. 🤩tks have a nice day

i3roly commented 2 years ago

thanks for bringing this to my attention

hopefully i'll have a solution in 24 hours

i3roly commented 2 years ago

found the problem.

it has to do with the new driver.

        Target address: 0x80000, length: 11072
patch is not ready && get semaphore success
EventGenericEventHandler: CMD Success
MtCmdPatchFinishReq
EventGenericEventHandler: CMD Success
release patch semaphore
WfMcuHwInit: Before NICLoadFirmware, check ICapMode = 0
Parsing CPU 0 fw tailer
        Chip ID: 
0x
04

        Eco version: 
0x
00

        Region number: 
0x
00

        Format version: 
0x
00

        Ram version: 
_
r
e
s
e
r
v
e
d
_

        Built date: 
2
0
1
7
0
6
2
2
0
1
5
4
5
0

        Common crc: 0x0
Parsing tailer region 0
        Feature set: 
0x
01

        Target address: 0x84000, Download size: 409600
Parsing tailer region 1
        Feature set: 
0x
01

        Target address: 0x209c400, Download size: 53056
EventGenericEventHandler: CMD Success
EventGenericEventHandler: CMD Success
MtCmdFwStartReq: override = 0x1, address = 0x84000
EventGenericEventHandler: CMD Success
Parsing CPU 1 fw tailer
        Chip ID: 
0x
04

        Eco version: 
0x
00

        Region number: 
0x
00

        Format version: 
0x
00

        Ram version: 
_
r
e
s
e
r
v
e
d
_

        Built date: 
2
0
1
9
0
4
1
5
1
5
4
1
4
9

        Common crc: 0x0
Parsing tailer region 0
        Feature set: 
0x
01

        Target address: 0x90000000, Download size: 122608
EventGenericEventHandler: CMD Success
MtCmdFwStartReq: override = 0x4, address = 0x0
EventGenericEventHandler: CMD Success
MCU Init Done!
efuse_probe: efuse = 10000212
RtmpChipOpsEepromHook::e2p_type=2, inf_Type=5
RtmpEepromGetDefault::e2p_dafault=1
RtmpChipOpsEepromHook: E2P type(2), E2pAccessMode = 2, E2P default = 1
NVM is FLASH mode. dev_idx [0] FLASH OFFSET [0x0]
NICReadEEPROMParameters: EEPROM 0x52 b302
NICReadEEPROMParameters: EEPROM 0x52 b302
Country Region from e2p = 101
mt7615_antenna_default_reset(): TxPath = 4, RxPath = 4
mt7615_antenna_default_reset(): DBDC BAND0 TxPath = 2, RxPath = 2
mt7615_antenna_default_reset(): DBDC BAND1 TxPath = 2, RxPath = 2
RcRadioInit(): DbdcMode=1, ConcurrentBand=2
RcRadioInit(): pRadioCtrl=8f270f00,Band=0,rfcap=3,channel=1,PhyMode=2 extCha=0xf
RcRadioInit(): pRadioCtrl=8f271204,Band=1,rfcap=2,channel=36,PhyMode=1 extCha=0xf
rcUpdateBandForBFMU     PhyCtrl[0].RadioCtrl.IsBfBand = 1
rcUpdateBandForBFMU     PhyCtrl[1].RadioCtrl.IsBfBand = 0
TxBfModuleEnCtrl:i = 0, pRadioCtrl->IsBfBand = 1
TxBfModuleEnCtrl:i = 1, pRadioCtrl->IsBfBand = 0
TxBfModuleEnCtrl:u1BfNum = 1, u1BfBitmap = 1, u1BfSelBand[0] = 0
FWCmdTimeout: command (ed), ext_cmd_type (45), seq(12), timeout(3000ms)
pAd->Flags  = 0x11002000
txq qlen = 0
rxq qlen = 0
kickq qlen = 0
ackq qlen = 1
tx_doneq.qlen = 0
rx_done qlen = 0
AndesSendCmdMsg: msg state = 8
msg->retry_times = 0
drivers/net/wireless/mtk/mt7615e/mt_wifi_ap/../mt_wifi/embedded/mcu/andes_core.c:887 assert FALSEfailed
CPU: 1 PID: 866 Comm: ifconfig Not tainted 4.14.267 #4871
Stack : 8085a6bc 8c52f894 00000000 00000362 c07d298c 8007fc54 80a50000 80941268
        80a90000 80a90000 8085a6bc 8c52f894 00000001 00000001 8c52f838 8098fe88
        00000000 00000000 80a90000 00000000 00000000 00000262 00000007 00000000
        00000000 80aa0000 80aa0000 6669203a 80000000 00000001 00000000 c07d29a4
        c0181000 c07d296c c07d298c 8c53b000 00000008 8032cd2c 00000004 80a90004
        ...
Call Trace:
[<8001697c>] show_stack+0x58/0x100
[<807c53a0>] dump_stack+0x94/0xc0
[<80531658>] AndesSendCmdMsg+0x814/0x9d4
[<80542744>] MtCmdSetDbdcCtrl+0xec/0x154
[<80527924>] MtAsicSetDbdcCtrlByFw+0x10/0x1c
[<80479294>] RcUpdateBandCtrl+0x5b0/0x62c
[<804771f4>] HcRadioInit+0x18/0x28
[<804fa3f0>] WfEPROMSysInit+0x50/0xd0
[<80481a48>] WfInit+0x114/0x2a4
[<804fcc30>] mt_wifi_init+0x26c/0x718
[<8059f4f4>] mt_wifi_open+0x140/0x1c0
[<8059f5c0>] virtual_if_init_handler+0x4c/0xc0
[<80485680>] RTMP_COM_IoctlHandle+0x6d4/0x1028
[<8059ea5c>] main_virtual_if_open+0xc4/0x1d0
[<8063eae8>] __dev_open+0xbc/0x140
[<8063ed34>] __dev_change_flags+0xd4/0x248
[<8063eed0>] dev_change_flags+0x28/0x70
[<80703214>] devinet_ioctl+0x2c0/0x884
[<8070536c>] inet_ioctl+0x8c/0xd8
[<80618a5c>] sock_ioctl+0x2f0/0x340
[<80132a6c>] do_vfs_ioctl+0x714/0x83c
[<80132be4>] SyS_ioctl+0x50/0x94
[<80022598>] syscall_common+0x34/0x58
MtCmdSetDbdcCtrl:(ret = 1)
RcUpdateBandCtrl(): Error for conifgure dbdc, ret = 1 !
MtSingleSkuLoadParam: RF_LOCKDOWN Feature OFF !!!
MtBfBackOffLoadParam: RF_LOCKDOWN Feature OFF !!!
EEPROM Init Done!
mt_mac_init()-->
mt7615_init_mac_cr()-->
mt7615_init_mac_cr(): TMAC_TRCR0=0x82783c8c
mt7615_init_mac_cr(): TMAC_TRCR1=0x82783c8c
<--mt_mac_init()
FWCmdTimeout: command (ed), ext_cmd_type (47), seq(13), timeout(3000ms)
pAd->Flags  = 0x11002000
txq qlen = 0
rxq qlen = 0
kickq qlen = 0
ackq qlen = 1
tx_doneq.qlen = 0
rx_done qlen = 0
AndesSendCmdMsg: msg state = 8
msg->retry_times = 0
drivers/net/wireless/mtk/mt7615e/mt_wifi_ap/../mt_wifi/embedded/mcu/andes_core.c:887 assert FALSEfailed
CPU: 1 PID: 866 Comm: ifconfig Not tainted 4.14.267 #4871
Stack : 8085a6bc 8c52fa94 00000000 00000362 c07d298c 8007fc54 80a50000 80941268
        80a90000 80a90000 8085a6bc 8c52fa94 00000001 00000001 8c52fa38 8098fe88
        00000000 00000000 80a90000 00000000 00000000 00000296 00000007 00000000
        00000000 80aa0000 80aa0000 6669203a 80000000 00000001 00000000 c07d29a4
        c0181000 c07d296c c07d298c 8c53b400 00000008 8032cd2c 00000004 80a90004
        ...
Call Trace:
[<8001697c>] show_stack+0x58/0x100
[<807c53a0>] dump_stack+0x94/0xc0
[<80531658>] AndesSendCmdMsg+0x814/0x9d4
[<8054e4d8>] CmdRxHdrTransUpdate+0xd8/0x148
[<80525694>] MtAsicRxHeaderTransCtl+0x58/0x6c
[<8052f0fc>] mt_nic_asic_init+0x100/0x180
[<80481ad0>] WfInit+0x19c/0x2a4
[<804fcc30>] mt_wifi_init+0x26c/0x718
[<8059f4f4>] mt_wifi_open+0x140/0x1c0
[<8059f5c0>] virtual_if_init_handler+0x4c/0xc0
[<80485680>] RTMP_COM_IoctlHandle+0x6d4/0x1028
[<8059ea5c>] main_virtual_if_open+0xc4/0x1d0
[<8063eae8>] __dev_open+0xbc/0x140
[<8063ed34>] __dev_change_flags+0xd4/0x248
[<8063eed0>] dev_change_flags+0x28/0x70
[<80703214>] devinet_ioctl+0x2c0/0x884
[<8070536c>] inet_ioctl+0x8c/0xd8
[<80618a5c>] sock_ioctl+0x2f0/0x340
[<80132a6c>] do_vfs_ioctl+0x714/0x83c
[<80132be4>] SyS_ioctl+0x50/0x94
[<80022598>] syscall_common+0x34/0x58
FWCmdTimeout: command (ed), ext_cmd_type (47), seq(14), timeout(3000ms)
pAd->Flags  = 0x11002000
txq qlen = 0
rxq qlen = 0
kickq qlen = 0
ackq qlen = 1
tx_doneq.qlen = 0
rx_done qlen = 0
AndesSendCmdMsg: msg state = 8
msg->retry_times = 0
drivers/net/wireless/mtk/mt7615e/mt_wifi_ap/../mt_wifi/embedded/mcu/andes_core.c:887 assert FALSEfailed
CPU: 1 PID: 866 Comm: ifconfig Not tainted 4.14.267 #4871
Stack : 8085a6bc 8c52fa9c 00000000 00000362 c07d298c 8007fc54 80a50000 80941268
        80a90000 80a90000 8085a6bc 8c52fa9c 00000001 00000001 8c52fa40 8098fe88
        00000000 00000000 80a90000 00000000 00000000 000002be 00000007 00000000
        00000000 80aa0000 80aa0000 6669203a 80000000 00000001 00000000 c07d29a4
        c0181000 c07d296c c07d298c 8c53b000 00000008 8032cd2c 00000004 80a90004
        ...
Call Trace:
[<8001697c>] show_stack+0x58/0x100

cc @paldier

may just be the ramcode configuration.

doing some digging. shouldn't take me too long.

worse case is we have to use 5.0.5.1 for the 3040

leandrotsampa commented 2 years ago

Very thanks friend, I will wait news.

i3roly commented 2 years ago

good news leandro.

it was the ramcodes.

i'm going to post a build very shortly here and please test it and let me know asap.

thanks again for bringing this to my attention. hopefully others won't be afraid to update now.

PS: i would add more things to the 3040 build like php and stuff, but i don't want to make the image too fat. i could probably add more things but we can talk about that later in a different ticket.

right now i wanted to make sure the current image was working. it turns out this was a small issue from a driver update that needed to be fixed.

thanks again.

leandrotsampa commented 2 years ago

I thank you my friend, I'm waiting. \0/

i3roly commented 2 years ago

building now.

was testing dhcp to ensure it works, and i see that it was part of the issue on why you couldn't connect to SSID even though it was available.

turns out newer dnsmasq 2.87test* is shit so i'm reverting back to 2.86.

give me 20 minutes to let the build finish.

i3roly commented 2 years ago

are you ready bro? ARE YOU READY?

BECAUSE IT IS!! lol

leandrotsampa commented 2 years ago

Sorry for delay, but downloading my friend. \0/

leandrotsampa commented 2 years ago

Very very thanks friend, now it's working very good. You have a good configuration to use in wifi to get best speed?

by the way you are to be congratulated.

i3roly commented 2 years ago

nah, no optimal settings--that you're goinna have to figure out yourself.

but autochannel is very good. i use it for all radios.

i can get 500/500 on my DIR-882/878 using shitty mac wifi wireless driver stack on VHT80 client device, on rai0 (5Ghz 1733 device).

you should be able to get that on wl2 (rai0 is wl2 on dir3040) interface no problem if you have better client wifi device.

use VHT160 on wl2. you can set vht160 on wl1 but it will switch to vht80 because it's not rated as fast as wl2.

thanks for the kind words. if you didn't bring this to my attention i wouldn't have known. it was a small problem but it had to be fixed.

@WilliamBernhoeft you can go ahead and try it.

enjoy! if i didn't have a DIR 882, i'd keep the 3040. with usb mount and lootbag, it's really good stuff. 3040/2640 are nice because at least softether etc are on the device, but with usb mount that doesn't matter as much.

@WilliamBernhoeft close this ticket once you upgrade and try it.

@leandrotsampa if @WilliamBernhoeft doesn't close this ticket in 48 hours, please close it (if you remember).

either way, enjoy. haha. better than MT76 driver ^_^

leandrotsampa commented 2 years ago

@i3roly thanks for all. about @WilliamBernhoeft it's me too, I used this account by mistake. But I will close this issue more later.

Congratulations, thanks.