Narrative:

During preflight, noticed aircraft came out of maintenance for multiple issues most notably air-ground sensor switch problems. Preflight and takeoff were normal. On climb out, could not engage VNAV, so went to level change instead. Got cleared direct ZZZ1 and couldn't engage LNAV. Aircraft on autoplt. First officer tried, and it worked fine. Then got cleared direct ZZZ and then LNAV didn't work on either side. I should've suspected air-ground sensor problem at this time. We manually tuned ZZZ and flew direct. Gave first officer airplane and started typing on ACARS to dispatch to get maintenance controller on line. At approximately FL280, the cabin altitude warning horn went off. Frequency was quiet, so we immediately called center to ask for lower. We both went on oxygen, started descent. Cabin came back down, so no emergency descent. We only had to descend 2000-3000 ft. Tried to call dispatch and then were trying to cell call me, after numerous call-me attempts on ACARS. I knew we had air-ground sensor problems now. Finally got a hold of dispatch. We both agreed to divert to ZZZ. Told flight attendants and passenger. Uneventful landing. Main reason for report is obviously aircraft was not properly fixed, although everything was properly signed off. In retrospect, I should've suspected the air-ground sensor problem as soon as I saw LNAV didn't work. But since the first officer was able to properly get it to previously engage, I didn't. All the problems didn't happen at once which was the confusing part.

Google
 

Original NASA ASRS Text

Title: A B737-500 WAS RELEASED FROM MAINT WITH A CHRONIC AIR-GND SENSOR PROB CORRECTED. AT FL280 CABIN ALT WARNING SOUNDED AND AIRPLANE STARTED TO DEPRESSURIZE. FLT DIVERTED.

Narrative: DURING PREFLT, NOTICED ACFT CAME OUT OF MAINT FOR MULTIPLE ISSUES MOST NOTABLY AIR-GND SENSOR SWITCH PROBS. PREFLT AND TKOF WERE NORMAL. ON CLBOUT, COULD NOT ENGAGE VNAV, SO WENT TO LEVEL CHANGE INSTEAD. GOT CLRED DIRECT ZZZ1 AND COULDN'T ENGAGE LNAV. ACFT ON AUTOPLT. FO TRIED, AND IT WORKED FINE. THEN GOT CLRED DIRECT ZZZ AND THEN LNAV DIDN'T WORK ON EITHER SIDE. I SHOULD'VE SUSPECTED AIR-GND SENSOR PROB AT THIS TIME. WE MANUALLY TUNED ZZZ AND FLEW DIRECT. GAVE FO AIRPLANE AND STARTED TYPING ON ACARS TO DISPATCH TO GET MAINT CTLR ON LINE. AT APPROX FL280, THE CABIN ALT WARNING HORN WENT OFF. FREQ WAS QUIET, SO WE IMMEDIATELY CALLED CTR TO ASK FOR LOWER. WE BOTH WENT ON OXYGEN, STARTED DSCNT. CABIN CAME BACK DOWN, SO NO EMER DSCNT. WE ONLY HAD TO DSND 2000-3000 FT. TRIED TO CALL DISPATCH AND THEN WERE TRYING TO CELL CALL ME, AFTER NUMEROUS CALL-ME ATTEMPTS ON ACARS. I KNEW WE HAD AIR-GND SENSOR PROBS NOW. FINALLY GOT A HOLD OF DISPATCH. WE BOTH AGREED TO DIVERT TO ZZZ. TOLD FLT ATTENDANTS AND PAX. UNEVENTFUL LNDG. MAIN REASON FOR RPT IS OBVIOUSLY ACFT WAS NOT PROPERLY FIXED, ALTHOUGH EVERYTHING WAS PROPERLY SIGNED OFF. IN RETROSPECT, I SHOULD'VE SUSPECTED THE AIR-GND SENSOR PROB AS SOON AS I SAW LNAV DIDN'T WORK. BUT SINCE THE FO WAS ABLE TO PROPERLY GET IT TO PREVIOUSLY ENGAGE, I DIDN'T. ALL THE PROBS DIDN'T HAPPEN AT ONCE WHICH WAS THE CONFUSING PART.

Data retrieved from NASA's ASRS site as of July 2007 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.