UARTs and FCM on Q2501


#1

Hello. I’m having big trouble with UARTs on Q2501B. What I want is to open a FCM flow on UART2 but I just cannot find all the needed steps in the procedure.
I think it should be:

  1. AT+WGPSCONF=0,0 //to set GPS in external mode
  2. AT+CFUN=1 //to switch it actually
  3. AT+WMFM=0,1,1 //open UART2
  4. adl_fcmSubscribe(ADL_FCM_FLOW_V24_UART2, …, …)

The problem is that after step 2., the NMEA frames keep coming from UART2 and it does not respond to AT commands.
Another thing is that, after some experiments, I was able to close UART1, so that AT+WMFM? returns
+WMFM: 0,2,0,0
+WMFM: 0,2,1,0
+WMFM: 1,2,4,0
+WMFM: 1,2,4,1
(note the first line) and I cannot turn it on again, not even using adl_atCmdCreate(“AT+WMFM=0,1,0”, ADL_AT_PORT_TYPE(ADL_AT_UART2, FALSE), …) (the debugger halts, application returns +CME ERROR: 3).
It does not cause problems except that after AT+WGPSNMEA=1, I’m not getting the frames while it worked before I started fiddling with the module. (Of course I’ve set AT+WGPSCONF=0,1 back).

So to sum this up, I need

  1. return UART1 to opened state, and
  2. detach GPS from UART2 so I can send AT commands and subscribe to FCM.

TIA, Milan


#2

Why 0? According to AT Commands Interface Giude p. 359 you should use 1 for UART1 manipulations and 2 - for UART2. (But when you send AT+WMFM? numeration is different…)

PS It seems that detailed UART How-to is really required since questions in this section have much in common. Any volunteers? :slight_smile:


#3

Well I’ve noticed people are talking about it but I think I have an older firmware that numbers ports 0-based consistently. See:

I hate repetitive tasks too, I’m a programmer after all 8) , but first I need to know how it works…
Also I couldn’t find anything specifically related to the GPS problem, can you?
My application uses GSM calls, but that costs money, so I wanted to debug it using UART2 instead. I thought it should be easy but it’s not :frowning:


#4

Now I think I’ve found the solution to the second problem. I was trying to read from GPS_RXD0 instead of GSM_RXD2 :blush: . Now that I’ve connected to the right signals, UART2 seems to be working (at least for transmitting, but maybe I have a problem with my cable).
So, only the first question remains: how to return the UART1 to Opened state?


#5

What have you already tried to do it? I suppose you should just send at+wmfm=0,1,1 (or 0 in your case), but definitely not on UART1 itself (see notes in “AT+WMFM” documentation). Something like adl_atCmdCreate(“AT+WMFM=0,1,1”, ADL_AT_PORT_TYPE(ADL_PORT_UART2, FALSE), ResponseHandler, “*”, NULL). I see you’ve tried something like this. Is it still not working after hardware changes?


#6

I’m just getting +CME ERROR: 3 all the time :frowning: Now I’m able to send AT commands through UART2 as well as through UART1, so I guess it’s all ready, but it simply does not work.

Interesting is, that although I’m not getting unsolicited WGPSNMEA frames on UART1, the internal GPS functions (adl_gpsGetPosition, MyGpsHandler()) are working fine :open_mouth: