Yes, I have, before I posted, but nothing happened.
Modified code of the test is:
gateway = new SerialModemGateway("TusA", PORT, 7600,
"Huawei", "E160");
gateway.setProtocol(Protocols.PDU);
gateway.setInbound(true);
gateway.setOutbound(true);
gateway.setSimPin(PIN);
gateway.setSimPin2(PIN2);
ATHandler_Huawei_E156G.load(gateway, "Huawei", "E160");
service = new Service();
service.addGateway(gateway);
And the Handler itself just like from that thread:
import java.io.IOException;
import org.smslib.GatewayException;
import org.smslib.modem.ModemGateway;
import org.smslib.modem.athandler.ATHandler;
public class ATHandler_Huawei_E156G extends ATHandler {
public ATHandler_Huawei_E156G(ModemGateway myGateway) {
super(myGateway);
setStorageLocations("SM");
}
@Override
public void init() throws GatewayException, IOException,
InterruptedException, org.smslib.TimeoutException {
// This turns on the Display unsolicited result codes
getModemDriver().write("AT+CLIP=1\r");
getModemDriver().getResponse();
// You don't really need this since the storage
//location is set in the constructor but it is here to be
completely sure since
// setStorageLocations() only accepts the primary location
and the actualy command accepts all of them.
getModemDriver().write("AT+CPMS=\"ME\",\"SM\",\"MT\" \r");
getModemDriver().getResponse();
// You don't need this either. The CNMIDetector does an ok
job of picking the right .
// Just try it if you want
//getModemDriver().write("AT+CNMI=1,1,0,1,0\r");
//getModemDriver().getResponse();
// This will set a preference for GPRS mode
// I use it because it is more reliable than having it try d
pick up a 3G signal in some low reception places
getModemDriver().write("AT^SYSCFG=2,1,3FFFFFFF,2,4\r");
// This will suppress the ^BOOT, ^MODE and ^ RSSI messages.
// If you do this then do not change the Terminators array.
getModemDriver().write("AT^CURC=0\r");
}
}
Output is not changed. Maybe it is matter with CNMI commands? Do you
have idea?
On Mar 11, 9:31 pm, Thanasis <[email protected]> wrote:
> Have you spotted this thread?
>
> http://groups.google.com/group/smslib/browse_thread/thread/4dde02861f...
--
You received this message because you are subscribed to the Google Groups
"SMSLib User Group" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/smslib?hl=en.