OpenWrt Forum Archive

Topic: Siemens SE505 v2 and SE515 for the OpenWRT project

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

I am willing to provide a Siemens SE505 v2 and a SE515 for the OpenWRT project. Who would be the best person to give it to?

Cheers,
Heinz Peter

I would be happy to get them supported, but IMHO nbd and wbx are happy to accept donations, too. They live closer to You, so shipping would be a bit less. Anyway, if they don't appear here, I'm happy to work on those as well.

Okay ... I decided to hand over the se505 to nbd right now. The se515 will follow when the AR7 port is done ... not to distract yer precious ingeniousity from the current running projects ;-)

Cheers,
HP

AFAIK the 515 is based on the Broadcom 6345 CPU, so the AR7 port won't help You with it smile

I think he meant that he doesn't want to send me the unit yet, so we don't get distracted from the AR7 port smile

Yeah right. As written in http://openwrt.org/forum/viewtopic.php?id=2212 the 1054 is basically the same as the se515 but the Siemens has a switch. I was very active in that Broadcom stuff but I stopped everything in march since there was no real progress anymore. I think the future would be a consolidation with the OpenWRT project. I simply can't do that lowlevel stuff, that's the reason for my offer ...

HP

Well, as I wrote, You offered the donation, You have to choose, who gets it smile Anyway, scream if You need my addess tongue

hi,

i actually working on Netgear WGT634U so that i do not need SE515. Source code for SE515 seems to be very ugly, so that I think
i'll be investing more time into AR7 after finishing Netgear support.

So give it to Kaloz :}

Is someone out there how start a BRC963xx-Projekt on OpenWRT? The last http://brcm6345-linux.sourceforge.net/ is died in 2004. ... But it can be allways usefull to run OpenWRT on a DSL-Modem Brcm Mip.


Keks

We don't have hardware to work on roll

The bcr6345 is also available in T-Sinus 1054, the Source with a Development Toolbox you can dowload at http://www.telekom.de/dtag/downloads/b/ … ase.tar.gz . You can build your own bin's. Check this out!

(Last edited by Keksdosenmann on 21 Sep 2005, 09:01)

Well, it's done. The SE505 went to nbd a while ago and now a SE515 should be knocking at Kaloz door!


HP

Kaloz, are you working on the SE515? I was just curious about the status of this port :-P

If I have something usable, it will appear in te repository.

Well, quite some time passed. Anything done in this space? Or have I wasted two routers here?

Kind regards,
Heinz Peter

Another three months have passed. I can I help somewhere? My se515 is still ready for testing.

Kind regards,
Heinz Peter

hph wrote:

Or have I wasted two routers here?

Given that the new diag driver doesn't even know the SE505 V2 (tested in RC6 and the current svn branch) I would say you wasted that one sad.

(Last edited by Grimson on 24 Dec 2006, 11:31)

I have a SE505V2 patch for diag.c, which adds an override for the (defunct) hardware detection (i.e. you can set the index to the hardware property table using a NVRAM entry). Using it, you'll get control of the LEDs through /proc/diag/leds/...

Only one thing doesn't work as expected: as soon as diag.c takes over, the WWW LED won't be controlled by the WLAN driver any longer (that's OK). However, the WLAN driver won't use the WLAN LED either...

In my opinion, testing a universal hardware detection is very difficult, since there are many criteria (CFE / PMON, hardware identification strings my or may not exist, possibly unknown models etc). However, if the hardware can't be detected in a reliable way, using an override is a good option (using a hardware identification code, not an index to the hardware table). Alternatively a NVRAM variable with a character string describing the hardware features could be used...

BTW: you'll get full support for the reset button by desoldering C365 from the PCB (failsafe mode and running  scripts in /etc/hotplug.d/button) - the SE505 wiki page has been updated ( http://wiki.openwrt.org/OpenWrtDocs/Har … mens/SE505 ).

Cheers
/T

The patch is here:  http://pastebin.ca/292838

I worked on the diag.c code a bit - with the patch below you'll get control over the hardware detection, and you'll get optional user defined hardware settings.

Be warned: using the wrong hardware settings can crash your router, and you may have to use serial console or "reset to factory settings" to fix it! On the other hand, tempering with sdram_init is more likely to bring you into trouble. Not to mention the buggy hardware detection in RC5 :-)

The following nvram variables can be used:

1) User hardware definition with configuration strings:
nvram_buttons=button_string
nvram_leds=leds_string

# diag module hardware definition for SE505V2
nvram set nvram_buttons=reset-7
nvram set nvram_leds=power-5-0,wlan-3-0,dmz-0-0
nvram commit

This option is very nice for hardware mods: you can define more buttons or LEDs or redefine LED or button names if you like. I don't have to tell you, that you can crash the router with a wrong configuration string!

