Creating sockets for WISMS 228


#1

I am developing an application for a product that can be configured to work as either a basestation or a battery-powered outstation. However, I can’t get the modem in the basestation to create a UDP client to send UDP messages to outstations:

I have based my code on the description given on page 65 of the Sierra product Technical Specification and Customer Design Guidelines and the example given in section 9.7.3 of the Sierra AT Command Manual for Firmware L22. After applying power to the modem it waits for 1000ms then sets the On/Off pin low. It waits a further 685ms then waits for the GSM_Ready pin to be asserted high. Then it configures the modem and the UDP server. I have monitered the following exchange of data to/from the modem:

8/08/11 18:33:18 COM1 >: AT+CPIN?
18/08/11 18:33:18 COM1 <: +CME ERROR: 10
18/08/11 18:33:19 COM1 >: AT+CPIN?
18/08/11 18:33:19 COM1 : No Response.
18/08/11 18:33:20 COM1 >: AT+CPIN?
18/08/11 18:33:21 COM1 <: +CPIN: READYOK
18/08/11 18:33:21 COM1 >: AT+CMEE=1
18/08/11 18:33:21 COM1 <: OK
18/08/11 18:33:21 COM1 >: AT+WIPCFG=1
18/08/11 18:33:21 COM1 <: OK
18/08/11 18:33:21 COM1 >: AT+WIPBR=1,6
18/08/11 18:33:21 COM1 <: OK
18/08/11 18:33:21 COM1 >: AT+WIPBR=2,6,11,wirelesslogic-hsdpa.co.uk
18/08/11 18:33:21 COM1 <: OK
18/08/11 18:33:21 COM1 >: AT+WIPBR=2,6,0,Adaptive
18/08/11 18:33:21 COM1 <: OK
18/08/11 18:33:21 COM1 >: AT+WIPBR=2,6,1,Adaptive
18/08/11 18:33:21 COM1 <: OK
18/08/11 18:33:21 COM1 >: AT+WIPBR=4,6,0
18/08/11 18:33:21 COM1 <: +CME ERROR: 848
18/08/11 18:33:23 COM1 >: AT+WIPBR=4,6,0
18/08/11 18:33:23 COM1 <: +CME ERROR: 848
18/08/11 18:33:25 COM1 >: AT+WIPBR=4,6,0
18/08/11 18:33:25 COM1 <: +CME ERROR: 848
18/08/11 18:33:27 COM1 >: AT+WIPBR=4,6,0
18/08/11 18:33:27 COM1 <: +CME ERROR: 848
18/08/11 18:33:29 COM1 >: AT+WIPBR=4,6,0
18/08/11 18:33:32 COM1 <: OK
18/08/11 18:33:32 COM1 >: AT+WIPCREATE=1,1,80
18/08/11 18:33:32 COM1 <: OK+WIPREADY: 1,1
18/08/11 18:33:32 COM1 >: AT+WIPDATA=1,1,1
18/08/11 18:33:32 COM1 <: CONNECT

You will see that I first repeatedly issue an AT+CPIN? command until the modem responds with READY to confirm that the SIM card is ready. I then follow the sequence given in 9.7.3 of the Sierra AT Command Manual. However, I found the modem gives an error resonse to the AT_WIPBR command. I eventually found this was apparently because the modem wasn’t ready to action the command, so I repeat it every 2 seconds until the modem gives the correct response. I can then configure the UDP client.

All is well so far, but some time later there is the following exchange, attempting to create a UDP client to send a message:

18/08/11 18:33:34 COM1 >: +++
18/08/11 18:33:35 COM1 >: AT+WIPCLOSE=1,2
18/08/11 18:33:35 COM1 <: OK
18/08/11 18:33:35 COM1 >: AT+WIPCREATE=1,2,“109.70.226.83”,80
18/08/11 18:33:35 COM1 <: +CME ERROR: 3
18/08/11 18:33:35 COM1 >: AT+WIPDATA=1,2,1
18/08/11 18:33:35 COM1 <: +CME ERROR: 831

You will see that I put the modem into AT command mode, then close any socket that may have been previously created on ID 2. I then attempt to create a socket as ID2 to act as a UDP client to the required outstation IP address, but it fails with error code 3. This is not a documented response to an AT_WIPCREATE command, but I assume it means ‘Operation Not Allowed’.

Can anyone spot what I am doing wrong?


#2

Hi,

Try to enter the local port parameter in the above command , try giving something like this :
AT+WIPCREATE=1,1,80,”www.sierrawireless.com”,80.