Monday, March 5, 2012

RTP Packetization for H.264 NAL Units

RFC3984 (RTP Payload Format for H.264 Video) defines 3 modes: 0 (single NAL unit mode), 1 (non-interleaved mode), and 2 (interleaved mode).  Mode 0 requires you either use UDP fragmentation or tell the encoder not to generate NALs larger than MTU-X. Mode 1 lets you do fragmentation. Details of how to set up a fragmentation unit packet can be found in the RFC. Basically the fragmentation information is on the front. Small NAL units, e.g. SPS and PPS packets, can be aggregated together using single-time aggregation packets (STAPs). Each packet requires normal RTP headers with incremented sequence numbers but the same timestamp. Though a mark on the last RTP packet of a frame is expected,  it is not guaranteed. Mode 2 lets you fragment, combine, and interleave the transmission order to change how a burst loss will affect a stream, among other things.

Thursday, February 2, 2012

Evolved Macro-Diversity: CDMA2000 and UMTS

Macro-diversity typically means a special communication mode between a single mobile station and multiple base stations in a cellular network. It has been in CDMA standards as soft handoff since the beginning. The people in the industry usually think "soft handoff" and "macro-diversity" are interchangeable in most scenarios. Recently it has been employed for CDMA2000 BCMCS and UMTS MBS too. The basic idea is to coordinate multiple base stations to deliver the same data stream to a mobile receiver in the down links and receive the signals from a mobile station from multiple base stations. Macro-diversity is possible for CDMA soft handoff because there is no hybrid automatic repeat request (HARQ) for voice data and no fast retransmission is necessary due to the strict delay requirement of voice service. The benefits of doing soft handoff on voice service include reduced transmission power and seamless mobility. On the other hand, it also challenges the mobile station's capability to handle additional multipaths.

In the scenario of high-rate data delivery, HARQ is necessary for taking advantage of inaccurate channel estimation as well as channel fluctuation. Since the channels between the mobile and each base station in its active list are generally different and there is no fast link among involved base stations, therefore it is inherently difficult to do soft handoff for high-rate data delivery service.  In addition, the amount of fading resulted from soft-combining multiple channel may diminish and this may result less achievable time diversity gain. Therefore, macro-diversity is only applicable for the data delivery services, where there is no HARQ, for example, BCMCS and UMTS MBS. For the case of the macro-diversity of soft over the air combining, the achievable ergodic capacity is

C1 = B * E{ log2[ 1 + ( S1 + S2) / N ] }

However, things changed a little bit more recently. the simultaneous communication between multiple base stations and a single mobile is proposed for EV-DO Rev. C in a new term, single-carrier multi-link. For LTE-Advanced (LTE Release 10/11) , it is called Coordinated Multi-Point transmission and reception (CoMP).  When two data streams from two base stations are independent from each, it essentially is a way of spatial multiplexing, in which interference cancellation is one of the key receiver element for the mobile station to achievable maximum throughput. However, considering the independent fast multiuser scheduling and HARQ are used by each access network or eNodeB, it is very challenging for mobiles to do successive interference cancellation. For the case of the spatial multiplexing without interference cancellation, the achievable ergodic capacity is

C2 = B * E{ log2[ 1 + S1 / ( N + S2 ) ] } + B * E{ log2[ 1 + S2 / ( N + S1 ) ] } ≤ C1

Tuesday, January 31, 2012

Hack Patriot Box Office for Watching Chinese Videos and TVs

As requested by friends, this blog details a very simple way for watching Chinese TVs and videos for free. Compared with doing the same things on a computer, the suggested approach here is much more operation friendly and eco-friendly.  I guess the total power consumption of this kind of MIPS-based media players should be no more than 15 watts. Meanwhile, the typical power consumption of a Intel or AMD PC or laptop CPU itself is between 50 watts and 100 watts. Even an Intel Atom CPU itself has a power consumption between 5 watts and 20 watts, as I can recall. Nowadays the power supply to a typical home desktop is not less than 250 watts. A powerful game desktop or work station easily demands a power supply of 400 watts or more.

