9. (14 points) In $\triangle A B C$, it is known that the sides opposite to $\angle A$, $\angle B$, and $\angle C$ are $a$, $b$, and $c$ respectively, and $a^{2}$, $b^{2}$, $c^{2}$ form an arithmetic sequence.
(1) Find the range of $B$;
(2) If the equation about $B$
$$
\sqrt{3} \cos B+\sin B=m
$$

has exactly one solution, find the value of the real number $m$.


9. (1) From the problem, we know $2 b^{2}=a^{2}+c^{2}$.

Then $\cos B=\frac{a^{2}+c^{2}-b^{2}}{2 a c}$ $=\frac{a^{2}+c^{2}}{4 a c} \geqslant \frac{2 a c}{4 a c}=\frac{1}{2}$.
Also, $0<\angle B<\pi$, so $\angle B \in\left(0, \frac{\pi}{3}\right]$.
(2) Note that,
$\sqrt{3} \cos B+\sin B=2 \sin \left(B+\frac{\pi}{3}\right)$.
From (1), we know $\frac{\pi}{3}<\angle B+\frac{\pi}{3} \leqslant \frac{2 \pi}{3}$.
It is easy to see that $m=2$ or $\sqrt{3}$.