  Pimsner introduced the C*-algebra O_X generated by a Hilbert bimodule X over
a C*-algebra A. We look for additional conditions that X should satisfy in
order to study simplicity and, more generally, the ideal structure of O_X when
X is finite projective. We introduce two conditions: `(I)-freeness' and
`(II)-freeness', stronger than the former, in analogy with [J. Cuntz, W.
Krieger, Invent. Math. 56, 251-268] and [J. Cuntz, Invent. Math. 63, 25-40]
respectively. (I)-freeness comprehend the case of the bimodules associated with
an inclusion of simple C*-algebras with finite index, real or pseudoreal
bimodules with finite dimension and the case of `Cuntz-Krieger bimodules'. If X
satisfies this condition the C*-algebra O_X does not depend on the choice of
the generators when A is faithfully represented. As a consequence, if X is
(I)-free and A is X-simple, then O_X is simple. In the case of Cuntz-Krieger
algebras, X-simplicity corresponds to irreducibility of the defining matrix. If
A is simple and p.i. then O_X is p.i., if A is nonnuclear then O_X is
nonnuclear. We therefore provide examples of (purely) infinite nonnuclear
simple C*-algebras. Furthermore if X is (II)-free, we determine the ideal
structure of O_X.
