Well, the PDU format is a pure hex format. Think of the standard range 0x00
~ 0xFF (kind of). The "3P" is not a hex pair. I've seen these kinds of
errors again - there are references in the group of similar errors or errors
like continuous "FF" appearing in the PDU responses. All of these errors are
attributed to com settings. If you are lucky enough, changing the baud rate
(lowering it, to be exact) fixes it. Otherwise you should really do
trial-and-error.

I insist that you should also try JavaComm v2 in your Win32 environments,
even if this breaks your uniformity. There are known RxTx ineficiencies with
non-standard serial ports (like USBs, etc). Maybe JavaComm behaves better -
and SMSLib operation is really transparent and independent of the com lib
you are using.

As far as your character set queries, you are right. SMSLib supports the
standard alphabet, and does not allow much settings for the TEXT mode. In
fact, TEXT mode is there as an emergency mode. It lucks several features, so
unless you *really* cannot work with PDU mode you should forget about TEXT
mode...


On 30 July 2010 21:53, Aaron <[email protected]> wrote:

> Thanks for responding.
>
> I don't know really know the PDU format, so I don't know what should
> be coming in, but I know that "3P" was never in the message that was
> inbound, at least not as the body of the message. I haven't tried
> JavaComm at all, as I'd prefer to stick to a single serial library
> where possible as we have a fairly heterogeneous set of systems.
> Windows desktops, a few windows servers for exchange and AD, and a mix
> of Linux & FreeBSD for the bulk of the servers and I don't know where
> this application will reside precisely. I'm using the latest stable
> RxTx, and as I said a USB->Serial adapter, and then a serial cable to
> connect to the GSM modem. It is a pretty cheap USB->Serial, but I
> don't know that that should make a difference.
>
> Beyond the PDU issues, what about my point that 8859-1 does not match
> to the GSM 03.38 exactly, and so shouldn't be used? Or maybe when
> using text-mode, allow the Charset to be specified by the programmer,
> or possibly don't even set it at all.
>
> --Aaron
>
> On Fri, Jul 30, 2010 at 11:41, Thanasis <[email protected]> wrote:
> > Hi,
> > I think you have serious problems with your com link. I don't know if the
> > adapter is to blame, but something is dead-wrong or damaged in your
> setup.
> > You are getting a sequence "3P" in a pure hex response - you understand
> that
> > this should not be there!
> > Have you tried with JavaComm v2?
> >
> > On 23 July 2010 01:09, Aaron <[email protected]> wrote:
> >>
> >> I have a MultiTech EDGE Modem (Model: MTCBA-E) which identifies itself
> >> as a SIEMENS model MC75 modem via the AT commands which you don't
> >> appear to have, but things seem to work fine in PDU mode. When I try
> >> and switch it to TEXT to send/receive, it fails because it doesn't
> >> support the 8859-1 character set. There is a good reason for that I
> >> believe, in that the standard Character Set for GSM is GSM 03.38 (7
> >> bit, also referred to as GSM alphabet or SMS alphabet).
> >>
> >> Here are a couple of translation tables.
> >>
> >> http://www.dreamfabric.com/sms/default_alphabet.html
> >>
> >>
> http://embeddedfreak.wordpress.com/2008/10/08/java-gsm-0338-sms-character-set-translator/
> >>
> >> The larger reason, I suppose, of why I was trying TEXT mode is I'm
> >> occasionally getting back exceptions when receiving messages. The
> >> message I'm getting back is 100% always the same (temporarily just
> >> hitting a shortcode with 'help' which always give me the same
> >> results).
> >>
> >> Exception in thread "SMSLib-AsyncMessageProcessor : gsm_modem3"
> >> java.lang.StringIndexOutOfBoundsException: String index out of range:
> >> -1
> >>        at java.lang.String.substring(String.java:1937)
> >>        at
> >> org.smslib.modem.ModemGateway.readMessagesPDU(ModemGateway.java:541)
> >>        at
> >> org.smslib.modem.ModemGateway.readMessages(ModemGateway.java:208)
> >>        at org.smslib.modem.AModemDriver
> >> $AsyncMessageProcessor.run(AModemDriver.java:878)
> >>
> >>
> >>
> >> I'm also getting some errors in the logfile that I don't really
> >> understand why I'm getting. I'm using Netbeans with JDK6, with RXTX on
> >> Windows XP Pro (32-bit) over a USB->Serial adapter with the above
> >> mentioned modem.
> >>
> >>
> >> 07-22-10 13:45:32 [DEBUG] GTW: gsm_modem3: READ PDU:
> >>
> >>
> 07914140540510F00405813624F200F1d170223154528AA0CF6508D40C9F7520Ee5B0E4297D970D03D4D4783CeE1343B0F42BFE5EFF9F80DeFCF592038BB1C9E9741E33P9B0D8AB970389CEB8693B9S4311CCC059AD6C5F3B13C0DA7A7DF6E507A0E12C85CB9DCABFD7681A465383B0F9A529F5010FD0D1A87DDE332DB056ACECF2672981E06C9C3F4F21CD40EE74161389C9D7781A46577F93E07C960B05C0B566BC96E
> >> 07-22-10 13:45:32 [ERROR] GTW: gsm_modem3: Unhandled SMS in inbox,
> >> skipping...
> >> java.lang.NumberFormatException: For input string: "3P"
> >>        at
> >>
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:
> >> 48)
> >>        at java.lang.Integer.parseInt(Integer.java:458)
> >>        at
> >> org.ajwcc.pduUtils.gsm3040.PduUtils.pduToBytes(PduUtils.java:1009)
> >>        at
> >> org.ajwcc.pduUtils.gsm3040.PduParser.parsePdu(PduParser.java:169)
> >>        at
> org.smslib.modem.ModemGateway.readMessagesPDU(ModemGateway.java:
> >> 554)
> >>        at
> >> org.smslib.modem.ModemGateway.readMessages(ModemGateway.java:208)
> >>        at org.smslib.modem.AModemDriver
> >> $AsyncMessageProcessor.run(AModemDriver.java:878)
> >> 07-22-10 13:45:32 [ERROR] GTW: gsm_modem3: ERROR PDU:
> >>
> >>
> 07914140540510F00405813624F200F1d170223154528AA0CF6508D40C9F7520Ee5B0E4297D970D03D4D4783CeE1343B0F42BFE5EFF9F80DeFCF592038BB1C9E9741E33P9B0D8AB970389CEB8693B9S4311CCC059AD6C5F3B13C0DA7A7DF6E507A0E12C85CB9DCABFD7681A465383B0F9A529F5010FD0D1A87DDE332DB056ACECF2672981E06C9C3F4F21CD40EE74161389C9D7781A46577F93E07C960B05C0B566BC96E
> >>
> >>
> >>
> >> 07-22-10 13:11:18 [DEBUG] GTW: gsm_modem3: READ PDU:
> >>
> >>
> 07914140540510F00005813624F200F10170222183938AA0CF6508D40C9F7520E35B0E4297D970D03D4D4783C8E1343B0F42BFE5EFF9F80D2FCF592038BB1C741E3309B0D8AB970389CEB8693B964311CCC059AD6C5F3B13C0DA7A7DF6E507A0E12C85CB9DCABFD7681A465383B0F9A529F5010FD0D1A87DDE332DB056ACECF2672981E06C9C3F4F21CD40EE74161389C9D7781A46577F93E07C960B05C0B566BC96E
> >> 07-22-10 13:11:18 [ERROR] GTW: gsm_modem3: Unhandled SMS in inbox,
> >> skipping...
> >> java.lang.StringIndexOutOfBoundsException: String index out of range:
> >> 326
> >>        at java.lang.String.substring(String.java:1934)
> >>        at
> >> org.ajwcc.pduUtils.gsm3040.PduUtils.pduToBytes(PduUtils.java:1009)
> >>        at
> >> org.ajwcc.pduUtils.gsm3040.PduParser.parsePdu(PduParser.java:169)
> >>        at
> org.smslib.modem.ModemGateway.readMessagesPDU(ModemGateway.java:
> >> 554)
> >>        at
> >> org.smslib.modem.ModemGateway.readMessages(ModemGateway.java:208)
> >>        at org.smslib.modem.AModemDriver
> >> $AsyncMessageProcessor.run(AModemDriver.java:878)
> >> 07-22-10 13:11:18 [ERROR] GTW: gsm_modem3: ERROR PDU:
> >>
> >>
> 07914140540510F00005813624F200F10170222183938AA0CF6508D40C9F7520E35B0E4297D970D03D4D4783C8E1343B0F42BFE5EFF9F80D2FCF592038BB1C741E3309B0D8AB970389CEB8693B964311CCC059AD6C5F3B13C0DA7A7DF6E507A0E12C85CB9DCABFD7681A465383B0F9A529F5010FD0D1A87DDE332DB056ACECF2672981E06C9C3F4F21CD40EE74161389C9D7781A46577F93E07C960B05C0B566BC96E
> >>
> >>
> >>
> >>
> >> I'm also seeing some warnings dealing with an ignored
> >> InterruptedException. Not sure if this is normal or not.
> >>
> >> 07-22-10 13:11:26 [WARN ] GTW: gsm_modem3: Ignoring
> >> InterruptedException in Queue.peek().
> >> java.lang.InterruptedException
> >>        at java.lang.Object.wait(Native Method)
> >>        at
> org.smslib.modem.AModemDriver$CharQueue.peek(AModemDriver.java:
> >> 559)
> >>        at
> org.smslib.modem.AModemDriver.getResponse(AModemDriver.java:331)
> >>        at
> org.smslib.modem.AModemDriver.getResponse(AModemDriver.java:312)
> >>        at
> org.smslib.modem.AModemDriver.getResponse(AModemDriver.java:355)
> >>        at
> org.smslib.modem.AModemDriver.getResponse(AModemDriver.java:312)
> >>        at
> org.smslib.modem.athandler.ATHandler.isAlive(ATHandler.java:131)
> >>        at
> >> org.smslib.modem.AModemDriver$KeepAlive.process(AModemDriver.java:
> >> 681)
> >>        at
> org.smslib.threading.AServiceThread.run(AServiceThread.java:117)
> >>
> >> --
> >> 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]<smslib%[email protected]>
> .
> >> For more options, visit this group at
> >> http://groups.google.com/group/smslib?hl=en.
> >>
> >
> > --
> > 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]<smslib%[email protected]>
> .
> > For more options, visit this group at
> > http://groups.google.com/group/smslib?hl=en.
> >
>
> --
> 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]<smslib%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/smslib?hl=en.
>
>

-- 
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.

Reply via email to