Narrative:

On 11/wed/01 I was on a local sightseeing flight. I obtained a thorough WX briefing and was advised of the local NOTAMS for the airspace in which I was to fly and filed a VFR flight plan. I obtained my clearance and was given a transponder code. I departure ZZZ1 international airport and proceeded on my course. ZZZ1 departure handed me off to ZZZ1 center who advised me of traffic advisories. I did not open my VFR flight plan as I was in contact with ZZZ1 center. I had kept the same transponder code during this time. I informed approach of my intention of flying around the north shore at which time I was handed off to ZZZ TRACON approach. I informed the controller that I was well clear of his airspace to the west and he approved my frequency change. At that point I was still transmitting the same transponder code I was initially assigned. I then changed the transponder to 1200 since I was clear of the controled airspace. On returning to ZZZ1 airport, I had to transition the ZZZ2 aaf before entering the ZZZ1 class B. ZZZ3 tower questioned my 1200 transponder code. He then informed me of the need to have a preassigned transponder code when operating within 35 miles of class B airspace (even though I was not in the class B airspace) at which time I reentered my original assigned transponder code. I was handed off to approach and completed the flight to ZZZ1 airport. However, I was asked to call ATC after I got on the ground. I was well aware of the enhanced class B airspace, but did not get the information about the pre-assigned transponder code within the 35 mi radius of the class B airspace. I am unsure where the communication breakdown was as I do not recall getting this information during my preflight briefing.

Google
 

Original NASA ASRS Text

Title: AFTER AN FSS BRIEFING A GA ACFT IS QUESTIONED CHALLENGED ABOUT HIS TRANSPONDER CODE ASSIGNMENT BY A MIL TWR CTLR WHILE SQUAWKING 1200 WHEN IN PROX OF CLASS B AIRSPACE NEAR ZZZ, US.

Narrative: ON 11/WED/01 I WAS ON A LOCAL SIGHTSEEING FLT. I OBTAINED A THOROUGH WX BRIEFING AND WAS ADVISED OF THE LOCAL NOTAMS FOR THE AIRSPACE IN WHICH I WAS TO FLY AND FILED A VFR FLT PLAN. I OBTAINED MY CLRNC AND WAS GIVEN A TRANSPONDER CODE. I DEP ZZZ1 INTL ARPT AND PROCEEDED ON MY COURSE. ZZZ1 DEP HANDED ME OFF TO ZZZ1 CTR WHO ADVISED ME OF TFC ADVISORIES. I DID NOT OPEN MY VFR FLT PLAN AS I WAS IN CONTACT WITH ZZZ1 CTR. I HAD KEPT THE SAME TRANSPONDER CODE DURING THIS TIME. I INFORMED APCH OF MY INTENTION OF FLYING AROUND THE N SHORE AT WHICH TIME I WAS HANDED OFF TO ZZZ TRACON APCH. I INFORMED THE CTLR THAT I WAS WELL CLR OF HIS AIRSPACE TO THE W AND HE APPROVED MY FREQ CHANGE. AT THAT POINT I WAS STILL TRANSMITTING THE SAME TRANSPONDER CODE I WAS INITIALLY ASSIGNED. I THEN CHANGED THE TRANSPONDER TO 1200 SINCE I WAS CLR OF THE CTLED AIRSPACE. ON RETURNING TO ZZZ1 ARPT, I HAD TO TRANSITION THE ZZZ2 AAF BEFORE ENTERING THE ZZZ1 CLASS B. ZZZ3 TWR QUESTIONED MY 1200 TRANSPONDER CODE. HE THEN INFORMED ME OF THE NEED TO HAVE A PREASSIGNED TRANSPONDER CODE WHEN OPERATING WITHIN 35 MILES OF CLASS B AIRSPACE (EVEN THOUGH I WAS NOT IN THE CLASS B AIRSPACE) AT WHICH TIME I REENTERED MY ORIGINAL ASSIGNED TRANSPONDER CODE. I WAS HANDED OFF TO APCH AND COMPLETED THE FLT TO ZZZ1 ARPT. HOWEVER, I WAS ASKED TO CALL ATC AFTER I GOT ON THE GND. I WAS WELL AWARE OF THE ENHANCED CLASS B AIRSPACE, BUT DID NOT GET THE INFO ABOUT THE PRE-ASSIGNED TRANSPONDER CODE WITHIN THE 35 MI RADIUS OF THE CLASS B AIRSPACE. I AM UNSURE WHERE THE COM BREAKDOWN WAS AS I DO NOT RECALL GETTING THIS INFO DURING MY PREFLT BRIEFING.

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.