Patriot Box Office High-Definition Media Player PCMPBO25 is a Realtek RTD1073DD SoC based networked media player made by Patriot Memory . It has about 128MB SPI flash, 128MB DDR2 SDRAM and a 400MHz MIPS core.  One nice thing about this player is Patriot Memory hosts a very OPEN and friendly support forum for their media players and shares a lot of details of the firmware.  This not only makes this player hard to be bricked but also enables many mods and hacks.  One simple mod I am going to introduce here is to update its firmware for watching Chinese videos and TVs.

The procedure for updating its firmware can be found on Patriot Memory support forum. After slight modifications, it is copied here for your convenience.
  1. Watch over composite hookup if possible. ( Comment: Though I have hacked many PBOs with watching over HDMI without any issues so far, YMMV.)
  2. Download firmware.
  3. Unzip/unrar
  4. Copy "install.img" file to the ROOT directory of an FAT32 FORMATTED USB drive ONLY.
  5. Put the USB drive into the front usb port of Patriot Box Office
  6. Power up both PBO and TV and choose the PBO input on TV menu.
  7. Go to SETUP -> SYSTEM -> SYSTEM UPDATE, & select SYSTEM UPGRADE
  8. The screen will black out for about a few seconds until the update process initiates. The whole update process may reboot & resume, please DO NOT remove the usb drive UNTIL the screen goes back to the setup page.
  9. (Optional) Additional update might be necessary if the remote doesn't work after the above update.
As far as I know, the newest unofficial firmware supporting China videos, movies and TVs is the one posted on HDP Fans Forum [11/2011].

Friday, January 20, 2012

What Is The Next for Mobile System Design? I: A Single-Cell Model Perspective

Mobile system design usually starts from our understanding of wireless channels and the services customers are demanding. The properties of various wireless channels can help us understand the system design limitation we are facing and the potentials we may achieve.  For example, COST 231 model, which was developed by European COST Action 231. Its variations are the most popular radio propagation models used in almost every wireless standardization body, including 3GPP, 3GPP2 and IEEE. Its modifications include COST 231-Hata Model and COST 231-Walfisch-Ikegami Model. One nice thing of COST 231 channel model is it helps us understand the tradeoff between reception and coverage we are facing in a typical single-cell environment.
Figure 1. Spectral Efficiency and Coverage Tradeoff

As shown in Figure 1, with a 300-meter-tall transmitter antenna, we can see that the path-loss changes 0.66 dB at every 90% coverage change, 1.39 dB at every 80% coverage change, 2.22 dB at every 70% coverage change and 3.18 dB at every 60% coverage change. In general, if you want more coverage, then you may lose some capacity especially on the cell-edge.  Otherwise, you have to shrink your coverage.

Figure 2.  What we want to achieve.
As shown in Figure 2, though there is a fundamental tradeoff between coverage and performance we are constantly facing in our system design, customers always desire their mobile network having both better coverage and higher performance for less. Now the challenge to us is how to push up the system design boundary. There are at least three major approaches available to push the envelope. They are 1) interference cancellation or management, 2) multi-antenna technology and 3) cells cooperation and relay.

Figure 3.  Mobile System Design Options
Interference cancellation (IC) and management are the key ingredients for mobile network to achieve optimal performance. There are many ways to do interference cancellation, linear ICs (decorrelating detector, MMSE IC) and Nolinear ICs (joint detection, decision feedback IC ). Interference management can be done in time, frequency and space domain. OFDMA-liked multiplexing scheme is friendly to interference management.  MIMO can help meet the demand of high data rate and high link quality. It can not only help improve link quality through spatial diversity and beamforming but also help achieve higher data  throughput using spatial multiplexing and multiuser MIMO. The third weapon is heterogeneous transmission and deployment, which can help improve the network throughput as well as cell-edge user experience. Cooperation between cells is not something very new. Starting from 2G/IS-95, there has been soft handoff for macro-diversity. Additionally in 3G, we did it for broadcast multicase service over mobile networks, e.g., CDMA2000 BCMCS or UMTS MBS. However, all these cell cooperations are coordinated by MSC.  More recently, LTE-Advanced standardized X2 interface between eNodeBs belonging to the same MME.  This makes neighboring cells cooperation, such as corrdinated multi-point transmission and reception (CoMP), inter-cell interference coordination (ICIC) and relay, a reality. Similarly in CDMA2000 EV-DO Rev. C, there is a feature called single-carrier multi-link (SCML), which essentially extends the capability of multi-carrier devices in a single-carrier environment.

