Please help! Firmware issues TP Link 3020

Posted by jw2606 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Please help! Firmware issues TP Link 3020
February 24, 2017 05:02PM
Good afternoon,

Firstly, I'd just like to thank you for all your efforts. I first came across PB around a year ago and have set up half a dozen units for various projects. Real fan.

Now the issue. Having successfully set up PB on both TP Link 3020's and 3040's a few months ago, I purchased a dozen for a new project. I lined them up on a bench and began the setup (formatting the USB drives on a PC with FAT 32) downloading the latest files from your site. However, having upgraded the firmware the units restarted, but with a mixture of results. Some showing root@OpenWrt some showing root@piratebox, another showing root@none and another root@nx24j93

I have noticed that on several units the I am unable to read the contents of the USB drive. I then began troubleshooting, think it may be an issue with the USB drives (32GB SanDisk) I tried a different batch of 16GB SanDisk, still without success I then tried a 4GB USB Imation drive. Still no joy.

I have tried reflashing using both the original and auto_flash methods. Still nothing.

As all of the units appear to be in different states, I have included a snapshot of one of them. This has a 16GB SanDisk USB 2.0 drive attached.

I've been meticulous in following the instructions and having had so much success in the past I am really struggling to find the issue. I have now 7 dead units and 6 more brand new that I dont want to touch until I get a better understanding of what's causing the issue.

The only common element is the Firmware that I have downloaded from the PB site (As I say, 7 units from different stores with 3 different types of USB drive).

[stable.openwrt.piratebox.de]

[stable.openwrt.piratebox.de]

As this code was last modified on the 5th Oct 2016 my previous successful implementions would have been with an earlier version of the firmware.

I have been working on this flat out for 3 days, pulling my hair out (we I would if I had any).

I'd really appreciate your guidance.

Many thanks,


Juan



=== IMPORTANT ============================
Use 'passwd' to set your login password
this will disable telnet and enable SSH
------------------------------------------


