Friday, December 26, 2008

BeagleBoard - A few observations

The best source of information about Beagle is the System Reference Manual. For the latest hardware revision available, this can be found here. This document details every aspect of the board - from the various components on the board and their features to detailed specifications and even the board verification procedures.

Here, Me's trying to summarize 'interesting' aspects of beagle, that Me has figured while reading up the System Reference Manual:
  • Beagleboard uses OMAP3530 version ES2.1. However, when you look on the beagleboard, you will not find a component called OMAP3530. This is 'cause Beagle comes in a .4mm pitch POP package. POP (Package on Package) is a technique where the memory, NAND and SDRAM, are mounted on top of the OMAP3530.
  • The Micron POP memory has 256MB of NAND memory and 128MB SDRAM @ 166MHz.
  • Apart from being a communication/ interfacing peripheral, USB OTG on the board is the primary source of power for Beagle. It derives power from the PC over a USB cable. Thus, the client port is limited to about 500mA, as dictated by the USB standard. However, it is possible to draw more power using a USB Y cable, as shown below. (Picture from the System Reference Manual)
  • The 4-pin din connector for S-Video can carry a video signal (for TV) that is different from the one on the DVI-D output. It can support both NTSC and PAL, default being NTSC.
  • Beagle has a HDMI connector to drive a DVI-D signal. This DOES NOT support HDMI interface, and has the DVI-D interface ONLY. Also, Beagle does not generate the analog component of the DVI-D signal, so connectors like HDMI to VGA or DVI-D to VGA will not work.
  • In order to boot from the MMC/ SD card, the card must be a 3V, 4 bit card. 
  • As of rev B6, the reset button on the board will not work when the Linux kernel is running. To reset the board from the kernel operation, a power cycle is required.
  • The user button provided on the board can have two uses: (a) to force a change in boot sequence (b) as an application button that can be used by software as need be.
  • If the user button is NOT pressed while the RESET button is released, the boot sequence is NAND -> USB -> UART3 -> MMC1.
  • If the user button is pressed while the RESET button is released, the boot sequence becomes USB-> UART3 -> MMC1 -> NAND.
  • One cool way to power up Beagle is to use a USB to 5.5mm barrel power adapter cable as pictured below. The self powered USB hub could power, among a variety of other peripherals, this cable as well - this could be used to power up beagle!
  • Beagle has a switch that ensures that when both USB and the power adapter are connected, the board powers up using the power adapter and not the USB. USB in this mode will function either in client/ host modes as need be.
More details will be updated as they are discovered! :-)