Friday, December 16, 2011

Work or Study Item List for LTE Release 11: LTE 2 Advanced ?

From Chair's notes, there are more than 40 work or study items proposed for enhancing LTE Advanced or  both LTE-Advanced and HSPA. They will be completed by September 2012.
  1. Further Enhanced Non CA-based ICIC for LTE
  2. LTE Carrier Aggregation Enhancements
  3. Study on Coordinated Multi-Point Operation for LTE
  4. Study on Enhanced Uplink Transmission for LTE
  5. Study on further Downlink MIMO enhancements for LTE-Advanced
  6. Study on Further Enhancements to LTE TDD for DL-UL Interference Management and Traffic Adaptation
  7. Coordinated Multi-Point Operation for LTE
  8. Provision of low-cost MTC UEs based on LTE
  9. Proposed SI on LTE Coverage Enhancements
  10. Improvements to LTE Relay Backhaul
  11. Study on LTE Device to Device Discovery and Communication - Radio Aspects
  12. Network-Based Positioning Support for LTE
  13. Service continuity and location information for MBMS for LTE
  14. LTE RAN Enhancements for Diverse Data Applications
  15. Study on signaling and procedure for interference avoidance for in-device coexistence
  16. Study on HetNet mobility enhancements for LTE
  17. Study on RAN improvements for Machine-Type Communications
  18. RAN overload control for Machine-Type Communications
  19. Study Item on Further RAN Improvements for Machine-type Communications
  20. study item proposal for LTE and HSDPA Carrier Aggregation
  21. Enhancement of Minimization of Drive Tests for E-UTRAN and UTRAN
  22. Signalling and procedure for interference avoidance for in-device coexistence
  23. Study Item Proposal for Opportunistic Carrier Aggregation across 3GPP-LTE and WLAN
  24. Carrier based HetNet ICIC for LTE
  25. Study on further enhancements for HNB and HeNB
  26. LIPA Mobility and SIPTO at the Local Network RAN Completion
  27. Further Self Optimizing Networks (SON) Enhancements
  28. SI: Mobile Relay for E-UTRA
  29. Network Energy Saving for E-UTRAN
  30. UE Over the Air (Antenna) conformance testing methodology- Laptop Mounted Equipment Free Space test
  31. UE demodulation performance requirements under multiple-cell scenario for 1.28Mcps TDD
  32. Uplink Transmit Diversity for HSPA – Open Loop
  33. Non-contiguous 4C-HSDPA operation
  34. Study on Measurement of Radiated Performance for MIMO and multi-antenna reception for HSPA and LTE terminals
  35. Study on Inclusion of RF Pattern Matching Technologies as a positioning method in the E-UTRAN
  36. Relays for LTE (part 2)
  37. Enhanced performance requirement for LTE UE
  38. Electromagnetic Compatibility (EMC) Requirements for Multi-Standard Mobile Terminals and Ancillary Equipment
  39. SI: Passive InterModulation (PIM) handling for Base Stations
  40. E-UTRA medium range and MSR medium range/local area BS class requirements
  41. SI: Study of RF and EMC Requirements for Active Antenna Array System (AAS) Base Station
  42. RF Requirements for Multi-band and Multi-standard Radio (MB-MSR) Base Station
There are additional 11 work or study items for further enhancing HSPA itself.
  1. Eight carrier HSDPA
  2. Uplink Transmit Diversity for HSPA – Closed Loop
  3. Study on Uplink MIMO
  4. Study on HSDPA multipoint transmission
  5. Study item on HSPA enhancement for LCR TDD
  6. Four Branch MIMO transmission for HSDPA
  7. Uplink MIMO with 64QAM for HSUPA
  8. Further Enhancements to CELL_FACH
  9. HSDPA Multiflow Data Transmission
  10. Single Radio Voice Call Continuity from UTRAN/GERAN to E-UTRAN/HSPA
  11. SID: Introduction of Hand phantoms for UE OTA antenna testing

