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