BusyBox v1.19.4 (2016-01-26 21:26:14 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
ATTITUDE ADJUSTMENT (12.09.2, r42647, V0.3-MaStr)
With additional backports from BB
[www.friedzombie.com]
-----------------------------------------------------
root@(none):/# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=14592k)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)
root@(none):/#
root@(none):/#
root@(none):/#
root@(none):/# ls -la /mnt/
drwxr-xr-x 1 root root 0 Jan 1 00:01 .
drwxr-xr-x 1 root root 0 Jan 1 00:01 ..
drwxr-xr-x 2 root root 0 Jan 1 00:01 ext
drwxr-xr-x 2 root root 0 Jan 1 00:00 usb
root@(none):/#
root@(none):/#
root@(none):/#
root@(none):/# ls -la /mnt/usb
drwxr-xr-x 2 root root 0 Jan 1 00:00 .
drwxr-xr-x 1 root root 0 Jan 1 00:01 ..
root@(none):/#
root@(none):/#
root@(none):/# ls -la /mnt/usb/PirateBox
ls: /mnt/usb/PirateBox: No such file or directory
root@(none):/#
root@(none):/#
root@(none):/# ls -la /opt/piratebox
drwxr-xr-x 2 root root 0 Jan 1 00:01 .
drwxr-xr-x 3 root root 0 Jan 1 00:01 ..
root@(none):/#
root@(none):/#
root@(none):/# ls -la /opt/piratebox/www
ls: /opt/piratebox/www: No such file or directory
root@(none):/#
root@(none):/#
root@(none):/#
root@(none):/#
root@(none):/# cat /etc/config/network

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'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6addr 'fdc0:ffea::1/64'

config alias
option interface 'lan'
option ip6addr 'fdc0:ffea::fef6:bbd9:5dba:4627/64'
option proto 'static'

root@(none):/#
root@(none):/#
root@(none):/# cat /etc/config/wireless

config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option hwmode '11ng'
option macaddr '84:16:f9:6e:d5:ec'
option htmode 'HT20'
list ht_capab 'SHORT-GI-20'
list ht_capab 'SHORT-GI-40'
list ht_capab 'RX-STBC1'
list ht_capab 'DSSS_CCK-40'

config wifi-iface
option device 'radio0'
option mode 'ap'
option network 'lan'
option ssid 'PirateBox - Share Freely'
option encryption 'none'
option isolate '1'

root@(none):/#
root@(none):/#
root@(none):/# cat /etc/openwrt_release
DISTRIB_ID="OpenWrt_backports"
DISTRIB_RELEASE="12.09.2"
DISTRIB_REVISION="r42647"
DISTRIB_CODENAME="attitude_adjustment"
DISTRIB_TARGET="ar71xx/generic"
DISTRIB_DESCRIPTION="OpenWrt_backports Attitude Adjustment 12.09.2"
DISTRIB_BACKPORT="V0.3-MaStr"
root@(none):/#
root@(none):/#
root@(none):/#
root@(none):/# cat /etc/pbx_custom_image
PBX_auto_Image_2.4
root@(none):/#
root@(none):/#
root@(none):/# ps
PID USER VSZ STAT COMMAND
1 root 1640 S {preinit} /bin/sh /etc/preinit
2 root 0 SW [kthreadd]
3 root 0 SW [ksoftirqd/0]
4 root 0 SW [kworker/0:0]
5 root 0 SW [kworker/u:0]
6 root 0 SW< [khelper]
7 root 0 SW [kworker/u:1]
63 root 0 SW [sync_supers]
65 root 0 SW [bdi-default]
67 root 0 SW< [kblockd]
96 root 0 SW [kswapd0]
144 root 0 SW [fsnotify_mark]
173 root 0 SW< [ath79-spi]
184 root 0 SW [mtdblock0]
189 root 0 SW [mtdblock1]
194 root 0 SW [mtdblock2]
199 root 0 SW [mtdblock3]
204 root 0 SW [mtdblock4]
209 root 0 SW [mtdblock5]
250 root 0 SW [kworker/0:1]
365 root 804 S /sbin/hotplug2 --set-worker /lib/hotplug2/worker_fork.so --set-rules-file /etc/hotplug2-init.rules --persistent
429 root 1496 R telnetd -l /bin/login.sh
435 root 1488 S lock /tmp/.failsafe
436 root 1500 S ash --login
443 root 1500 S /bin/ash --login
466 root 0 SWN [jffs2_gcd_mtd3]
468 root 0 SW [flush-mtd-unmap]
499 root 1496 R ps
root@(none):/#
root@(none):/#
root@(none):/#
root@(none):/#
Re: Please help! Firmware issues TP Link 3020
February 24, 2017 06:46PM
Hi,
make sure, that the USB sticks are not only FAT32, but it must be partitioned with one partition in MBR mode, not GPT.
This means, on linux (and openwrt) these USB must appear as /dev/sda & /dev/sda1

Also, if a flash started partially, then do not change the USB stick.

About the bash prompts:

root@(none) -> Device in failsafe mode
root@piratebox -> older image without mesh support
root@nx24j93 -> Correct state. nx24j93 is a randomly created name as a mesh node
root@Openwrt -> no installation at all. maybe install folder used or USB not found

In failsafe mode, the technical commands are not useful. Only in normal boot (not in (none) hostname).

auto_flash can only work, if the USB stick is detected. This needs the requirement with FAT32+MBR Partition. If you used vanilla USB sticks, they might not be correctly partition formatted by factory.

Last but not least: a single install can take up to 40 minutes with a 3 or 4 automatic reboots.

best regards
Matthias
Re: Please help! Firmware issues TP Link 3020
February 25, 2017 06:50AM
Many thanks Matthias, I'll format a stick again (I had previously used the SanDisk sticks but they were a different model (although I had formated them in the same way, I hand't checked the partition table). After the reformat, I'll try the auto_flash method first and let you know how I get on.

Thank you,

J.
Re: Please help! Firmware issues TP Link 3020
February 25, 2017 01:19PM
Hello

I had tried using my mac (in Terminal) to format the USB drives, however, I noticed that they actually formatted them as DOS_FAT32. I didn't want to risk it again so downloaded and installed a copy of Ubuntu desktop and formatted the USB drives with that.

I then used the auto_flash method. I left the 3020 for 90mins to ensure it had plenty of time, but on boot the unit appears to be in mesh mode as you referred to it root@YEt8zk3Q:/# Wifi doesn't give out any DHCP, and when I looked at the OPT, piratebox and www directories these remain empty.

Could you please let me know the best method to try next.

I shall set this unit aside and try to use the "Reflash using an USB Stick" method with another unit.

I very much appreciate your help.


J.


Juans-Mac-mini:~ juanwhitby$ telnet 192.168.1.1
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
=== IMPORTANT ============================
Use 'passwd' to set your login password
this will disable telnet and enable SSH
------------------------------------------


BusyBox v1.19.4 (2016-01-26 21:26:14 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
ATTITUDE ADJUSTMENT (12.09.2, r42647, V0.3-MaStr)
With additional backports from BB
[www.friedzombie.com]
-----------------------------------------------------
* 1/4 oz Vodka Pour all ingredients into mixing
* 1/4 oz Gin tin with ice, strain into glass.
* 1/4 oz Amaretto
* 1/4 oz Triple sec
* 1/4 oz Peach schnapps
* 1/4 oz Sour mix
* 1 splash Cranberry juice
-----------------------------------------------------
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=14592k)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,relatime,lowerdir=/,upperdir=/overlay)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/# ls -la /mnt/
drwxr-xr-x 1 root root 0 Jan 1 00:01 .
drwxr-xr-x 1 root root 0 Jan 1 00:03 ..
drwxr-xr-x 2 root root 0 Jan 1 00:01 ext
drwxr-xr-x 2 root root 0 Jan 1 00:00 usb
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/# ls -la /mnt/usb
drwxr-xr-x 2 root root 0 Jan 1 00:00 .
drwxr-xr-x 1 root root 0 Jan 1 00:01 ..
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/# ls -la /mnt/usb/PirateBox
ls: /mnt/usb/PirateBox: No such file or directory
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/# ls -la /opt/piratebox
drwxr-xr-x 2 root root 0 Jan 1 00:03 .
drwxr-xr-x 3 root root 0 Jan 1 00:03 ..
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/# ls -la /opt/piratebox/www
ls: /opt/piratebox/www: No such file or directory
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/# cat /etc/config/network

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'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6addr 'fdc0:ffea::1/64'

config alias
option interface 'lan'
option ip6addr 'fdc0:ffea::4f30:8d1e:c1fc:94c5/64'
option proto 'static'

root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/# cat /etc/config/wireless

config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option hwmode '11ng'
option macaddr '84:16:f9:6f:02:04'
option htmode 'HT20'
list ht_capab 'SHORT-GI-20'
list ht_capab 'SHORT-GI-40'
list ht_capab 'RX-STBC1'
list ht_capab 'DSSS_CCK-40'

config wifi-iface
option device 'radio0'
option mode 'ap'
option network 'lan'
option ssid 'PirateBox - Share Freely'
option encryption 'none'
option isolate '1'

