B4R Question CheckRegistration Sub is Wrong??

Discussion in 'B4R Questions' started by Cableguy, May 1, 2018.

  1. Cableguy

    Cableguy Expert Licensed User

    Hi guys

    I am having a bit trouble getting info from my GSM/GPRS A6 Board.
    I finally managed initial communication, but getting the network status is being troublesome.
    When I initialize my board, I get the expected "AT+CNMI=2,1"
    But, seems like the board doesn't come out from the busy state, so I commented the line "If Busy = true...." in the SendCommand sub, and it performs the action as expected, and gives me as result
    Code:
    AT+CREG?
    +CREG: 
    1?1

    OK
    but the CheckRegistration sub logs "Not registred"

    I wonder if this line is correct?
    Code:
    If bc.IndexOf(buffer, "+CREG: 0,1") > -1 Or bc.IndexOf(buffer, "+CREG: 0,5") > -1 Then
    Form the documentation in this page, my response shows the board to be registered to home network
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You need to modify this line. I don't remember the exact details but this check expects the status messages of a different chip.
     
  3. Cableguy

    Cableguy Expert Licensed User

    Thanks Erel...
    Since its an AT command, shouldn't it be "universal"?
     
  4. Johan Hormaza

    Johan Hormaza Active Member Licensed User

    That depends on the versions.
     
  5. Cableguy

    Cableguy Expert Licensed User

    Can you elaborate? How do I check versions?
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Not directly related but it seems that the order of the status codes I received is different than the order documented in that page.

    The bottom line is that you should feel free to change the parsing code based on your chip outputs.
     
    Cableguy likes this.
  7. tigrot

    tigrot Well-Known Member Licensed User

    AT comand set is "Almost universal".
     
  8. tigrot

    tigrot Well-Known Member Licensed User

    Are you sure that there are no aswers queued before your AT comand?
     
  9. Cableguy

    Cableguy Expert Licensed User

    I don't think so because I am getting "OK" for each command I send.
     
    tigrot likes this.
  10. tigrot

    tigrot Well-Known Member Licensed User

    I've just finished a pjt using Vdrive: nothing in document was right. I had to reinvent everything.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice