How to config MC7304 & MC7430 in embedded Linux?

Hi, I tried to use MC7304 or MC7430 in embedded linux 3.14.2 (ARM), with the latest driver, the modem was detected, but I don’t know how to make it online.

Modem driver S2.27N2.41(GobiNet & GobiSerial),
With MC7304, I detected /dev/ttyUSB0~2, /dev/qcqmi0, and eth2
With MC7430, I detected /dev/ttyUSB0~2, /dev/qcqmi0, /dev/qcqmi1, eth2 and eth3.

I checked SIM card (has ip address) is in the slot, no modem manager and network manager in my controller.

Reference to the “Technical Note - Migration from DirectIP to RMNet on MC73xx.pdf”. I sent some AT commands (copied from the doc) to /dev/ttyUSB2, but I still could not get the ip.

# ifconfig eth2
eth2      Link encap:Ethernet  HWaddr 06:EF:1D:30:9F:08
          BROADCAST NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Reference to the “Linux QMI SDK Application Developers Guide Rev1.26_1.pdf”. I unziped SLQS04.00.05.bin and copied it to my controller. Then run “connectionmgrarm”, “LTE Data Session started successfully” was show up, but the modem still offline and no IP address.

I confused how to use this modem. SLQS04.00.05 is over 900M, do I have to use this packet ? Is there any easy way to make the modem online?

I would appreciate if anyone can help me out here.

Given what you have said all you should have to do (making some big assumptions) is the following.

Using a terminal program againt /dev/ttyUSB2 end the following commands

at+cgdcont=1,"IPV4V6","<APN to be used>"
at!scact=1,1

Then at a terminal prompt

sudo dhclient eth2

That should be it.

Regards

Matt

Thank you Matt.

Following is the at commands’ log .

chat[850]: send (AT!SCACT=1,1^M)
chat[850]: expect (OK)
chat[850]: ^M
chat[850]: AT!SCACT=1,1^M^M
chat[850]: ERROR^M
chat[850]: alarm
chat[850]: Failed

when sent at!scact=1,1, ERROR is returned.
Then I sent at!scact=0,1 manually in the terminal, ERROR is returned.
I tried some other AT command(ati), return value is OK. Do you have any idea?

Today ‘AT!SCACT=1,1’ returned “OK” once, and modem was online at that time.
but after reboot, I got the log as I posted, AT!SCACT=1,1 return ERROR.

Thanks.

So you are obviously using your own APN, does it definitely not need a username and password? Does the at!scact come back immediately or does it take a second or so?

I need a bit more information to figure out what might be going on, can you send the below commands, the cmee=1 will cause the unit to output error codes rather than just ERROR giving us something to go on.

ati
at+cpin?
at+creg?
at+cgreg?
at+cops?
at+cmee=1
at+cgpaddr=1
at+cgdcont=1,"IPV4V6","axent.au"
at!scact=1,1

Regards

Matt

Yes, we use our own APN, it’s a special line. I’m sure don’t need username and password. We used MC8705 in the same way before.

I test AT commands in two different ways.
at!scact always come back immediately with OK or ERROR.

Test 1:
Manually typed in at command list with microcom.
Then call dhcpclient, modem be online immediately.
But it will drop off in a an hour, I don’t know why.

# microcom /dev/ttyUSB2
at!scact=1,1
OK

Test 2:
Wrote AT commands in file, and sent with chat command.
Then call dhcpclient, modem never be online.
No matter I got OK or Error when sending at!scact=1,1.

In this case, from kernel’s log, there’s user.info kernel: IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready

Mar 29 09:22:22 chat[620]: send (AT!SCACT=1,1^M)
Mar 29 09:22:22 chat[620]: expect (OK)
Mar 29 09:22:22 chat[620]:
Mar 29 09:22:22 chat[620]:
Mar 29 09:22:22 chat[620]: AT!SCACT=1,1
Mar 29 09:22:22 chat[620]:
Mar 29 09:22:22 chat[620]:
Mar 29 09:22:22 chat[620]: OK
Mar 29 09:22:22 chat[620]:  -- got it
Mar 29 09:22:22 chat[620]: send (^M)

Mar 29 09:22:25 chat[621]: send (AT!SCACT=1,1^M)
Mar 29 09:22:26 chat[621]: expect (OK)
Mar 29 09:22:26 chat[621]:
Mar 29 09:22:26 chat[621]:
Mar 29 09:22:26 chat[621]: AT!SCACT=1,1
Mar 29 09:22:26 chat[621]:
Mar 29 09:22:26 chat[621]:
Mar 29 09:22:26 chat[621]: ERROR
Mar 29 09:22:26 chat[621]:
Mar 29 09:22:36 chat[621]: alarm
Mar 29 09:22:36 chat[621]: Failed

Why sending from microcom and chat script has different result?
Every time I got OK return code when sending “at!scact=1,1” in microcom, the eth2 enters “RUNNING” status.
But if sending with chat script, the OK return code will not bring eth2 to “RUNNING”.

Thank you Matt:)

Maybe try something else than PPP.

I tried to use connection_manger and select options manually, and then call dhcp, it works, modem comes online.
but I don’t know how to send parameter automatically to connection_manger.
Do I have to modify code and rebuilt one?

Progress which is good.

Ok so a couple of problems now.

  • For the modem going off line an hour later not sure, were you using the connection? If it was idle then the network might shut the active session down.
  • For ETH2 not being ready it might be the speed with which the commands are going to the unit and the unit has attached (the at+cgreg:1 response) but the default bearer has not been brought up, this should happen quickly but it depends on the network response times and might be indicated by the fact that you got an error the first time you sent it manually, that’s the main difference I can see.

Regards

Matt

  • This time modem dropped off when it’s idle, but I guess sometimes it will drop off when it’s busy as well. We have random drop off issue on MC8705 too.
    Is there any AT commands to control this? Does it go off for saving energy?
    This product is not portable one, so I need keep it always online.

-If I remove AT+CGDCONT and AT$QCPDPP from chat script, modem comes online.

Thanks.