root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/# cat /etc/openwrt_release
DISTRIB_ID="OpenWrt_backports"
DISTRIB_RELEASE="12.09.2"
DISTRIB_REVISION="r42647"
DISTRIB_CODENAME="attitude_adjustment"
DISTRIB_TARGET="ar71xx/generic"
DISTRIB_DESCRIPTION="OpenWrt_backports Attitude Adjustment 12.09.2"
DISTRIB_BACKPORT="V0.3-MaStr"
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/# cat /etc/pbx_custom_image
PBX_auto_Image_2.3.2
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/#
root@YEt8zk3Q:/# ps
PID USER VSZ STAT COMMAND
1 root 1504 S init
2 root 0 SW [kthreadd]
3 root 0 SW [ksoftirqd/0]
5 root 0 SW [kworker/u:0]
6 root 0 SW< [khelper]
7 root 0 SW [kworker/u:1]
63 root 0 SW [sync_supers]
65 root 0 SW [bdi-default]
67 root 0 SW< [kblockd]
96 root 0 SW [kswapd0]
144 root 0 SW [fsnotify_mark]
173 root 0 SW< [ath79-spi]
184 root 0 SW [mtdblock0]
189 root 0 SW [mtdblock1]
194 root 0 SW [mtdblock2]
199 root 0 SW [mtdblock3]
204 root 0 SW [mtdblock4]
209 root 0 SW [mtdblock5]
250 root 0 SW [kworker/0:1]
442 root 0 SWN [jffs2_gcd_mtd3]
472 root 0 SW [khubd]
481 root 0 SW [scsi_eh_0]
482 root 0 SW [usb-storage]
483 root 0 SW [kworker/0:2]
505 root 1504 S init
538 root 0 SW< [cfg80211]
618 root 0 SW< [bat_events]
645 root 1508 S /sbin/syslogd -C16
647 root 1488 S /sbin/klogd
649 root 864 S /sbin/hotplug2 --override --persistent --set-rules-file /etc/hotplug2.rules --set-coldplug-cmd /sbin/udevtrigger --max-children 1
659 root 872 S /sbin/ubusd
685 root 1472 S /sbin/netifd
1124 root 1640 S hostapd -P /var/run/wifi-phy0.pid -B /var/run/hostapd-phy0.conf
1211 root 1500 S /sbin/watchdog -t 5 /dev/watchdog
1302 root 1152 S /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22
1313 root 1496 R /usr/sbin/telnetd -l /bin/login.sh
1337 root 1500 S /usr/sbin/ntpd -n -p 0.openwrt.pool.ntp.org -p 1.openwrt.pool.ntp.org -p 2.openwrt.pool.ntp.org -p 3.openwrt.pool.ntp.org
1348 root 1500 S /bin/ash --login
1374 root 1496 R ps
root@YEt8zk3Q:/#
Re: Please help! Firmware issues TP Link 3020
February 26, 2017 11:35AM
Can you please post the output of:

dmesg | tail -n 20 
 dmesg | grep sda
 ls /dev/sd*
Re: Please help! Firmware issues TP Link 3020
February 26, 2017 02:01PM
What kind of power source do you use? Is it sufficient?
Re: Please help! Firmware issues TP Link 3020
February 26, 2017 05:06PM
I have just spotted, that I have used a mixture.

