SMS reading problem


+ Reply to Thread
Results 1 to 1 of 1

Thread: SMS reading problem122 days old

  1. #1
    Junior Member acel's Avatar
    Join Date
    Mar 2014
    Posts
    11
    Thumbs Up
    Received: 1
    Given: 0
    Total Downloaded
    3.14 GB

    0 Not allowed!

    Default SMS reading problem

    This way I try to read SMS, but I can't see the incoming message.

    message format of the module.

    +CMT: "+001234567890",,"2020/01/08 22:01:00+12"
    TEST message

    Code:
     Device = 18F14K50Config_Start
           CPUDIV = NoClkDiv        ; No CPU System Clock divide
           USBDIV = OFF             ; USB Clock comes directly from the OSC1/OSC2 oscillator block; no divide
           FOSC = IRC                ; int oscillator
           PLLEN = Off              ; NOT MULTIPLIED
           PCLKEN = OFF             ; Primary clock disabled
           FCMEN = OFF              ; Fail-Safe Clock Monitor disabled
           IESO = On               ; Oscillator Switchover mode disabled
           PWRTEN = On             ; PWRT disabled
           BOREN = On              ; Brown-out Reset disabled in hardware and software
           BORV = 30                ; VBOR set to 1.9 V nominal
           WDTEN = off              ; WDT is controlled by SWDTEN bit of the WDTCON register
           WDTPS = 4096                ; 1:1
           MCLRE = OFF              ; RE3 input pin enabled; MCLR disabled
           HFOFST = On            ; The system clock is held off until the HF-INTOSC is stable.
           STVREN = On             ; Stack full/underflow will not cause Reset
           LVP = OFF                ; Low Voltage Programming disabled
           BBSIZ = OFF              ; 1kW boot block size
           XINST = OFF              ; Enhanced CPU disabled
           Cp0 = On                ; Block 0 not code-protected
           CP1 = On                ; Block 1 not code-protected
           CPB = On               ; Boot block not code-protected
           CPD = Off                ; Data EEPROM not code-protected
           WRT0 = On              ; Block 0 not write-protected
           WRT1 = On               ; Block 1 not write-protected
           WRTB = On               ; Boot block not write-protected
           WRTC = On               ; Configuration registers (300000-3000FFh) not write-protected
           WRTD = Off               ; Data EEPROM not write-protected
           EBTR0 = On              ; Block 0 not protected from table reads executed in other blocks
           EBTR1 = On              ; Block 1 not protected from table reads executed in other blocks
           EBTRB = On              ; Boot block not protected from table reads executed in other blocks
          Config_End
     Declare All_Digital = True
    Include "Buffered_Hserin.Inc"       ' Load the USART1 interrupt handler and buffer read subroutines
    Declare  Xtal =16
    Declare  Onboard_USB = 0
     Declare MemWrite_Int_Control = On 
     Declare Reminders = Off
    IOCA=000011
    UCON.3 = 0       'usb off
    ;OSCCON = 011000 ' 4 mhz clock
    ;OSCCON = 010000 ' 4MHz 
    OSCCON =111000    '// 16 MHz - 18F25K22
    TRISA=000000
    TRISB=100000
    TRISC=000000
    PORTA=0
    PORTB=0
    PORTC=0
    
    
    Declare HSerial1_Terminator = CRLF; Or LFCR Or CR
    ;Declare Hserial_Baud = 9600         ' Set Baud rate for USART 1
    Declare Hserial_RCSTA  = 144 ; Enable continuous receive
    Declare Hserial_TXSTA  = 36  ; Enable transmit, BRGH = 1
    Declare Hserial_Clear  = On  ; Clear overflow automatically
    Declare Hserial_SPBRG  = 160 ; Baud Rate Generator Low Byte Value
    SPBRGH                 = 1   ; Baud Rate Generator High Byte Value
    BAUDCON.3              = 1   ; Enable the 16 bit Baud Rate Generator
     Dim SMS_String As String *1
    Dim Cmd_Buffer As String * 70
    Dim Trim_Buffer As String *70
    Dim CmT As String * 5
    Dim SMS_Buffer As String *30
    Dim sCR As String *4
    Dim Cr_Buffer As String *4
    
    
    
    
         If CmT="+CMT:" Then                          ; +CMT: "+001234567890",,"2020/01/08 22:01:00+12" 
                                                      ; TEST message
                Cr_Buffer= Mid$(Trim_Buffer,48,4)                                               
                sCR = Left$(Cr_Buffer,4)
                If sCR="\r\n" Then                                                                                                                        
          SMSLength = Len(Trim_Buffer)
              If SMSLength >51 Then 
                SMS_Buffer = Right$ (Trim_Buffer,SMSLength-51)  
                 EndIf
                  EndIf
                 Select SMS_Buffer
                  Case "ON" 
                 Rla1=1
                  Case "OFF"
                   Rla1=0
                      EndSelect
                      EndIf
    Last edited by acel; 26th May 2020 at 15:36.

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. [SOLVED !] Variable reading problem
    By zerone in forum Proton Plus Compiler v3
    Replies: 10
    Last Post: 22nd April 2011, 12:56
  2. Problem reading inputs
    By NattyFido in forum Proton Plus Compiler v3
    Replies: 3
    Last Post: 12th February 2011, 14:06
  3. [SOLVED !] DS18S20 reading problem
    By Lithium in forum Proton Plus Compiler v3
    Replies: 10
    Last Post: 23rd September 2008, 09:39
  4. [SOLVED !] Ad7705 Stable Reading Problem
    By Roshan in forum Proton Plus Compiler v3
    Replies: 7
    Last Post: 17th June 2008, 04:35
  5. Table reading problem with 18F8722
    By iimsha in forum Proton Plus Compiler v3
    Replies: 2
    Last Post: 23rd November 2006, 15:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts