Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
The Internet Books Media Book Reviews Technology

Embedded Ethernet and Internet Complete 105

tdrury writes " Embedded Ethernet and Internet Complete , by Jan Axelson, is targeted towards the professional as well as the hobbyist embedded system designer who wants to further extend his communication options from traditional serial (RS-232, RS-455) communications to Ethernet. Axelson had been an author for Circuit Cellar magazine, and I have always enjoyed her articles, which tend to cover embedded communications of one type or another. (Axelson authors a set of Complete books including ones covering serial, parallel, and USB communication.)" Read on for the rest of tdrury's review.
Embedded Ethernet and Internet Complete
author Jan Axelson
pages 482
publisher Lakeview Research LLC
rating 9
reviewer Tim Drury
ISBN 1931448000
summary Designing with Ethernet in embedded systems.

Axelson's writing style is a little difficult to describe. At times you feel you could be reading a "For Dummies" (TM, Patent Pending, Please Don't Sue Me) book since her writing style is so easy to digest, but simultaneously, she's covering quite a bit of depth and breadth which you expect from a more advanced volume. This seems paradoxical yet the point stands: you will retain what you read from Axelson.

Contents

The networking basics sections describes the network protocol stack (Ethernet, TCP, UDP, and IP frames), collision mediation, and how to use a sniffer (Ethereal in her case). It's of moderate detail suitable for an introduction. Much more detail is provided in later sections. Axelson also uses this section to describe, in good detail, the Ethernet media access control scheme that arbitrates which device talks when and how to handle packet collisions.

These network hardware sections are an in-depth description of cabling (Cat-5, fiber, wireless, etc.) which includes bit rate, max lengths, encoding types, etc. She also includes a small section on building your own Cat-5 for you really cheap Joes. There is a cursory review of hubs, switches, and routers and the network architecture limitations imposed by each for each type of network cabling.

Axelson goes on to describe some common embedded systems including TINI (Java-based) and Rabbit (C-based), which are the two systems she uses and provides examples for. Thankfully, keeping with her Circuit Cellar hobbyist tradition, both of these systems are very affordable to the casual hobbyist. She also provides detailed descriptions of some common Ethernet chipsets down to the registers (at least for the ubiquitous NE2000 registers). Also included are schematics for typical interfaces to these chipsets for the reader who wishes to build his own Ethernet-aware embedded system.

The Internet basics sections describe the various connection solutions such as dial-up, DSL, and satellite and the benefits and limitations of each. Axelson provides a cursory discussion of firewalls, domain naming and DNS, URL dissection, DHCP, NAT, ARP, and ICMP. These sections, I believe, are suitably informational for the embedded system designer, but not exhaustive. She then launches into an in-depth discussion of IP addressing and the IPv4 header which, in my opinion, is required for anyone working at the packet level. Axelson uses some data from Ethereal to support her discussion of IPv4. She also reminds us that Ethernet communications need not use the full TCP or UDP stack but can, if desired, use only IP-wrapped packets or even just Ethernet frames to communicate.

We finally get to some real code in the TCP/UDP socket communication sections. Axelson begins with samples of UDP, then TCP, socket communications. She bounces back and forth between Rabbit C code and TINI Java code. Both sets of examples are properly threaded so as to be more than just academic-example hogwash. Then she delves into the details of UDP and TCP, beginning with descriptions of the frame headers, then concludes with handshaking/flow-control (SYN-ACK and so forth). She includes suggestions for other books that continue even deeper into socket communications which is very nice especially since they aren't gratuitous promotions from the same publisher. (They are, in fact, from two different publishers.) By the way, Lakeview Research is her own company, so Axelson self-publishes. Nice.