2) Hard override ( make sure you know the right hardware index number for your version of diag.c. ):

nvram_enum=/enum index from diag.c/

# diag module hardware detection override for SE505V2
nvram set nvram_enum=22
nvram commit

The priority of the settins is as follows:
1: user defined settins
2: hardware override
3: hardware auto detect

--- diag.c.ori  2006-12-26 13:51:53.000000000 +0100
+++ diag.c      2006-12-28 13:30:52.000000000 +0100
@@ -88,6 +88,9 @@

        /* Trendware */
        TEW411BRPP,
+
+       /* end marker */
+        THE_END,
 };

 static struct platform_t __init platforms[] = {
@@ -334,7 +337,7 @@
        [SE505V2] = {
                .name           = "Siemens SE505 V2",
                .buttons        = {
-                       /* No usable buttons */
+                       { .name = "reset",      .gpio = 1 << 7 },
                },
                .leds           = {
                        { .name = "power",      .gpio = 1 << 5, .polarity = REVERSE },
@@ -536,6 +539,57 @@
        return NULL;
 }

+// example configuration strings for SE505V2
+// nvram set diag_buttons=reset-7
+// nvram set diag_leds=power-5-0,dmz-0-0,wlan-3-0
+
+
+#define C_MAX_DIAG_CONFIG   80
+static char diag_user_str[C_MAX_DIAG_CONFIG] = "";
+static char diag_buttons_str[C_MAX_DIAG_CONFIG] = "";
+static char diag_leds_str[C_MAX_DIAG_CONFIG] = "";
+
+static struct platform_t __init *platform_user(struct platform_t *pMyPlatform)
+{
+    char * item_name = NULL;
+    unsigned int uiCntB=0, uiCntL=0;
+
+    strncpy(diag_buttons_str, getvar("diag_buttons"), C_MAX_DIAG_CONFIG);
+    item_name = strtok(diag_buttons_str, ",-");
+
+    while ( item_name && (uiCntB < MAX_GPIO) )
+    {
+        pMyPlatform->buttons[uiCntB].name  = item_name;
+        pMyPlatform->buttons[uiCntB].gpio  = 1 << simple_strtoul( strtok(NULL, ",-"), NULL, 0);
+        item_name = strtok(NULL, ",-");
+        uiCntB++;
+    }
+
+    strncpy(diag_leds_str, getvar("diag_leds"), C_MAX_DIAG_CONFIG);
+    item_name = strtok(diag_leds_str, ",-");
+
+    while ( item_name && (uiCntL < MAX_GPIO) )
+    {
+        pMyPlatform->leds[uiCntL].name     = item_name;
+        pMyPlatform->leds[uiCntL].gpio     = 1 << simple_strtoul( strtok(NULL, ",-"), NULL, 0);
+        pMyPlatform->leds[uiCntL].polarity = simple_strtoul( strtok(NULL, ",-"), NULL, 0);
+        item_name = strtok(NULL, ",-");
+        uiCntL++;
+    }
+
+    if ( uiCntB || uiCntL )
+    {
+        sprintf( diag_user_str, "User defined (%u buttons, %u leds)", uiCntB, uiCntL);
+        pMyPlatform->name = diag_user_str;
+        return pMyPlatform;
+    }
+    else
+    {
+        return NULL;
+    }
+}
+
+
 static void set_irqenable(int enabled)
 {
        unsigned int coreidx;
@@ -855,14 +909,37 @@
        static struct proc_dir_entry *p;
        static struct platform_t *detected;

+       memset(&platform, 0,  sizeof(struct platform_t));
+
        detected = platform_detect();
        if (!detected) {
                printk(MODULE_NAME ": Router model not detected.\n");
+       }
+        else {
+               printk(MODULE_NAME ": Detected '%s'\n", detected->name);
+       }
+
+        if (strlen(getvar("diag_enum")))
+        {
+                unsigned long ulDiagEnum = simple_strtoul(getvar("diag_enum"), NULL, 0);
+                if ( ulDiagEnum >=0 && ulDiagEnum < THE_END )
+                {
+                        detected = &platforms[ulDiagEnum];
+                        printk(MODULE_NAME ": Override: %s.\n", detected->name);
+                }
+        }
+
+       if ( !platform_user(&platform) ) {
+               if (!detected) {
                return -ENODEV;
        }
+               else {
        memcpy(&platform, detected, sizeof(struct platform_t));
-
-       printk(MODULE_NAME ": Detected '%s'\n", platform.name);
+               }
+       }
+       else {
+               printk(MODULE_NAME ": %s\n", platform.name);
+       }

        if (!(diag = proc_mkdir("diag", NULL))) {
                printk(MODULE_NAME ": proc_mkdir on /proc/diag failed\n");

The discussion might have continued from here.