Hello!
I wonder how many TCP sockets I can open simultaneosly?!
My device is Q2687.
In the web site is said: Multiple sockets / sessions: Embeded mode
Limited only by RAM
If only RAM limits number of socket what if I put external RAM on parallel bus?!
Or WIP uses only internal RAM of Q2687?!
I need to open 256 sockets simultaneously.
Is this possible?
If not what is the maximum number of sockets I can open?
I am having problems with TCP sockets, I need to make a connection using the Q2687 modem and am not really understanding the sample code. I need a few pointers from people who have already done this so as to write my own application.I have the apn, ip. How do I run this application on terminal emulator because it seems to hang and I don’t know how to continue on TE.
you can just try to set WIP_NET_OPT_SOCK_MAX option to 256 by wip_netInitOpts. you can also set the size of socket buffers to save the memory.
and when you subscribe the error service by adl_errSubscribe() function, you will get the WIP_NET_ERR_NO_MEM error code if there is not enough memory for the number of socket that you supplied. if you dont subscribe the error service, your module will restart insead of getting WIP_NET_ERR_NO_MEM error code.
so it is better to try first. and one thing, if you close the socket by wip_close function after your work will be done, you will free the memory which the related socket uses. so i think it is better to call wip_close after you finish your work with that socket
I managed to solve my problem. I had to type in a command on the terminal emulator so that I get a response on the TMT.
I have a new question. I am developing an API for interaction of a modem 2687 and a ticket machine. Is it possible to comment to two ports at the same time?? I must pass an AT command for example that “AT+ CONNECT” and the command passes the APN name, remote IP address and port, and another port for the Auto vehicle locator service. e.g AT+CONNECT passes “internet”,“10.30.0.78”,8000,8001, the last two being the ports.
a socket can only be connected to one socket.
so if you want to send the same information to two sockets you need to open two seperate connections.
or you could write your own application in the module to do that for you.
How can you tell to WIP that it should use external RAM?
If you need a lot of RAM, you can try WMP100.
The second possible solution is to use any GSM module with GPRS on board, but with external TCP/IP stack on some processor. With this configuration you can choose any GSM module and open as much sockets as you want (and as much as RAM you have on board) but it is pretty tricky solution. You will need some kind of ARM, some embedded OS and open source TCP/IP stack…