Saturday, December 10, 2011

Evolved Handovers: EV-DO and LTE

One key feature of any mobile communication system is to provide a mobility mechanism for mobiles to do fast and seamless switching between serving cells. There are many different handover mechanisms for achieving this goal. They include soft handover, which is mostly used for voice services, and hard handover, which is designed for data services. Hard handovers can be further classified as network-controlled handovers and mobile-based handovers. The interesting thing is if you look at the basic handover or handoff procedures I will explain in the next, you may feel a long-time debate on which entity , base stations or mobiles, should control handover or handoff.

Traditionally there is no standardized direct connection between two BTS's, even they both belong to the same BSC. Therefore, there usually are a long outage for a mobile do hard handover. For example, the default forward traffic channel MAC handover scheme of CDMA2000 EV-DO Rev. 0 usually results in 100~200ms outage. In order to minimize this outage for some delay-sensitive services, EV-DO Rev. A specially provides a new uplink channel,  DSC (Data Source Control) channel, for mobile to indicate early knowledge of its upcoming handover. When a mobile starts a handover in EV-DO Rev. A network, it sends a forward cell switch indication, a new DSC, to a target BTS for a duration of DSCLength. Meanwhile, it is still receiving data from its current serving BTS until this mobile performs a DRCCover change to the target BTS.  DRCCover is used by the mobile to specify its best serving BTS. During this moment, the queue transfer will be completed from the source BTS to the target BTS.

In LTE Release 8, things changed a little bit. A X2 connection between base stations, eNodeBs, is standardized and it is assumed to always exist as long as they belong to the same pooling area defined by a MME. The basic procedure for a LTE mobile to do handover becomes that the mobile sends Measurement Reports back to its current serving eNodeB and its serving eNodeB decides if to perform a handover and selects a target eNodeB. Source eNodeB then issues a Handover Request message to target eNodeB and passes necessary information. After target eNodeB accepts the request, it will prepare for it and acknowledge it after the preparation is done. As soon as source eNodeB receives Handover Request Acknowledge message, both a handover command and data forwarding are transmitted.

However, story doesn't stop here. Since a LTE mobile starts its handover when the radio link it sees from its serving eNodeB isn't very good, there is a possibility that it detects a radio link failure and can't successfully decode the handover command. In this case, it starts a RLF (Radio Link Failure) timer. Upon the expiration of RLF timer, the mobile searches for a good target eNodeB and tries to re-establish its connection with the target eNodeB while remain in connected state. During the period before a successful connection to eNobeB, source eNodeB will notice the changes and communicate with target eNodeBs through X2 interface to ensure the L1/L2 handover. If the re-connection failed, the mobile will switch from connected state to idle state and do a NAS recovery after that.

Wait a minute ... there is more.  Usually RLF timer is optimized to be several hundred ms. This means the delay of RLF timer based handover can be relatively long. If the mobile can send re-connection request to target eNodeB before RLF timer expires and target eNodeB can request handover from source eNodeB instead of waiting, the handover delay can be reduced accordingly. In this case, the handover sounds more like to be mobile-initiated or mobile-based.

Tuesday, November 29, 2011

USB Flash Drive Recovery or Repair Options

Someday your favorite and important USB flash drive will suddenly don't do its job. When you try to access your files in it, it may take hours to complete anything. When you try to format it, a pop-up message window will tell you "device media write protected" or "unable to complete format". Before you throw it into trash can, here are something you may try.

  1. Windows, Right Click, Format, Both normal/quick format.
  2. HDD LLF Low Level Format Tool
  3. HP USB Disk Storage Format Tool
  4. Active@KillDisk
  5. Someone said it may work after put it in a freezer for a while. Who knows.
  6. If it is a flash card, you may try to format it using a digital camera or mobile phone.

Anyway, if you succeed in repairing your USB flash drive, it may be a good idea for you not to use it for storing any critical files in the future.