In UMTS I get a large number returned by getCid() (larger than the allowed value). Is this the UTRAN Cell Identity (UC-ID)?
getCid()
UC-Id = RNC-Id + C-Id >
try (cell id % 65536) it worked for me.