He needs to see a good rheumatologist (autoimmunity doc) and maybe even an infectious disease doc. I'm not sure where you live, but I'd go to someone with a good reputation at a big academic medical center if you can.
I don't know what the immunologist tested for, but if s/he ruled out antibody deficiencies AND T cell function problems, I'd start thinking about autoimmune diseases and infections. Here are a few that might fit his symptoms:
Lyme disease
Juvenile RA
Wegener's Granulomatosis
Kartegener's (rare)
Usually Wegener's will have some blood in the urine, but not always.
The other consideration is to see a physical therapist and/or an orthopedist. The fact that both ankles and both hips hurt after exercise might mean he has some foot anatomy that throws his ankle and hip joints out of alignment causing pain after exercise, separately from the fevers/fatigue. He is coming into puberty and growth spurt territory too.
Good luck!