OpenWrt Forum Archive

Topic: Can't communicate with Sitecom WL-351 through Serial.

The content of this topic has been archived on 16 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hey there! I just got a new router and thus I wanted to experiment with my old router, the Sitecom WL-351. This is the first time I have ever tried to install custom firmware on a router.
I am following this wiki page: http://wiki.openwrt.org/toh/sitecom/wl-351

Alright, so the problem I am having is that even though I can receive information from the router, I can't send any keystrokes to it. After trying both wires and headers, resoldering them both multiple times and testing the connections multiple times with a continuity tester I am certain the solder connections are good.
I don't think it is the USB-to-Serial adapter I use either as I have tried it with both my adapter and an Arduino (with 3v3 lvl converter). With both devices the TX light is flickering.

I have no clue what I am doing wrong, or how I can solve this and I hope someone can help me with this problem.

This is the output I get from the router.

@


U-boot Ver:1.0.1.157 2010/05/17


Board: Ralink APSoC DRAM:  32 MB  2*16 MB
============================================
ASIC 3052_MP2 (Port5<->GigaSW)
Product Name: ESR9850
SDRAM CAS = 3(d1835272)
============================================

Please choose the operation:
   1: Load system code to SDRAM via TFTP.

LINUX started...

 THIS IS ASIC
init started: BusyBox v1.7.5 (2013-01-24 15:06:52 CST)
starting pid 131, tty '/dev/console': '/sbin/config_init'
mknod: /dev/ttyS0: File exists
mknod: /dev/ttyS1: File exists
Config Init version: 2.5.2.6 date: 2013/01/24
Tue Jan  1 00:00:00 UTC 2013
mount: can't find /sys in /etc/fstab or /etc/mtab
ln: /lib/./modules: File exists
switch reg write offset=94, value=7f00
Could not find Watchdog driver (/apps/lib/modules/2.6.21/kernel/arch/mips/rt2880/rt_timer.ko)
starting pid 178, tty '/dev/ttyS1': '/sbin/config_term'
************************************************************************
*                                   WL-351                             *
************************************************************************

KernelApp/Ramdisk Ver:2.5.2.6                    Date:2013/01/24
password:

hi

check the traces for missing resistors..
if you have  multimeter measure gnd+rx ~ 3V same tx and pwr
else the uboot might be locked

makarel wrote:

hi

check the traces for missing resistors..
if you have  multimeter measure gnd+rx ~ 3V same tx and pwr
else the uboot might be locked

Hmm, there is 3.3v between ground and rx but not between tx and power.
There is also what seems to be a resistor missing that would probably connect tx and power. Between the two traces there is 3.3v running.
http://imgur.com/Z9rOhkp

And thanks for trying to help me!

(Last edited by SliinQ on 9 Sep 2015, 21:31)

gnd-tx, gnd-rx, gnd-pwr all have ~3v.. you missunderstood
(look on rx line for a missing resistor) edit: considering you have 3V.. id say bootloader is locked
do not connect TTL adapter to pwr pin.. use only rx tx and gnd

(Last edited by makarel on 9 Sep 2015, 22:18)

makarel wrote:

gnd-tx, gnd-rx, gnd-pwr all have ~3v.. you missunderstood
(look on rx line for a missing resistor) edit: considering you have 3V.. id say bootloader is locked
do not connect TTL adapter to pwr pin.. use only rx tx and gnd

Haha sorry, I already found it quite strange. Yes gnd-tx, gnd-rx and gnd-pwr all have 3v.
That is too bad... I there any way to bypass this lock? And no, I wasn't connecting the adapter to pwr.

check gogle.. for  tricks bypassing lock.. but slim chance.. if its not already documented in wiki..
im also looking for a simple solution to nand flash r/w device..

makarel wrote:

check gogle.. for  tricks bypassing lock.. but slim chance.. if its not already documented in wiki..
im also looking for a simple solution to nand flash r/w device..