I have used the ones supplied but noticed that I had attempted to configure 2 units powered from the USB ports on the rear of my Mac display, and further noticed that I had only connected one of the USB A Ports (clearly there's two for a reason to provide the 3020 with sufficient power) which I hadn't noticed until you mentioned it.

I have just been able to successfully auto_flash the first 3020 (having reformated the USB card using Ubuntu and connecting it to the supplied USB PSU (not my monitor).

I now have 8 3020's in various states of distress, which I shall continue to work through (with your much appreciated assistance).

As an aside, this afternoon I popped out and bought some 3040's I went through the setup process and the very first one configured successfully.

I did identify a formatting issue on one of the USB drives (default 4MB partition), so removed that.

I have formatted all of the USB drives using Ubuntu Disks utility, removing all partitions and formatting them to FAT32.

I'm currently trying them one at a time and will let you know the reported output that you requested as soon as I finish with this unit.

I really appreciate your support and once I'm done I'd like to offer some help to review some of the documentation (if that helps). During this process, I've spotted a couple of areas that confused me (I am new to this but very excited at the applications particularly in the education and humanitarian relief areas - an area I work in, in the Middle East) and feel it my duty to give something back for the support you've given.

Once again thank you, and as soon as I progress to the next unit, I'll feedback to you.


J.
Re: Please help! Firmware issues TP Link 3020
February 26, 2017 05:39PM
Here's a copy of the request output;

BusyBox v1.19.4 (2016-01-26 21:26:14 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
ATTITUDE ADJUSTMENT (12.09.2, r42647, V0.3-MaStr)
With additional backports from BB
[www.friedzombie.com]
-----------------------------------------------------
root@bGAWKeuf:/# dmesg | tail -n 20
[ 36.560000] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 36.570000] device eth0 entered promiscuous mode
[ 36.590000] ADDRCONF(NETDEV_UP): br-lan: link is not ready
[ 41.730000] usb 1-1: reset high-speed USB device number 2 using ehci-platform
[ 43.800000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 43.800000] device wlan0 entered promiscuous mode
[ 43.820000] br-lan: port 2(wlan0) entered forwarding state
[ 43.830000] br-lan: port 2(wlan0) entered forwarding state
[ 43.830000] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 43.840000] ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 45.830000] br-lan: port 2(wlan0) entered forwarding state
[ 58.020000] usb 1-1: reset high-speed USB device number 2 using ehci-platform
[ 58.300000] usb 1-1: reset high-speed USB device number 2 using ehci-platform
[ 68.570000] usb 1-1: reset high-speed USB device number 2 using ehci-platform
[ 68.720000] scsi 0:0:0:0: Device offlined - not ready after error recovery
[ 1663.650000] eth0: link up (100Mbps/Full duplex)
[ 1663.650000] br-lan: port 1(eth0) entered forwarding state
[ 1663.660000] br-lan: port 1(eth0) entered forwarding state
[ 1663.660000] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 1665.660000] br-lan: port 1(eth0) entered forwarding state
root@bGAWKeuf:/# dmesg | grep sda
root@bGAWKeuf:/# ls /dev/sd*
ls: /dev/sd*: No such file or directory
root@bGAWKeuf:/#
Re: Please help! Firmware issues TP Link 3020
February 26, 2017 08:00PM
Hi,
ok, thank you for the detailed feedback.

This clearly looks like an issue with power & USB sticks:

[...]
[ 58.020000] usb 1-1: reset high-speed USB device number 2 using ehci-platform
[ 58.300000] usb 1-1: reset high-speed USB device number 2 using ehci-platform
[ 68.570000] usb 1-1: reset high-speed USB device number 2 using ehci-platform
[ 68.720000] scsi 0:0:0:0: Device offlined - not ready after error recovery

So, the USB stick goes offline after reading errors with the hardware device. I recommend using the shipped power unit.
That might solve some of the issues. There is still a few percent left, that there is a problem with newer revisions of the MR3020 board. At least the MR3040 is pretty similar and that worked out.

Quote

I did identify a formatting issue on one of the USB drives (default 4MB partition), so removed that.
Be careful. The 4MB partition might be from the other partition type GPT: [en.wikipedia.org]
I noticed on other USB sticks, that in GPT mode, the first partition is hidden on normal computers, but on the "old" MR3020 you can see it with that limit amount of space. Archlinux-wiki usually provides pretty good HowTos, have a look at the linked page.

Thank you for your offer! Any help is appreciated.

best regards
Matthias
Re: Please help! Firmware issues TP Link 3020
March 07, 2017 08:40AM
Hi Matthias,

Sorry for the delay but I have been travelling. The problem did appear to be the power issue. Once I used the OEM PSU and ensured the USB sticks were formatted on an Ubuntu system, I was able to successfully configure the rest of the units. Most units displayed the Mesh host name root@Ndfs12d instead of root@piratebox as was the case previously, but they are still working.

I really appreciate your support,

Best regards,


J.
Re: Please help! Firmware issues TP Link 3020
March 12, 2017 07:07AM
Ok, cool.
Very good it is working now.

best regards
Matthias