FCM with q2501b


#1

Hi, I´m trying to switch the Q2501B module’s serial link(UART1) into V24 state. Here are the steps i follow:

  1. adl_fcmSubscribe(); -> the handle returns 0
  2. wait for ADL_FCM_EVENT_FLOW_OPENNED
  3. adl_fcmSwitchV24State(); -> returns 0

after that i should be able to use UART1 as a normal serial link, right? The module keeps answering to AT commands and adl_atSendResponse() messages are displayed in Hyper Terminal. I´m using GPIO, GPRS, GPS and socket features. What should i do to fix the problem?
thanks,
Sérgio


#2

Hi Sérgio,

are you using the ADL_AT_PORT_TYPE macro in a adl_atCmdCreate() call at any place in the program after having switched mode with the adl_fcmSwitchV24State() function?

This will bring you back to AT mode (and I think even without signalling the switch to your application) - at least if you are using OpenAT 3.02.

Similar problem described here: http://www.wavecom.com/modules/movie/scenes/forums/viewtopic.php?t=133

Also you shouldn’t send adl_atSendResponse() in data mode. These are for AT mode and there is another function for data mode: adl_fcmSendData().

Best Regards,
Jan


#3

Thanks for the reply Jan,

No, i´m not using the ADL_AT_PORT_TYPE macro in my code. The strange thing thow is that if i send any message using adl_atSendResponse() in data mode, the module resets, i use this command to debug my software. I know that it shouldn’t work in data mode but i thought it would do no harm to keep it… Also, the link you posted doesnt work, could you check it?

thanks,
Sérgio


#4

Hi Sérgio,

I checked the link and it worked - it opened a new tab in my Opera browser though… Maybe it reused one of your open windows to change the page inside? Don’t know… You can find it in the Multi Uart section, look for “UART2 not working” thread. (It may not apply here since you confirmed that you don’t use the ADL_PORT_TYPE…)

What do you do first: Initialize the TCP/IP library or subscribe for fcm? (I think the order matters and I think TCP/IP should be first.)

I am with you that the module should not reset in this case. That function should not be called in the data mode but the operating system should take care of the invalid call and return an error. I did disable the UART1 from the internal application once and then a call of adl_atSendResponse() with a debug message also did reset the modem… Same here, I should not send anything when the port is turned off… But I can’t say that I like it that the modem just crashes there…

Best Regards,
Jan


#5

Hi Jan, i subscribe to fcm first, ill try to change my code to subscribe to fcm after opening a socket, but i’m afraid it’s not possible because i have to use fcm before and after opening an IP connection…
Best Regards,
Sérgio


#6

Oh, sorry - I meant only the init of the library needs to be first. Opening and closing connections can be done later…

Best Regards,
Jan


#7

that would be much easier… but what do you mean by init? do i have to subscribe to IP first?
Best Regards,
Sérgio


#8

Hi again,

I just checked my code and I actually did it this way:

  • subscribe to the flow from main (but actually using UART2)
  • switch to data mode (as you did on ADL_FCM_EVENT_FLOW_OPENNED)
  • then setting the pin
  • then I did ed_Init(); on event ADL_SIM_EVENT_FULL_INIT in the SIM handler function

I looked in the eDLib V3.00 Guide and they said that you should call ed_Init in the adl_main function, but I found it worked better when using the steps above. Haven’t had a problem with that yet…

Best Regards,
Jan


#9

Thanks Jan, I’ll make the changes in my code and post the results.

Sérgio


#10

Hi jan, i facing a strange problem… I found that multiple calls* to adl_flhWrite() funtion when FCM(UART1) is active will reset the module :confused: .

*something like this:

{
//code
adl_flhWrite();
adl_flhWrite();
adl_flhWrite();
adl_flhWrite();
//code
}

thanks,
Sérgio