Fully half of the book is dedicated to describing the top layer of the protocol stack: applications. Specifically, HTTP client and server, receiving and sending email, and FTP client and server. The HTTP samples leverage the bundled TINI and Rabbit libraries to serve web pages. Axelson also includes examples of running a third-party servlet engine (Tynamo) on the TINI system. Similarly, the sections for sending and receiving email and the FTP client/server leverage the bundled libraries of Rabbit and TINI. I find this appropriate -- why write low-level socket code when there are available libraries that perform all the grunge work for you? If you do need to modify the support libraries, the Rabbit Dynamic C source code is available, but the TINI Java library source code is not.

The last few sections of the book discuss security. Axelson doesn't leave security as a footnote, as she does include sample code for basic authentication, but she also doesn't give security the depth she provided the other topics. Sure, security is a huge topic which would take numerous volumes to cover, but I thought this section could use a little more detail. I would like to have seen example code in the sections on encryption (both symmetric and asymmetric). I would like to have seen what is required to enable SSL in the web server examples. If these were not to be provided, I would have like to have her cite other books which would have completed her discussion as she did in the raw socket communications sections.

What Could Be Improved

I don't really like the large font and spacing used in this book; I prefer a more condensed text which probably would have reduced the book size some 20% or so. But as I think about it, perhaps this is one characteristic that make Axelson's books so easy to read: there is little eye-strain.

In the hardware sections, I would like to have seen even a trivial example of an NE2000 device driver. It wouldn't even have to be an Ethernet-compliant driver, just something that demonstrates sending and receiving with flow and error control. This would be useful if you were building your own device which didn't include a protocol stack.

In the low-level socket communications sections, I would have preferred to see two things. First, I would have liked to see a test program that communicated between the C-based Rabbit and the Java-based TINI to demonstrate a heterogeneous distributed embedded system. Second, I would have like to seen an echo test program. When prototyping communications to any embedded system I always write an echo test program which begins by transmitting a small message with a numeric value, then listens for messages, increments their value, and sends them back out. Validation testing is performed during this process. This program is easy to write and a great diagnostic tool.

Conclusion

Since this is my first book review I can't objectively give it an absolute rating like 4 stars or 8/10 since you have nothing to compare my judgment to. However, I can say that this book is well worth the money spent which, all too often, isn't the case anymore these days. I think Axelson has struck an ideal blend of detail where needed and summary when detail is not required. The book is organized well and should satisfy both the casual bathroom reader and the rigorous, horribly-cracked-binding, lab-bench-reference reader.

I like Axelson's writing style; it's an ideal blend of assume I'm an idiot-style when you need it and in-depth when you want to dig. Another great point: she doesn't stuff the appendices with data sheets, API documentation, or command syntax references. All those can be found on-line and have no place in a book, where they quickly become dated. If you absolutely must have a definite rating, then I'd give it an 8 or 9 out of 10. I would place books like Stevens' Unix Network Programming at a solid 10 and about 99% of the other books out there around a 5.


You can purchase Embedded Ethernet and Internet Complete from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

This discussion has been archived. No new comments can be posted.

Embedded Ethernet and Internet Complete