Just searched the web for about 2 hours and came past some pretty interesting Chinese forum threads but nothing about unlocking or a locked bootloader.
Anyway, thanks for your help! If I find a way to flash the device I will be sure to update this thread.

SliinQ wrote:
makarel wrote:

hi

check the traces for missing resistors..
if you have  multimeter measure gnd+rx ~ 3V same tx and pwr
else the uboot might be locked

Hmm, there is 3.3v between ground and rx but not between tx and power.
There is also what seems to be a resistor missing that would probably connect tx and power. Between the two traces there is 3.3v running.
http://imgur.com/Z9rOhkp

And thanks for trying to help me!

It works fine for me without soldering in any resistor, though something in the current images is borken with regards to the switch setup, I can't get wired ethernet to work with either
openwrt-15.05-rc3-ramips-rt305x-wl-351-squashfs-sysupgrade.bin (which is also missing the rtl8366 driver)
or
openwrt-15.05-rc3-ramips-rt305x-f5d8235v2-squashfs-sysupgrade.bin (should be compatible, has the rtl8366 driver)

Do you have the same board revision as on the wiki page images or a different one?

Patch needed to get the WL-351 image to work again:

[PATCH] Fix up switch settings for Sitecom WL-351 v1 002

Pinmux for rgmii needs to be set to rgmii, not gpio.
Hide the ESW switch on boot (using new rgmii esw devicetree attribute).
Also add a Sitecom-specific profile, since the image needs to include
the rtl8366 kernel driver.

Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>
---
 target/linux/ramips/dts/WL-351.dts                     |  7 ++++++-
 .../files/drivers/net/ethernet/ralink/esw_rt3052.c     | 13 +++++++++++++
 target/linux/ramips/image/Makefile                     |  1 -
 target/linux/ramips/rt305x/profiles/sitecom.mk         | 18 ++++++++++++++++++
 4 files changed, 37 insertions(+), 2 deletions(-)
 create mode 100644 target/linux/ramips/rt305x/profiles/sitecom.mk

diff --git a/target/linux/ramips/dts/WL-351.dts b/target/linux/ramips/dts/WL-351.dts
index 81c963b..89c1ae5 100644
--- a/target/linux/ramips/dts/WL-351.dts
+++ b/target/linux/ramips/dts/WL-351.dts
@@ -9,9 +9,13 @@
     pinctrl {
         state_default: pinctrl0 {
             gpio {
-                ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+                ralink,group = "spi", "i2c", "jtag", "mdio", "uartf";
                 ralink,function = "gpio";
             };
+            rgmii {
+                ralink,group = "rgmii";
+                ralink,function = "rgmii";
+            };
         };
     };
 
@@ -53,6 +57,7 @@
     };
 
     esw@10110000 {
+        ralink,rgmii = <1>;
         ralink,portmap = <0x3f>;
         ralink,fct2 = <0x0002500c>;
         /*
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
index 55d5729..1f89838 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
@@ -1454,6 +1454,19 @@ static int esw_probe(struct platform_device *pdev)
 
     esw_hw_init(esw);
 
+    reg_init = of_get_property(np, "ralink,rgmii", NULL);
+    if (reg_init && be32_to_cpu(*reg_init) == 1) {
+        /*
+         * External switch connected to RGMII interface.
+         * Unregister the switch device after initialization.
+         */
+        err = -ENODEV;
+        dev_err(&pdev->dev, "RGMII mode, not exporting switch device.\n");
+        unregister_switch(&esw->swdev);
+        platform_set_drvdata(pdev, NULL);
+        goto unmap_base;
+    }
+
     esw_w32(esw, RT305X_ESW_PORT_ST_CHG, RT305X_ESW_REG_ISR);
     esw_w32(esw, ~RT305X_ESW_PORT_ST_CHG, RT305X_ESW_REG_IMR);
     request_irq(esw->irq, esw_interrupt, 0, "esw", esw);
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 776920b..65fd9a4 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -764,7 +764,6 @@ define Image/Build/Profile/Default
     $(call Image/Build/Profile/WL_330N,$(1))
     $(call Image/Build/Profile/WL_330N3G,$(1))
     $(call Image/Build/Profile/WL341V3,$(1))