p.s.: The USB to 5.5mm barrel power adapter cable is available at Sparkfun. However, if someone knows how to get this cable in India, please let me know. What would be even better would be a DIY article for the same (Add to Me's homework!).

Friday, December 19, 2008

Serial Communication - a brief

Thought Me'd just scribble a few notes about serial communication - all that Me discovered after the first experiences with booting up Beagle and getting RS232/ serial communication working. 

Serial communication, in a nutshell, is a process of sending one bit at a time, sequentially, over a communication channel, usually a computer 'bus'. Historically, this mode of communication has been used for long haul communication. Offlate, serial computer buses (like USB) have become more common, 'cause of the advantages they have over another mode of communication, the parallel communication.

The most extensive usage of serial communication in history has been to network computers using modems. A serial port on the PC was designed to be connected directly to an external modem. Thus, it is termed as "Data Terminal Equipment" (DTE) and the modem is called "Data Communications Equipment" (DCE). 

RS232 is a standard developed by the Electronic Industries Association (EIA) and other interested parties, specifying the serial interface between Data Terminal Equipment (DTE) and Data Communications Equipment (DCE). The RS232 standard includes electrical signal characteristics (voltage levels), interface mechanical characteristics (connectors), functional description of interchange circuits (the function of each electrical signal), and some recipes for common kinds of terminal-to-modem connections. The most frequently encountered revision of this standard is called RS232C. Parts of this standard have been adopted (with various degrees of fidelity) for use in serial communications between computers and printers, modems, and other equipment. 

The serial ports on standard IBM-compatible personal computers follow RS232C, and are full-duplex devices, in that they can send and receive data at the same time. They are both male connectors, as given in the pictures below. These serial ports, typically, use two separate lines for transmitting and receiving data.



The pin assignments for the above connectors in both roles (as DTE and DCE) are as follows:


RS232C, however, does not define bit rate, character framing, communication protocol, character ecnoding, data compression and error detection, which must be agreed by both sending and receiving equipment for a successful transmission. These are typically manifested as settings in the software/ serial communication clients that are used by either ends.

The most commonly found and simple usage of serial communication is found in communication using Null modem cables. In this communication, the RxD of DCE is connected to TxD of DTE and vice versa, and the common grounds (G) are connected together.

Lately, serial ports are being deprecated in the latest platforms, and USB is taking its place. However, there are USB to serial adapters widely available, that make interactions with legacy systems possible. 

Beagle, exposes a RS232 port, to which an IDC10F to DB9M adapter can be connected to expose out a serial interface. The reference manual, very cleary indicates the wiring that's required on such an adapter. Me's had some trouble regarding this, as outlined in my earlier post.

More resources:


--
Me.

Saturday, December 13, 2008

Beginning Blues

So, Me got my Beagle board. I went shopping for the minimalist kit that should be good enough to boot it up. This was the apparatus with which I had started off my journey with beagle:
  1. Beagle board (ofcourse, :-p)
  2. USB A to USB mini A (OTG) cable, to power up the Beagle. 
  3. IDC10F to DB9M adapter
  4. HDMI to VGA cable.
  5. 5V DC power adapter.
  6. Null modem cable to connect the beagle to my PC.
Noticed that my power adapter has a switch to select the polarity. Had posted a query regarding to beagleboard's google group, enquiring about the polarity to be used and if the HDMI to VGA cable would work.

Gerald replied back saying all this is covered in the system reference manual - which me hadn't even gone thru till then. He also mentioned that the HDMI to VGA cable wouldn't work - since the signal that is output from the HDMI port is a DVI signal, and does not have neither the HDMI signal, nor the analog signal that would be required for the VGA cable to work.

Thus, had to go shopping again - this time for the HDMI male to DVI-D female adapter. 

The beagleboard that Me'd bought was rev B6. Downloaded the corresponding system reference manual, and noticed that it had more than enough information that anyone would require to get going with the beagle board. What interested me was the board validation procedure that apparently the manufacturing would use themselves to make sure that the boards are good. Me had decided that Me'd use to check if my board was working fine.

Checked my Null modem cable independently between PCs, and it was working fine. Connected the IDC10F to DB9M adapter to the beagle, and the PC on the other end using the null modem cable. Launched up hyperterminal, set the appropriate settings, and opened the connection. Was expecting the diagnostic messages to show up on the terminal when the beagle got powered up. However, that didn't happen.

Took some time to figure out what was happening. The IDC10 to DB9M adapter has two different configurations when it comes to internal wiring:
  1. IDC10F(1) to DB9M(1), IDC10F(2) to DB9M(6) , IDC10F(3) to DB9M(2) and so on.
  2. IDC10F(1) to DB9M(1), IDC10F(2) to DB9M(2), IDC10F(3) to DB9M(3)  and so on.
The configuration that would work with beagle's set up would be the one listed in (2) above. And the adapter Me had was wired like in (1). Rewired my adapter and it worked. Me could boot up into the board and could hear the crisp sound on the audio out as well.

The wiring that would be required on the DB9M to IDC10F adapter to work with Beagle will look like this:
The next step was to boot into the SD card on the MMC slot. The system reference manual detailed steps that would allow booting into the SD card and to play out a video file. It felt like an achievement to watch that video - Stephan Edberg playing a tennis match. 

The next milestone - to boot a demo linux image from SD card. There was a demo that Me'd seen at FOSS.IN - which had a full screen animation playing on it. Got to check that out.

Me.

Friday, December 12, 2008

Beagleboard - Grand Plan!

As my beagle was on its way, Me had started reading through various resources and gathering all possible information, trying to chalk out a plan about what to do once the board was in my hands.

Found these resources very helpful:
The beagleboard shopping list was pretty impressive. The minimalist kit listed out very well, all the minimum requirements and Section IV: Powering your Beagleboard explained in a concise manner, the various ways of powering up the Beagle board.

Roughly, this is my plan:
  1. First, boot up the board and have one of the demo images up and running so Me knows that everything on the board is working fine. In fact, this Beagleboard diagnostics page listed tests that would check every aspect of the board. Me was going to run these diagnostics on my beagle.
  2. Familiarize myself with the System Reference Manual.
  3. Get into exploring installing booting Linux on Beagle and enabling various peripherals.
  4. Work towards building a Car PC/ PVR for myself.
Was sure there would be obstacles to overcome. And frustrating moments too. Again, was hoping that Me'd have it in me to come over all those and stick to plan!

Regards,
Radha.

To go deep down or get the overview first?

Right now I am facing this question - should I go deep down first or get an overview? This is happening with the fso (freesmartphone.org) debian installation in the openmoko freerunner I have. I was trying to lookup Zhone/gsm implementation.

I have tried going deep down, but looks to me that I now need to know what debian packages first.
-raghav

Thursday, December 11, 2008

Beagle - a push for innovation?

Opensource, Me believes thrives and has been so successful 'cause of the very tenets on which its based on - Freedom and community spirit. The freedom to modify software to suit one's needs, and the willingness to share information freely with the rest of the community have attracted me towards opensource stuff. Today, Me strongly believes in opensource and the qualities it brings to software/ hardware.

Beagle being opensource, Me believes, will foster in a lot of innovation. Me thinks that very soon, we'll have products being developed and shipped based on the design/ modified designs of Beagle. Me believes that the automotive infotainment space, personal PVR and projection systems will be the areas where Beagle will foster some good innovation. Mobiles and MIDs might be the other area.

To begin with, Me intends to use Beagle primarily for these purposes:
  1. To explore the world of ARM and Embedded Linux
  2. To try and see if Me can make a full fledged Car PC for myself. (More on that in a later post)
Here's wishing Me and my beagle the very best!

Beagle, my pal!

Had bumped into Beagle while looking out for some expandable platforms on which Me could try my ideas out. Must admit that Me was totally baffled at the power this small little 3"x3" beast packs in itself. Added to that, interesting videos like this and this and this and this gave me all the boost to go check it out at FOSS.IN where Khasim was hosting a talk about Beagle. Had a very good chat with him about the board, its features and how developers could use it.

And boy! what a revelation that interaction turned out to be! The first shocker was the fact that every part of this little thing is opensource! Right from the schematics to the software that enables the peripherals on the device, to the community based development of solutions - everything. Somehow, never imagined TI going the opensource way. My chat with Khasim firmed up my impression on Beagle even more. Khasim spoke about how he/ the beagle community can help small groups like us explore and try to work our dream products out.

Subbu also told me about how versatile a processor OMAP was and how Beagle would be the best companion to learn building linux devices from scratch.

At the end of FOSS.IN, Me was totally resolved that Me'd give this little thing a good shot. Lucky for Me, Sharat was returning from US, and Me had ordered a Beagle for myself through Digi-key, so he could get it here. Must point out here that the Live chat with Digi-key support staff was one feature that Me loved a lot.

A while later, 7th Dec 2008, Me met Beagle. Sharat was surprised to see that a 3"x3" board had support for so many functions. Its been a good 4 days since. Reading up the system reference manual, purchasing all the necessary peripherals, making up a kit with all these so Me could carry it around etc... etc...

Haven't been able to boot it up yet. And each of those attempts have been learnings of some sort. They'll follow in further posts.

Yes, slowly but steadily, our journey begins.

Me.

Tuesday, December 2, 2008

Using Vim on Windows (due to Swaroop's Vim book)

Yes, why not? My fulltime job is on Windows for now, so, after reading up the http://planet.foss.in entries, saw this Vim book by Swaroop (http://www.swaroopch.com/notes/Vim) and decided to jump right into using it here at work.

The Vim by Swaroop looks really good and I have begun to start reading it and using it too. I guess his Python book must be equally good from what I can see of the Vim book (I have that downloaded too).
-raghav

Monday, December 1, 2008

foss.in2008 - my impressions!

I was afraid to attend this 2008 edition of foss.in because of the theme - you have to contribute or should already be a contributor. I then read the FAQ and coupled with the encouraging words of Radha and Prasad, decided to go there come what may.

I was following Harald Welte's blog and due to my buying openmoko Freerunner and seeing his contribution to Openmoko, I got interested in attending his GSM workout. I really was not sure how the workout would turn out and what I could do in it. Nevertheless, I had decided to be there in the GSM workout.

Krishna, Radha and Subbu were my friends who came along and we shared similar thoughts about how we haven't even started to do anything in foss. We all felt tiny and puny!

Atul Chitnis said - This is your chance, your opportunity to do something. Start today. It kept ringing inside me and I started off following Harald's workout from there. The first session of the workout was spent in getting the necessary code, building it and setting up things. I left near the end as my laptop battery ran out and I couldn't find a place to charge it (or was it showing my lack of confidence?).
Radha attended the BeagleBoard talk by Khasim and he was all charged up. He spoke with Khasim for a long time!

Day2- met up with Harald, Shajith at the BX BoF and Harald started to tell us about what he expects. He wanted to get the acquired GSM data to show up in Wireshark. I had downloaded Wireshark sources and built it. He wanted someone to look at how Wireshark acquires packets from an non-network interface. I tried the USB interface and we got to see the packets showing up in Wireshark. Harald changed his idea of using a TUN device (I don't know what that is even now) but changed it to use a UDP packet to encapsulate the GSM data so that it can be portable. A TUN device would be Linux specific.
I started to lookup the Wireshark code and see if I could start off writing a GSM dissector. I started reading the developer's guide and started to follow the dissector section. I really felt I could contribute in this foss.in.

Day3- Harald asked me how I was doing with the dissector but I did not progress much. So, he went ahead and implemented it himself. I was back to square 1. I felt like running away. But, I stayed on. The feeling of contributing in this foss.in slowly faded and I realized that there is a lot of work to do before I can get there. I have decided to pursue the GSM part since I am interested in networks/protocols. Talk is cheap, I have to show the code.
Rakesh Peter was there and was discussing GSM stuff with Harald which left me feeling completely left out. I hung in there and resolved to stay and not run away.

Day4- No GSM. Entire day was spent in the 750 seater listening to the Linux Kernel Hackers Gathering. No words can describe how it was. There were talks about filesystems, scheduler, debugging/tracing kernel code, hacking a Windows mobile device. All that left me with the feeling that there is a lot to do and this is the time to start. Every talk left me inspired. The windows mobile hacking talk by Harald left everyone speechless.

I couldn't go to the foss on the last day, nevertheless, I started digging into GSM and starting to understand something.

Krishna has bought a laptop and is raring to go. Subbu pursued the dhvani project by Santhosh Thottingal and looks like he will get involved there. He was bursting with ideas after attending the cgroups talk by Balbir Singh.

All in all, it was one tiring foss.in that left all of us inspired.
I won't say anything further because - Talk is Cheap. Show me the code. I have the sticker stuck to my laptop which shows up everytime it is opened.

I must thank the foss.in team for providing everyone the opportunity to contribute. They got the workouts idea setup and working and I believe they have some results to show. Hats off to you all foss.in team people!!! Great job.

More later.