TCP connection with MC9090

Hello all.

I’m working with a modem MC9090, that is quite similar to the SL series divices, I think.
I’d like to connect via TCP with a server, but there is a problem with this AT command: AT!PADCONN, that always gives me an ERROR. My AT commands:

AT+CPIN=1111 //Introduce PIN number

OK

AT+CGATT=1 //Attach

OK

AT+CGDCONT=1,“IP”,“movistar.es” //Define PDP context

OK

AT+CGACT=1,1 //Activate PDP context

OK

AT+CGREG? //Is the device registered in network?

+CGREG: 0,1
OK

AT!PADSETUP=1,2,0,86.109.107.236,0,3001,0,1 //Configure server IP & port to TCP connection

OK

AT!PADCONN=1 //TCP connect

ERROR


Could someone please tell me if there is something wrong with these commands or tell me any advice to solve that? I’ve been struggling with this issue too much time, so your help will be welcome.

Thank you.

HI

I am first time to try the command.
so, I don’t know what is PAD.
May you tell me why use the command?

And, do you have successfully used same command on SL9090?

Hi okqqkimo1, thank you for your reply.

As I wanted to connect via TCP with a server, I looked for the appropriate AT command, just like I did successfully when I was working with other modems. However, for MC9090 I only found these “PAD AT commands”. I was reading about PAD (Packet Assembler Disassembler) and I think it is an old term that describes a kind of device that provides connectivity to an X.25 network, so, a packet-switching network. AT Commands manual says that these commands are used to configure, initiate and disconnect PAD client and server connections. I have read in SL series thread that these commands can be used to TCP connections in IP networks.

So, I am using these PAD commands.

PD: I have not used any SL series modem.

HI

But the MC9090 is support QMI mode, Can it meet you requirement?
And it’s easy to use.

Hi again.
I’ve been thinking about this issue and I have come to the conclusion that the server I’m trying to connect to, must be a PAD server, not a simple TCP server. I’m not sure, but it makes sense.

So, I’d like to try new possibilities like QMI, but I don’t know how to use it. I’m using Debian 7 that already includes libqmi. Is there any example about how to use this utility?

Thank you again for your reply

Hi

The libqmi is open source, it’s easy to found how to use in google.
Does it developer is by your self? or third party?

Because Sierra release is GobiDriver and SLQSSDK, not libqmi,
So, I can’t provide more suggestion…
But, I think you can check it with who porting it.

An introduction to libqmi
https://sigquit.wordpress.com/2012/08/20/an-introduction-to-libqmi/

Hi,

Do you solve this issue by using QMI?

Hi all.

Finally, I have solved this issue as follows:

When a 3G modem is plugged and registered on network, there is a new interface called wwan0 available with an associated IPv4 address , like eth0 or wlan0. If the routing configuration is ok and traffic to Internet is able to be routed through wwan0 interface, then a socket can be used to establish a TCP connection just like it is made with eth0 or wlan0.

First of all, I have used qmicli utility for the network registration:
My SIM card needs a PIN code, so I wrote in the terminal:

sudo qmicli -d /dev/cdc_wdm0 --dms-uim-verify-pin=PIN,2323

(where 2323 is the PIN number).

Then I need to start the network connection:

  • I can do it via qmicli:

sudo qmicli -d /dev/cdc_wdm0 --wds-start-network=[apn],[login],[password]

  • or I can do it via a moxa’s script (my Sierra modem is inserted in a moxa 8100 device)

sudo /sbin/cell_mgmt start APN=[apn],Username=[login],Password=[password],PIN=[pin]

After the network’s started, I can check the IP address associated with wwan0, and then I add a new default routing path with that IP like gateway address:

route add default gw [wwan0_IP]

Finally I have written C code to create a socket and establishing a TCP connection.

I hope this can help someone.

Thank you for suggestions.