Gaurang's posterous http://gaurangs.com Most recent posts at Gaurang's posterous posterous.com Sat, 24 Dec 2011 13:26:00 -0800 Teardown - IPEVO Mini Network Storage Adapter http://gaurangs.com/teardown-ipevo-mini-network-storage-adapter http://gaurangs.com/teardown-ipevo-mini-network-storage-adapter

This adapter basically lets you share your USB HDD over a network. Click here to learn more about the device. This is what the adapter looks like:

Ipevo

Top cover removed

Imag0140

Looking at the board it looks almost identical to the Digitus DN-7023-1
Here is a link to a basic teardown for a Digitus DN-7023-1 board : http://www.mikrocontroller.net/topic/217639

Images of the teardown:

From the images above we see the following IC's:

  • RDC S3282 S3282LCF0B
  • Winbond W9812G6IH-6 (SDRAM)
  • Macronix MX29LV800CTTC-70G (8Mbit NOR flash)
  • IC + IP101A LF (single-port 10/100 Fast Ethernet transceiver)

Lets look at the chips in more detail:

RDC S3282LCF0B 

150MHz CPU, Intel 486SX instruction set
16MB SDRAM / 1MB NOR Flash
http://www.rdc.com.tw/en/

Winbond W9812G6IH-6 (SDRAM)

The W9812G6IH is a 128M SDRAM
http://www.winbond.com/hq/enu/ProductAndSales/ProductLines/SpecialtyDRAM/SDRAM/W9812G6IH.htm

Macronix MX29LV800CTTC-70G (8Mbit NOR flash)

The MX29LV800C T/B is a 8-mega bit Flash memory organized as 1M bytes of 8 bits or 512K words of 16 bits.
http://www.macronix.com/QuickPlace/hq/PageLibrary4825740B00298A3B.nsf/h_Index/6F878CF760C559BD482576E00022E6CC/?OpenDocument&EPN=MX29LV800C%20T/B
http://www.alldatasheet.net/datasheet-pdf/pdf/143510/MCNIX/MX29LV800CTTC-55Q.html

IC + IP101A LF (single-port 10/100 Fast Ethernet transceiver)

IP101A is an IEEE 802.3/802.3u compliant single-port Fast Ethernet Transceiver for both 100Mbps and 10Mbps operations.
http://www.icplus.com.tw/pp-IP101A.html

What Next?

I'm still trying to figure out a way to access the console on this device. SSH /Telnet dont seem to be enabled on this adapter.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/754544/Copy_of_MyPicture.png http://posterous.com/users/4SDvwZlSq3ER Gaurang Sinha gogy Gaurang Sinha
Mon, 19 Dec 2011 13:08:00 -0800 Introducing API Browser for ASP.NET MVC3 http://gaurangs.com/introducing-api-browser-for-aspnet-mvc3 http://gaurangs.com/introducing-api-browser-for-aspnet-mvc3

tl;dr - Automatically create a fully functional API page for your ASP.NET MVC project. https://github.com/gaurangsinha/API-Browser/

After working on a few ASP.NET MVC projects one of my main issues was testing our REST API manually, especially the POST methods. There are a few browser extensions like Poster for Firefox that help you do this, but it was still a tedious process.

API Browser was created as a tool that could be dropped into any project. It creates a page where the developer could test out his APIs without having to bother about spelling mistakes, forgetting parameters, etc etc.

API Page

Apibrowser

Method with parameters and comments

Apibrowser_parameters

Response [Success]

Apibrowser_response

Response [Error]

Apibrowser_responseerror

The project can be found on github : https://github.com/gaurangsinha/API-Browser/

Getting Started

  1. Add APIBrowser reference to MVC project
  2. Add entry in httpHandler section in web.config
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    
    <system.web>
        <httpHandlers>
            <add verb="GET" path="apibrowser.axd" type="Webtools.APIBrowser, APIBrowser" />
        </httpHandlers>
    </system.web>

    <system.webServer>
        <handlers>
            <add name="APIBrowser" verb="GET" path="apibrowser.axd" type="Webtools.APIBrowser, APIBrowser" resourceType="Unspecified" />
        </handlers>
    </system.webServer>
  3. Add following line at the begining of RegisterRoutes method in Global.asax file.

    routes.IgnoreRoute("apibrowser.axd");

    The Global.asax file should now look like this:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    
    public class MvcApplication : System.Web.HttpApplication {

        public static void RegisterRoutes(RouteCollection routes) {
            routes.IgnoreRoute("apibrowser.axd");

            //rest of the code
        }

        //rest of the code
    }
     
  4. Build & Run the project. Point the browser to http://[localhost]:[port]/APIBrowser.axd

How does it work?

The APIBrowser utility will reflect all the assemblies associated with the project and filter out the types which inherit from System.Web.Mvc.Controller

The methods in these types will then be filtered by considering only the ones that have HttpPostAttribute or HttpGetAttribute as an attribute.

Consider you have the following controller file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public class HomeController : Controller {

    public ActionResult Index() {
        return View();
    }

[HttpGet]
    public string GetXML() {
        Response.ContentType = "application/xml";
        return @"<field>value</field>";
    }

[HttpGet]
    public string GetJSON() {
        Response.ContentType = "application/json";
        return @"{ field : ""value"" }";
    }
}

This file would be rendered to something like this:

Apibrowser_homecontroller

What's next?

Right now APIBrowser considers that the default route is enabled i.e.

routes.MapRoute(     
    "Default", // Route name
    "{controller}/{action}/{id}", // URL with parameters
    new { controller = "Test", action = "Index", id = UrlParameter.Optional } // Parameter defaults 
);

The plan is to figure out the alternative routes by inspecting the RouteCollection

Troubleshooting

If you are facing problems please check out the wiki. If the problem persists consider creating a ticket/issue. If you do plan to create a ticket/issue please provide as much information as you can to help me replicate and fix the problem.

*** Update ***

APIBrowser has now been updated to generate the virtual path for the controller & action.

Response time is also displayed with the results.

 

 

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/754544/Copy_of_MyPicture.png http://posterous.com/users/4SDvwZlSq3ER Gaurang Sinha gogy Gaurang Sinha