XBee + library + arduino = freezes

Hi, I've got this weird issue I have no idea how to deal with.
I've got 2 Xbee 900HP S3B modules, both in AT mode (no escapes). One of them is plugged into arduino uno (EtherTen version) via a Digole board (http://www.digole.com/index.php?productID=438) with 5v to 3.3v convertor and other one is connected to PC via USB explorer. I'm using Andrew Rapp's library and trying to run a test sketch (Test Tx for series 2). I monitor what's coming to my second xbee on PC with xctu. The weird thing is, only 33 packets got transmitted. No matter what I do, this magic number of 33 packets come through. I tried swapping xbees around, no help.
If I disconnect power from xbee on arduino side and apply it again (without resetting arduino), again, only 33 packets come out.
Grounding RST pin on xbee does the same.
Interesting part, that even if Xbee does not transmit anything from arduino, it still can receive and acknowledge packets from xbee on PC side. I suspect something funny goes on with serial port on arduino but I have no idea exactly what it is.
Please help!

P.S.: Sorry, 34 packets, not 33.

I suspect something funny goes on with serial port on arduino but I have no idea exactly what it is.

And, I suspect that it's your code. Care to wager on who's right?

I'm not using any software serial, just a hardware. And I'm using a non-modified example from the library pack (well, I changed the 64 bit address).
I put it in wrong wording, I apologize. I meant serial communication on arduino side of the table, it might as well be a damaged digole board (however why would it pass 34 packets and stop I have no idea).
Plus, that xbee responds to messages sent via network.

I can hunt down the code you are using, someday, or you can post your code. Your choice.

Here is the code I'm trying to use:

/**
 * Copyright (c) 2009 Andrew Rapp. All rights reserved.
 *
 * This file is part of XBee-Arduino.
 *
 * XBee-Arduino is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * XBee-Arduino is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with XBee-Arduino.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <XBee.h>

/*
This example is for Series 2 XBee
 Sends a ZB TX request with the value of analogRead(pin5) and checks the status response for success
*/

// create the XBee object
XBee xbee = XBee();

uint8_t payload[] = { 0, 0 };

// SH + SL Address of receiving XBee
XBeeAddress64 addr64 = XBeeAddress64(0x000000, 0x0000ff);
ZBTxRequest zbTx = ZBTxRequest(addr64, payload, sizeof(payload));
ZBTxStatusResponse txStatus = ZBTxStatusResponse();

int pin5 = 0;

int statusLed = 13;
int errorLed = 13;

void flashLed(int pin, int times, int wait) {

  for (int i = 0; i < times; i++) {
    digitalWrite(pin, HIGH);
    delay(wait);
    digitalWrite(pin, LOW);

    if (i + 1 < times) {
      delay(wait);
    }
  }
}

void setup() {
  pinMode(statusLed, OUTPUT);
  pinMode(errorLed, OUTPUT);

  Serial.begin(115200);
  xbee.setSerial(Serial);
}

void loop() {   
  // break down 10-bit reading into two bytes and place in payload
  pin5 = analogRead(5);
  payload[0] = pin5 >> 8 & 0xff;
  payload[1] = pin5 & 0xff;

  xbee.send(zbTx);

  // flash TX indicator
  flashLed(statusLed, 1, 100);

  // after sending a tx request, we expect a status response
  // wait up to half second for the status response
  if (xbee.readPacket(500)) {
    // got a response!

    // should be a znet tx status            	
    if (xbee.getResponse().getApiId() == ZB_TX_STATUS_RESPONSE) {
      xbee.getResponse().getZBTxStatusResponse(txStatus);

      // get the delivery status, the fifth byte
      if (txStatus.getDeliveryStatus() == SUCCESS) {
        // success.  time to celebrate
        flashLed(statusLed, 5, 50);
      } else {
        // the remote XBee did not receive our packet. is it powered on?
        flashLed(errorLed, 3, 500);
      }
    }
  } else if (xbee.getResponse().isError()) {
    //nss.print("Error reading packet.  Error code: ");  
    //nss.println(xbee.getResponse().getErrorCode());
  } else {
    // local XBee did not provide a timely TX Status Response -- should not happen
    flashLed(errorLed, 2, 50);
  }

  delay(1000);
}

Here is the code I tried this morning:

void setup() {
  // put your setup code here, to run once:
Serial.begin(115200);
}

void loop() {
  // put your main code here, to run repeatedly: 
  byte buf[] = { 0x7E, 0x00, 0x10, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x30, 0x30, 0x93};
 for (int i = 0; i<20; i++){
  Serial.write(buf[i]);
 }
  delay (1000);
}

Still the same, 34 packets were sent only.

I'm still struggling with the same issue.
I tried to send some data via xbee from PC using my own code and it works most of the time but then just hangs for no apparent reason. XCTU works fine though. I wonder what exactly they do that I don't?