Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RAS dial fails with ERROR_DEVICE_NOT_READY

41 views
Skip to first unread message

Warren

unread,
Jun 10, 2014, 7:24:20 PM6/10/14
to
Hi, this is the first post I've posted here so I hope you can help. If not please suggest an alternate group.

I am developing a system which uses RAS to dial a 3G modem and connect to the internet. For the most part it works perfectly - I can dial, get a connection, send and receive data, then hang up afterwards.

I am using wince 6.0 and a Cinterion EHS6 modem chip using the Cinterion supplied HcUsbDrv.dll.

I am using RAS to connect, operating in the asynchronous mode.

What I am finding though is that if ever I receive the ERROR_DEVICE_NOT_READY error then it's game over - I can never establish a new connection no matter what I try. The only solution is to restart windows ce. Power cycling the modem and/or unloading then reloading the driver does not help, so I supect it is a problem comming from the RAS block itself.

As I said it generally works very well, but it is easy to create this condition in my reliability testing. For example if I establish a connection then deliberately block the RF signal so that I can no longer send data to the cell tower then call RasHangUp() it appears to correctly hang up, subsequent calls to RasGetConnectStatus() using the original handle return ERROR_INVALID_HANDLE indicating that it has indeed hung up, but from then on every time I try to dial I get returned RASCS_OpenPort followed by ERROR_DEVICE_NOT_READY. The only way to recover is to restart windows.

I understand that the Hang up process of PPP involves sending disconnection messages which of course can't get through because there is no signal, but unless I'm missing something (which I obviously am) this process should time out after around 30s, and when I restore the signal I should be able to redial.

This is an embedded system and what I am trying to achieve is to flush/reset the connection and start afresh without having to restart windows ce.

Has anybody come across any similar behaviour or can suggest possible solutions ?

Thank you in advance.
0 new messages