I am using AT commands to control Nokia 5130XM via the USB cable. This usually works reliably, but sometimes (let's say once every 24 hours), for some strange reason the USB connection gets lost -- in other words my program cannot connect to the virtual COM port any longer and I have to manually plug and unplug the phones from the USB cable in order to get the connection back. (This happens more often with one of my 5130XMs (product code 059D562 firmware 7.95 variant 255.01) than with the other (product code 0579263 firmware 7.95 variant 255.02).
This is the latest firmware and I guess sooner or later even with near perfect firmware an issue with the USB connection will occur.
I want to find a programatic solution to cycle the USB port (i.e. do the same thing I am doing when I physically disconnect and reconnect the cable). My program knows when this issue has occured (an exception is thrown if it tries to open the COM port), but the program seems unable to do anything (no way to connect to the phone).
I was wondering if the Nokia connectivity API provides some way to reset Nokia's virtual COM port driver to reset the connection? Or is there anther way to cycle the USB driver on and off to restore the connection. Or can I use the other COM port (i.e. I am using COM9 for sending AT commands -- I've no idea what function COM8 has)
Please tell me if you have a solution for this.