I am working on a weather station aplication. I need to do 3 tasks at the same time. One task does not have to stop the other, is this posible?
1- Recieve sensors data from serial port every 5 minutes and store them in memory
2- If there is data in memory that has not been sent, send it to a server in internet through gprs. If the server is down keep trying until it gets through.
3- If the modem (fastrack) receives a SMS, send an SMS to the same number from the first SMS with the last data gathered from the sensors.
I cant see how I can make them all work toguether at the same time. For example if the modem is trying to send the information to the server, how is it going to be ready to recieve an SMS and run task 3?
I would really apreciate your help.
Thanks in advance.
You didn’t mention which CPU/Module you are using.
Yep - if you are using the Q2686 module or a Q2686 based modem. Have no experence with any others.
In the Oasis 2.xx (R7.x OS) samples there are some examples that will show you how to do this. Also check out the Oasis 2.xx API documentation.
I’m doing a similar thing in one of my apps. I’m currently running about 9 ‘threads’ that are nominally independant using the multitasking API on both the Q2686H and Q2686G modules.
As I understand it, this is NOT possible if you are still running the 6.xx OS firmware…
Thank you very much for your response, its been very helpfull.
I have another question. Hope you can help me, as I dont have much experience with these modems.
I want to connect the modem (I still do not no which one is best for my aplication, I would appreciate your opinion. As for now I am between a q2686 or directly a Fastrack supreme 20) to this 3 things:
1- Serial input from sensors. I am thinking of a microcontroler that gathers information from all sensors and sends the info to the modem via a serial input.
2- Serial output to LCD display.
3- Serial PC connection. This connection does not necesarily have to be available all times. I am just going to need this one to upgrade the embeded software from time to time. The best for me would be to have all three connections available all times but It would not be so bad to not have the LCD display (for example) when I am using the PC connection.
Can I do this with the q2686 of Fastrack supreme? Can I use 1 serial connection for these three purposes? Any ideas? I feel a bit lost. Would I need to multiplex the serial connection?