I'm running Elementary OS(based on Ubuntu 12.04), and I have to connect to the internet in a peculiar style. I use a Teletalk modem to connect to the internet. Unfortunately, the modem gets recognized as CD and I have to un-mount the modem from the file manager once, then after a moment the modem gets recognized as CD again and I un-mount it again. After that, after a moment, in the network section, there comes Teletalk 3G connection 1. I click it and after all work, the laptop finally connects to the internet. Is there any Bash script or something like that so that I can automate atleast some part of the work?
Did you solve your problem? I think your modem is detected as a CD first for the Zero CD feature of the modem. Your modem is detected as a storage media first then after installing the driver it switches to modem. So if you use your modem without installing the driver (Like as a Mobile Broadband instead) you will encounter this problem.
Normally this issue is handled by usb_modeswitch package. But you need to supply configuration / data (Like product / vendor ids before / after switching etc) of your device for usb_modeswitch to work(If those informations were not there already. It seems this is the case here).
I have written a guide on this issue. I have tried to explain What is Zero CD? How you will get your device information? What usb_modeswitch does? How you will inform about your device to the usb_modeswitch to the developer. I think you will get some leads there. Sorry its written in Bengali Language( Language of Bangladesh ). As you have asked about Teletalk 3G which is a country based product I have assumed you are a Bangladeshi and know Bengali language. Here is the link - https://www.aagontuk.net/tt3glinux/modem_switching.html
And for others who are facing this kind of problems. You can visit usb_modeswitch's website. It contains detailed writings about these issues and a friendly forum too. http://www.draisberghof.de/usb_modeswitch/