In your ATHandler (if you have a custom one)
public class ATHandler_Huawei_E156G extends ATHandler
{
public ATHandler_Huawei_156G(ModemGateway myGateway)
{
super(myGateway);
setStorageLocations("SM");
}
@Override
public void init() throws TimeoutException, GatewayException,
IOException, InterruptedException
{
// 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 one.
// 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
and 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");
}
}
As far as the terminators are concerned. I am experimenting with a
more flexible way to add and subtract terminators. It would help mybe
with modems like the Huawei that are a little strange. I will post
something if Thansis likes the changes.Don't expect this any time soon
though.
-nxn
On Jan 18, 7:08 am, Gon Argüello <[email protected]> wrote:
> Hi!
> Thanks a lot for your help and will!
> First of all I must tell you that I´m not really familiar with low level
> programming, serial communication or AT commands. But I'll do my best to
> keep up.
> The AT Handler I've created is the one that appears
> inhttp://groups.google.com/group/smslib/browse_thread/thread/515e079a9a....
> I know that the Huawei model of that post isn't the same as the one I'm
> using, but as the main problem I was trying to address was the incoming
> message issue, I just decided to try and see if that helped.
> On the other hand, regarding the unstable behaviour, I'll take into
> consideration the USB power, but any way I need to know this modem's specs
> with regards to this.
> One more thing, I'll try to generate some logs, but my app is using it's own
> logger and I'm having trouble assigning it to SMSservice through service
> constructor.
> Once again thanks a lot. We'll keep in touch.
>
> Gonzalo
--
You received this message because you are subscribed to the Google Groups
"SMSLib for Java 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.