Posted: Sat Jun 09, 2018 14:16 Post subject: serial tx/rx and gnd
Hi,
Thank u ian5142 for your quick and valuable input, helps a lot. But I wasn't sure how to figure the correct Gnd, tx and rx pins. But after searching and watching some utube vidoes i.e.,
Posted: Sat Jun 09, 2018 21:49 Post subject: 841ND v10
I would like to try and start with a 841ND v10 and modify that. As for the flash (size matches, just not model) and RAM not matching that should not matter.
TFTP Recovery is really easy on most TP-Link routers. Not as easy as Asus but still.
What version is your 841HP by the way?
What country did you buy it in?
Posted: Tue Jun 12, 2018 0:29 Post subject: Serial
Serial, not SSH or Telnet, right?
I have never seen a router ask for a username and password. Not on serial. Show the entire boot process, from the top. It will say somewhere to intrrupt the boot sequence press any key or press some combination (most TP-Links use tpl), other routers use CTRL + C. _________________ Before asking a question on the forums, update dd-wrt: Where do I download firmware? I suggest reading it all.
QCA Best WiFi Settings
Some dd-wrt wiki pages are up to date, others are not. PM me if you find an old one.
Atheros:
Netgear R7800 x3 - WDS AP / station, gateway, QoS
TP-Link Archer C7 v2 x2 - WDS Station
TP-Link TL-WDR3600 v1 - WDS Station
TP-Link 841nd v8 - NU
D-Link 615 C1/E3/I1 x 7 - 1 WDS station
D-Link 825 B1 - NU
D-Link 862L A1 x2 - WDS Station
Netgear WNDR3700v2 - NU
UBNT loco M2 x2 - airOS
Broadcom
Linksys EA6400 - Gateway, QoS
Asus N66U - AP
Netgear WNDR3700v3 - not used
MediaTek
UBNT EdgeRouter X - switch
Posted: Tue Jun 12, 2018 4:09 Post subject: It's the serial console
Hi ian5142,
While booting I must keep the tx/rx wires disconnected to boot, otherwise the router do not boot. After about 2 or 3 seconds of powerup connect tx/rx lines to the modem. After bootup Press enter and login prompt appears.
Cannot attach files so pasting it here(Console Log),
=====================================
U-Boot 1.1.4 (Jun 12 2016 - 17:31:30)
NET: Registered protocol family 16
ath_pcibios_init: bus 0
***** Warning PCIe 0 H/W not found !!!
registering PCI controller with io_map_base unset
bio: create slab <bio-0> at 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
ATH GPIOC major 0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
msgmni has been set to 109
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xb8020000 (irq = 19) is a 16550A
console [ttyS0] enabled
PPP generic driver version 2.4.2
NET: Registered protocol family 24
5 cmdlinepart partitions found on MTD device ath-nor0
Creating 5 MTD partitions on "ath-nor0":
0x000000000000-0x000000020000 : "u-boot"
0x000000020000-0x000000120000 : "kernel"
0x000000120000-0x0000007e0000 : "rootfs"
0x0000007e0000-0x0000007f0000 : "config"
0x0000007f0000-0x000000800000 : "art"
->Oops: flash id 0xc84017 .
nf_conntrack version 0.5.0 (1024 buckets, 5120 max)
xt_time: kernel timezone is -0000
Ooops, why the devices couldn't been initialed?
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 10
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
athwdt_init: Registering WDT success
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 124k freed
init started: BusyBox v1.01 (2016.06.12-09:37+0000) multi-call binary
This Board use 2.6.31
insmod: cannot open module `/lib/modules/2.6.31/kernel/x_tables.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xt_tcpudp.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xt_MARK.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xt_TCPMSS.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xt_comment.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xt_iprange.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xt_mac.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xt_multiport.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xt_string.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xt_time.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/ipt_multiurl.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/nf_conntrack.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xt_conntrack.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xt_state.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/nf_defrag_ipv4.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/nf_conntrack_ipv4.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/nf_nat.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/ip_tables.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/iptable_filter.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/iptable_nat.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/iptable_raw.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/ipt_MASQUERADE.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/ipt_REDIRECT.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/ipt_REJECT.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/ipt_TRIGGER.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/ts_kmp.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/flashid.ko': No such file or directory
PPPoL2TP kernel driver, V1.0
PPTP driver version 0.8.3
insmod: cannot open module `/lib/modules/2.6.31/kernel/harmony.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/af_key.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xfrm_user.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xt_mark.ko': No such file or directory
qca955x_GMAC: Length per segment 1536
953x_GMAC: qca953x_gmac_attach
Link Int Enabled
qca953x_set_gmac_caps CHECK DMA STATUS
mac:1 Registering S27....
qca955x_GMAC: RX TASKLET - Pkts per Intr:18
qca955x_GMAC: Max segments per packet : 1
qca955x_GMAC: Max tx descriptor count : 511
qca955x_GMAC: Max rx descriptor count : 128
qca955x_GMAC: Mac capability flags : 2D81
953x_GMAC: qca953x_gmac_attach
Link Int Enabled
qca953x_set_gmac_caps CHECK DMA STATUS
mac:0 Registering S27....
qca955x_GMAC: RX TASKLET - Pkts per Intr:18
qca955x_GMAC: Max segments per packet : 1
qca955x_GMAC: Max tx descriptor count : 511
qca955x_GMAC: Max rx descriptor count : 128
qca955x_GMAC: Mac capability flags : 2581
(none) mips #380 Sun Jun 12 17:34:21 CST 2016 (none)
(none) login: athr_gmac_ring_alloc Allocated 8176 at 0x83886000
athr_gmac_ring_alloc Allocated 2048 at 0x83a59800
HONEYBEE ----> S27 PHY MDIO
ATHRS27: resetting s27
ATHRS27: s27 reset done
++++ athrs27_igmp_setup once
port0 vid is 0xb000b
port1 vid is 0x30003
port2 vid is 0x50005
port3 vid is 0x70007
port4 vid is 0x90009
++ PVID: 0x0000000b, bitmap: 0x0000001f
++ PVID: 0x00000003, bitmap: 0x0000001f
++ PVID: 0x00000005, bitmap: 0x0000001f
++ PVID: 0x00000007, bitmap: 0x0000001f
++ PVID: 0x00000009, bitmap: 0x0000001f
vtable vid: 0x00000002, bitmap 0x00000003
vtable vid: 0x00000004, bitmap 0x00000005
vtable vid: 0x00000006, bitmap 0x00000007
vtable vid: 0x00000008, bitmap 0x00000009
vtable vid: 0x0000000a, bitmap 0x0000000b
vtable vid: 0x0000000c, bitmap 0x0000000d
vtable vid: 0x0000000e, bitmap 0x0000000f
vtable vid: 0x00000010, bitmap 0x00000011
vtable vid: 0x00000012, bitmap 0x00000013
vtable vid: 0x00000014, bitmap 0x00000015
vtable vid: 0x00000016, bitmap 0x00000017
vtable vid: 0x00000018, bitmap 0x00000019
vtable vid: 0x0000001a, bitmap 0x0000001b
vtable vid: 0x0000001c, bitmap 0x0000001d
vtable vid: 0x0000001e, bitmap 0x0000001f
vtable vid: 0x00000020, bitmap 0x00000021
Setting Drop CRC Errors, Pause Frames and Length Error frames
Setting PHY...
ADDRCONF(NETDEV_UP): eth0: link is not ready
athr_gmac_ring_alloc Allocated 8176 at 0x8387a000
athr_gmac_ring_alloc Allocated 2048 at 0x839f9000
HONEYBEE ----> S27 PHY MDIO
Setting Drop CRC Errors, Pause Frames and Length Error frames
Setting PHY...
ADDRCONF(NETDEV_UP): eth1: link is not ready
device eth0 entered promiscuous mode
athr_gmac_ring_free Freeing at 0x8387a000
athr_gmac_ring_free Freeing at 0x839f9000
athr_gmac_ring_alloc Allocated 8176 at 0x8387c000
athr_gmac_ring_alloc Allocated 2048 at 0x839f9000
HONEYBEE ----> S27 PHY MDIO
Setting Drop CRC Errors, Pause Frames and Length Error frames
Setting PHY...
ADDRCONF(NETDEV_UP): eth1: link is not ready
athr_gmac_ring_free Freeing at 0x83886000
athr_gmac_ring_free Freeing at 0x83a59800
athr_gmac_ring_alloc Allocated 8176 at 0x83878000
athr_gmac_ring_alloc Allocated 2048 at 0x83a59800
HONEYBEE ----> S27 PHY MDIO
Setting Drop CRC Errors, Pause Frames and Length Error frames
Setting PHY...
ADDRCONF(NETDEV_UP): eth0: link is not ready
nf_conntrack_rtsp v0.6.21 loading
nf_nat_rtsp v0.6.21 loading
adf: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
ath_hal: 0.9.17.1 (AR5416, AR9380, REGOPS_FUNC, WRITE_EEPROM, TX_DATA_SWAP, RX_DATA_SWAP, 11D)
ath_rate_atheros: Copyright (c) 2001-2005 Atheros Communications, Inc, All Rights Reserved
ath_dev: Copyright (c) 2001-2007 Atheros Communications, Inc, All Rights Reserved
ath_ahb: 10.2-00082-4 (Atheros/multi-bss)
__ath_attach: Set global_scn[0]
Enterprise mode: 0x03fc0000
Restoring Cal data from Flash
ath_get_caps[6191] rx chainmask mismatch actual 3 sc_chainmak 0
ath_get_caps[6166] tx chainmask mismatch actual 3 sc_chainmak 0
wifi0: Atheros ???: mem=0xb8100000, irq=2
ath_pci: 10.2-00082-4 (Atheros/multi-bss)
VAP device ath0 created
Setting Max Stations:32
ieee80211_ioctl_siwmode: imr.ifm_active=131712, new mode=3, valid=1
Set freq vap stop send + 832f8000
Set freq vap stop send -832f8000
Set wait done --832f8000
Set freq vap stop send + 832f8000
Set freq vap stop send -832f8000
Set wait done --832f8000
athr_gmac_ring_free Freeing at 0x83878000
athr_gmac_ring_free Freeing at 0x83a59800
br0: port 1(eth0) entering disabled state
athr_gmac_ring_alloc Allocated 8176 at 0x83b46000
athr_gmac_ring_alloc Allocated 2048 at 0x83a59800
HONEYBEE ----> S27 PHY MDIO
Setting Drop CRC Errors, Pause Frames and Length Error frames
Setting PHY...
ADDRCONF(NETDEV_UP): eth0: link is not ready
device ath0 entered promiscuous mode
br0: port 2(ath0) entering forwarding state
ieee80211_ioctl_siwmode: imr.ifm_active=131712, new mode=3, valid=1
br0: port 2(ath0) entering disabled state
DEVICE IS DOWN ifname=ath0
DEVICE IS DOWN ifname=ath0
DES SSID SET=iTSLBD1
br0: port 2(ath0) entering forwarding state
Scan in progress.. Cancelling it
br0: port 2(ath0) entering disabled state
br0: port 2(ath0) entering forwarding state
====>>>>wlanBootupAll ok
Scan in progress.. Cancelling it
br0: port 2(ath0) entering disabled state
DES SSID SET=iTSLBD1
br0: port 2(ath0) entering forwarding state
ieee80211_ioctl_siwmode: imr.ifm_active=393856, new mode=3, valid=1
Scan in progress.. Cancelling it
br0: port 2(ath0) entering disabled state
DEVICE IS DOWN ifname=ath0
DEVICE IS DOWN ifname=ath0
IPv6 over IPv4 tunneling driver
br0: port 2(ath0) entering forwarding state
qca955x_GMAC: GE0 RX DMA ENABLE
blockWps_proc_write 1278: write value = 0
mlme_create_infra_bss : Overriding HT40 channel with HT20 channel
TL-WR841HP mips #380 Sun Jun 12 17:34:21 CST 2016 (none)
TL-WR841HP login:
=============================================
Posted: Tue Jun 12, 2018 4:47 Post subject: tftp boot
Hi ian5142,
I hv also figured out from serial log what files and ip it's looking for in tftp boot(Pressing reset while powering on,
=====================
Using eth1 device
TFTP from server 192.168.0.66; our IP address is 192.168.0.86
Filename 'wr841hpv3_tp_recovery.bin'.
Load address: 0x80800000
Loading: T T T
Retry count exceeded; starting again
## Booting image at 9f020000 ...
Uncompressing Kernel Image ... OK
Posted: Tue Jun 12, 2018 5:16 Post subject: booting into command prompt
hi ian5142,
I'm just a human and cannot send command while booting starts(too fast)., so what i did, I hv set minicom to initialize the router/modem with tpl and started minicom right after I power up and connect tx/rx line after 2 seconds, and now got the command prompt and stop booting into current firmwere, i believe it's boot loader prompt, which i did 1000 times in linux lilo and currently in grub bootloader,
Welcome to minicom 2.7.1
OPTIONS: I18n
Compiled on Jun 5 2018, 10:54:41.
Port /dev/ttyUSB0, 11:02:06
Press CTRL-A Z for help on special keys
ap143-2.0> ls
Unknown command 'ls' - try 'help'
ap143-2.0> help
? - alias for 'help'
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootm - boot application image from memory
cp - memory copy
erase - erase FLASH memory
help - print online help
mct - simple RAM test
md - memory display
mm - memory modify (auto-incrementing)
mtest - simple RAM test
mw - memory write (fill)
nm - memory modify (constant address)
ping - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
progmac - Set ethernet MAC addresses
progmac2 - Set ethernet MAC addresses
reset - Perform RESET of the CPU
run - run commands in an environment variable
setenv - set environment variables
tftpboot- boot image via network using TFTP protocol
version - print monitor version
ap143-2.0>
================
Let me know what command this u-boot takes, I wil try help..
So, setup a TFTP server with one of my modified files. Rename the file to "wr841hpv3_tp_recovery.bin" (without quotes).
Set the ip on the computer to 192.168.0.66.
Reboot the router and watch it grab the file from the computer. It will then try to flash it. Watch the serial window, it will show when it is done or if it gives an error. _________________ Before asking a question on the forums, update dd-wrt: Where do I download firmware? I suggest reading it all.
QCA Best WiFi Settings
Some dd-wrt wiki pages are up to date, others are not. PM me if you find an old one.
Atheros:
Netgear R7800 x3 - WDS AP / station, gateway, QoS
TP-Link Archer C7 v2 x2 - WDS Station
TP-Link TL-WDR3600 v1 - WDS Station
TP-Link 841nd v8 - NU
D-Link 615 C1/E3/I1 x 7 - 1 WDS station
D-Link 825 B1 - NU
D-Link 862L A1 x2 - WDS Station
Netgear WNDR3700v2 - NU
UBNT loco M2 x2 - airOS
Broadcom
Linksys EA6400 - Gateway, QoS
Asus N66U - AP
Netgear WNDR3700v3 - not used
MediaTek
UBNT EdgeRouter X - switch
Posted: Wed Jun 13, 2018 6:47 Post subject: initramfs live booting image/kernel
Hi ian5142,
The reason I connected serial/usb to reduce risk of bricking my device.
Anyway, I hv already figured out how to test live image like any other ordinary linux distro.
I'm using serial to boot into u-boot shell(see my previous post) and set ip's and then transfer the boot image to the routers ram LIVE. And execute it without flashing it!!
But it requires Image of type "initramfs". Please generate initramfs image of dd-wrt 841v10 and I will try it without fear!!!!!
So far Ihv tried 841v11 and v10 openwrt and none can boot as I made them too big!!!, or gets stuck at the "booting kernel..." thing.... will see.
Just make sure to use the correct size and location numbers. _________________ Before asking a question on the forums, update dd-wrt: Where do I download firmware? I suggest reading it all.
QCA Best WiFi Settings
Some dd-wrt wiki pages are up to date, others are not. PM me if you find an old one.
Atheros:
Netgear R7800 x3 - WDS AP / station, gateway, QoS
TP-Link Archer C7 v2 x2 - WDS Station
TP-Link TL-WDR3600 v1 - WDS Station
TP-Link 841nd v8 - NU
D-Link 615 C1/E3/I1 x 7 - 1 WDS station
D-Link 825 B1 - NU
D-Link 862L A1 x2 - WDS Station
Netgear WNDR3700v2 - NU
UBNT loco M2 x2 - airOS
Broadcom
Linksys EA6400 - Gateway, QoS
Asus N66U - AP
Netgear WNDR3700v3 - not used
MediaTek
UBNT EdgeRouter X - switch
_________
/ /\ _ ___ ___ ___
/ LE / \ | | | __| \| __|
/ DE / \ | |__| _|| |) | _|
/________/ LE \ |____|___|___/|___| lede-project.org
\ \ DE /
\ LE \ / -----------------------------------------------------------
\ DE \ / Reboot (17.01-SNAPSHOT, r3909-b6a1f43075)
\________\/ -----------------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@LEDE:/# passwd
Changing password for root
New password:
Bad password: too weak
Retype password:
passwd: password for root changed by root
root@LEDE:/# ls
bin etc lib overlay rom sbin tmp var
dev init mnt proc root sys usr www
root@LEDE:/# cat /proc/cpuinfo
system type : Qualcomm Atheros QCA9533 ver 2 rev 0
machine : TP-LINK TL-WR841N/ND v9
processor : 0
cpu model : MIPS 24Kc V7.4
BogoMIPS : 432.53
wait instruction : yes
microsecond timers : yes
tlb_entries : 16
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0]
isa : mips1 mips2 mips32r1 mips32r2
ASEs implemented : mips16
shadow register sets : 1
kscratch registers : 0
package : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available
Posted: Wed Jun 13, 2018 14:30 Post subject: after reboot
I hv rebooted Lede and the Org tplink firmware took control and boot on the spot, it's fully intact as expected. So, Lede booted from the ram not flash rom.
Note openwrt firmware was fully compiled and configured by me. But took help from online and other threads on your forum!! about how to go and boot from ram.
Great stuff going on here.
If u are compiling images then u can create a ramfs image, i guess..I will try that later with dd-wrt.
Now, it's time for me to figure out how to get Luci/uhttpd running and get a web server up on Lede/openwrt.