Base station code. Needs R-Code integration but is otherwise working.