-    $(call Image/Build/Profile/WL-351,$(1))
     $(call Image/Build/Profile/WNCE2001,$(1))
     $(call Image/Build/Profile/WR512-3GN,$(1))
     $(call Image/Build/Profile/WR6202,$(1))
diff --git a/target/linux/ramips/rt305x/profiles/sitecom.mk b/target/linux/ramips/rt305x/profiles/sitecom.mk
new file mode 100644
index 0000000..16d9fef
--- /dev/null
+++ b/target/linux/ramips/rt305x/profiles/sitecom.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/WL-351
+    NAME:=Sitecom WL-351 v1
+    PACKAGES:=\
+        kmod-switch-rtl8366rb kmod-swconfig swconfig
+endef
+
+define Profile/WL-351/Description
+    Package set for Sitecom WL-351 v1
+endef
+
+$(eval $(call Profile,WL-351))
-- 
2.1.4

It could also be an configuration issue on your host. I once had some problems with Linux and Minicom where Iwas able to receive everthing but simply was unable to send. Even using a oscilloscope ended with nothing. Then I tried thesame setup on another machine with windows and it worked like PnP. It was most likely a misconfiguration or sudden driver issue after some updates. But hey.. windows worked haha.

About the patch mentioned above. Is that one already applied in the new CC release?

Timeless wrote:

About the patch mentioned above. Is that one already applied in the new CC release?

AFAICS the patch has not been applied anywhere. It sits in the bug tracker https://dev.openwrt.org/ticket/17475 but probably needs to be posted to the development list. I will ask the author.

I'm running my own topic for this specific device. Maybe we can combine these topics. link

How can we apply the above mentioned patch to the imagebuilder of CC?

Registered: Yesterday
Posts: 1
Hi, I'm trying to flash one of these i having lying about, problem i have is i get terminal output while it's booting, after the router finishes it sits asking for a password, I've tried various things that all return incorrect password except "admin" which then tells me a file is missing and goes no further.
I really want to get openwrt on this router, any help would be greatly appreciated.

Don't let the stock Linux firmware boot. Hit the 4 key before it starts to load, you should get a prompt where you can use the bootloader to tftp and flash a new firmware.

Okay thanks I'll give it a go and report back.

Okay good news is now making progress, pressing 4 didn't work but pressing 1 did work, now stuck on doing the tftp transfer, there is very little information i can find on this router.

When I'm going through it asks me for IP address for server etc, any guidance on what these should be? What is the default address of the bootloader? Should i use a certain port on the router for the LAN connection? - thanks

Well I'm making progress, i think I've got all addresses configured correctly, however i get error code (1) "file not found or no access" any suggestions?

Okay I'm at a total loss now, no matter what i do i get "file not found (1)" error everytime i try this. Basically my config is:

PC configured for static address 192.168.0.2 (all firewalls disabled)
TFPT64 software being used set to use interface 192.168.0.2 and talk to 192.168.0.1, local file selected WL351.bin
On start selecting option 1 on router via putty, asked for IP address 192.168.0.1 entered, asked for other IP address 192.168.0.2 entered, asked for file name WL351.bin entered.

After a few lines of IP exchange etc i get "file not found (1)" error.

Not sure where to go from here?

Right, got file to exchange but flash doesn't happen, I'll post the output later but it basically says something is too old in the image compares to what i already have and it doesn't take. I've waited ten minutes after the file transfer completes, restarted the router and it's still the same as before.

Only thing I can think of now is whether anyone out there has an old sitecom firmware i can try and downgrade with before trying the openwrt again.

alex_facey wrote:

After a few lines of IP exchange etc i get "file not found (1)" error.

Not sure where to go from here?

The answer to this was frustratingly simple, all I had to do was change the source file name to all lower case and suddenly it worked btw, so much messing about for something so simple.

The discussion might have continued from here.