Comments Filter:
  • hehe (Score:4, Funny)

    by fjordboy ( 169716 ) on Wednesday February 04, 2004 @12:03PM (#8180569) Homepage
    The book is organized well and should satisfy both the casual bathroom reader and the rigorous, horribly-cracked-binding, lab-bench-reference reader.
    And sometimes, those two types are the exact same reader...
  • by prostoalex ( 308614 ) on Wednesday February 04, 2004 @12:06PM (#8180588) Homepage Journal
    It sounds like a good title to have around, I will probably buy it just for that reason.

    However, if the device or embedded system you're working on is already designed and your goal is to network-enable it, what do you guys turn to? From what I've seen around, Lantronix XPort [lantronix.com] is a good option for cheap embedded device servers, but what else is available?

  • urrrgh (Score:1, Insightful)

    by Anonymous Coward
    Ethernet, TCP, UDP, and IP frames

    Uhh.. Ethernet uses frames, IP uses packets.
  • ...let me suggest not starting your list improvements talking about fonts ;-)
  • by tcopeland ( 32225 ) * <(tom) (at) (thomasleecopeland.com)> on Wednesday February 04, 2004 @12:26PM (#8180778) Homepage
    ...in Java and C are here [lvr.com].

    And the usual code quality report courtesy PMD [sf.net]:
    $ java net.sourceforge.pmd.PMD ~/tmp/eec/embedded_ethernet_complete_code/ text rulesets/unusedcode.xml -shortnames

    Tini/RealTimeWebPage/RealTimeWebPag e.java 42 Avoid unused local variables such as 'server'
    Tini/SendEmailMailto/SendEmail.java&nbsp ; 106 Avoid unused local variables such as 'mySendEmail'
    Tini/TcpServer/TcpServer.java 35 Avoid unused local variables such as 'myTcpServer'
    Tini/UdpReceive/UdpReceive.java 31 Avoid unused local variables such as 'myUdpReceive'
    Tini/UdpSend/UdpSend.java 43 Avoid unused local variables such as 'myUdpSend'
  • You mean I can buy the Internet?

    I wonder if the book includes a CD?
  • Anybody seen something similar, but for USB? I.e., if you want to build an embedded USB slave device?
    • You can answer this question in 5 seconds on Amazon or Google... Axelson wrote a book on USB development as well. Check it out here [lvr.com]
      • Actually I was looking for personal recommendations on starter kits. Something with a chip included. I'm not much for "feeling lucky" on hardware purchases that are going to involve dozens of hours invested.

        But thanks for the book recommendation.
    • by kvigor ( 66615 ) on Wednesday February 04, 2004 @12:57PM (#8181032)
      As it happens, Jan Axelson has written this exact book, USB Complete. I am in the process of implementing a USB device and I give it a hearty recommend. The "standard" work is USB Design By Example by John Hyde; it's nice to have, but if you have to pick one, the Axelson is both more readable and more complete.
      • I would like to second the recommendation, the book was quite useful to me as well.

        For a simple USB device, nothing beats the HID drivers. Much of the time, what you want to do is already built into the driver; joysticks, mice, keyboards, volume controls, etc. For other things, you can use control transfers to send data packets to the device. Faster stuff is more difficult, but a lot of example code is building up, much more than when I was working on USB.

        If you make your device emulate a standard HID, th
        • One other thing: Jan often haunts the comp.arch.embedded newsgroup, so sometimes you can ask about things in the books there and get answers straight from the horse's mouth. This is why I love Usenet...Gordon McComb of "Robot Builder's Bonanza" is also a heavily involved regular at comp.robotics.misc.
    • by Anonymous Coward
      scroll down the page....

      http://www.beyondlogic.org/usb/usbhard2.htm
  • by Anonymous Coward on Wednesday February 04, 2004 @12:50PM (#8180970)
    fwiw, I've been using a Rabbit (RCM2200) for almost a year now on a personal project. It's connected to my house network, which is connected to the internet via the normal methods (Linksys hardware). The supplied libraries that come with the Rabbit are very capable as-is, but you can expand them if need be since you get the source (as the reviewer mentioned). I added code to be able to do authenticated smtp logins, for example. Getting code up and running to be able to do a telnet login to check on its status, and change settings was dead easy. It runs 24/7 and has been very reliable... the uptime hasn't exceeded a few months simply because I usually don't go that long without performing a code update of some kind, or otherwise powering down for a hardware reconfig, etc. Someday I may document the project and submit it to /. .... those who have seen it thus far think it's pretty kewl.

    w
    • I've also done multiple projects with Rabbit. It is a cool product, but the software environment is crappy. There have been many discussions about it on their forum, my main problem with it has always been the lack of a linker and #include is replaced by #use.. In these "used" libraries, you have to define external symbols in specially crafted comments.. basically the system is hacked together imho.
      They created a new IDE by the time I stopped using it, so that invalidates some other remarks I had, the older
      • by Anonymous Coward
        Yes, the general observation that the development platform is not as extended and mature as we'd all like it to be is correct. I think benchmarking a product like this against a high volume production environment (Windows, *nix) is a bit unfair. I bet the quality of this product vs the number of man-hours spent on it is as high or higher than if you spotlighted a similar time in the development of Windows or *nix programming environments.

        btw, the current IDE is totally usable for me (v8.01 I think? or is
  • by Anonymous Coward

    By the way, Lakeview Research is her own company, so Axelson self-publishes. Nice.

    While I admire Jan for making a viable business out of something she obviously loves, she seems to have bitten off a lot for herself. After building some prototype hardware based on Parallel Port Complete, I found the book had an error making my hardware quite crippled (a software workaround was possible, but inefficient and ugly). I pointed it out to her via e-mail, but it was never resolved to my satisfaction. AFAIK,

  • by SleezyG ( 466461 ) on Wednesday February 04, 2004 @01:58PM (#8181585)
    TCP/IP Lean by Jeremy Bentham, ISBN: 1-929629-11-7

    Cirrus Logic CS8900a Ethernet module [cirrus.com], it works in 8-bit mode

    Buy a CS8900 [embeddedethernet.com] module.

    ** Shameless plug **
    Read my thesis [lehigh.edu] about how to put it all together.
    • TCP/IP Lean

      Yes, an interesting book. I haven't actually used any code out of it for any of my CS8900 projects (used with ZF486, ADSP2189, and PIC18F252) but has some good ideas.

      Buy a CS8900 [embeddedethernet.com] module.

      At $70, a bit high, the edtp board is $50 and can be used in either 8bit or 16bit mode.

  • Another book (Score:3, Interesting)

    by scrotch ( 605605 ) on Wednesday February 04, 2004 @01:59PM (#8181602)
    I just got sent an announcement for O'Reilly's Hardware Hacking Projects [oreilly.com] book.

    It may be a better fit for those of us with absolutely no background, really short attention spans and very strange ideas about what might be cool to do to a toilet...

  • by Anonymous Coward
    If you do need to modify the support libraries, the Rabbit Dynamic C source code is available, but the TINI Java library source code is not.
    I'm assuming you mean that the TINI Java library source code is not available as .java files? I've occassionally used JAD [tripod.com] to decompile .class files in order to examine and/or fix broken vendor implementations.
    • You are correct. I had thought all the TINI source was not available, but the libraries, com.dalsemi.*, are - see src/APISrc.jar in the TINI 1.12 distro. Dallas/Maxim does not release their java.* source code though.

      And there's always JAD...

      Thanks for the correction.

      -tim
  • You refer to Jan as "her" and "she". Jan is a (Swedish) male name, however.
    • Jan is also a woman's name in English (the language the book is written in.)

      The publisher's bio shown at the linked Barnes and Noble site for the book says, "She".
      • Ok, thanks for pointing that out -- it looks like I missed it. However, considering Jan's second name (Axelsson) is also clearly Swedish, and both are very common (in Sweden), I'd say it's beyond doubt that this person is a male, and most probably a Swede. Barnes and Noble must have made a mistake. As for the book being written in English, that's usually what technical books destined for an international audience are written in regardless of the author's nationality.
    • Having spoken on the phone numerous times over the years, I can attest that Jan is, indeed a woman. However, since I never actually met her in person there is a fintite chance that this is some clever conspiracy.
  • She also includes a small section on building your own Cat-5 for you really cheap Joes.

    Assuming they mean making up network cable and not actually fabricating CAT-5 wire, why on Earth would you NOT make your own cables?

    CDN$.30/foot + connectors is a hell of a lot cheaper than the precut lengths that are only available in standard sizes (25ft, 50ft), and it's very easy..

  • We routinely publish her work in Nuts & Volts (hobby electronics) as well as SERVO Magazine (personal robotics).

    Dan Danknick
    Technical Editor (of both)

Avoid strange women and temporary variables.

Working...