We adopt the heavy baryon chiral perturbation theory (HBChPT) to calculate the scattering lengths of φB ( * ) cc up to O(p 3 ), where φ is the pseudoscalar mesons. The recoil effect and the mass splitting between the spin-1 2 and spin-3 2 doubly charmed baryons are included. In order to give the numerical results, we construct the chiral Lagrangians with heavy diquark-antiquark (HDA) symmetry in a formally covariant approach. Then, we relate the low energy constants (LECs) of the doubly charmed baryons to those of D ( * ) mesons. The LECs for the φD ( * ) scattering are estimated in two scenarios, fitting lattice QCD results and using the resonance saturation model. The chiral convergence of the first scenario is not good enough due to the the large strange quark mass and the presence of the possible bound states, virtual states and resonance. The final results for two scenarios are consistent with each other. The interaction for the [πΞ ( * ) cc ] (1/2) , [KΞ ( * ) cc ] (0) , [KΩ ( * ) cc ] (1/2) , [ηΞ ( * ) cc ] (1/2) , [ηΩ ( * ) cc ] (0) and [KΞ ( * ) cc ] (0) channels are attractive. The most attractive channel [KΞ ( * ) cc ] (0) may help to form the partner states of the D * s0 (2317) (Ds1 (2460)) in the doubly heavy sector.