I strongly recommend you to get down at hosur.train reaches carmelaram only at 5.45.where as this train reaches hosur at 5.10 AM.Once you get down at camelaram you wont get direct bus to electronic city.you have to get down at silk board then catch another bus to electronic city.I think first option suits to better if you are staying at electronic citi. I have taken this option multiple times and it worked fine with me.