I then create the network device and use at!scpaddr=1 to retrieve the IP address.
Am I missing a command?
Also, as an experiment, I used Sierra Aircard Watcher in Windows to establish a successful data connection and switched the modem to my VxWorks dev system. After creating the device in ifconfig and setting the routes I was able to successfully ping Google.
command will reboot the modem - and this will take some time to complete. So if you’re firing off the
immediately after the +CFUN then your commands are probably being missed by the modem.
Something like this may be better:
AT+CFUN=1 // force reboot
AT // Send AT until you get an OK response which indicates the modem is back up
AT+CPIN? // test for sim ready state - or input the SIM PIN if required
AT+CREG? // repeat this until you get the appropriate +CREG response indicating the network is ready
AT+CGATT=1 // etc
You should also be waiting for a response to the command - OK, ERROR or results - before sending the next command. You might also want to try sending
as the first command AFTER the reboot - this gives numeric codes for error messages which makes debugging easier.
AT!SCACT=1,1 works fine for Direct IP modem ( PIS=0x68A3), but seems it doesn’t work for QMI modem (PID=0x68A2). I am not sure the AT!SCACT command is a valid command to activate PDP context or not - I always got error with that command from QMI modem:
+CME ERROR: 30
My module has been registered successfully with home network -
How (steps) can we activate PDP context for QMI modem (MC77xx, MC7354) to start data connection ?
Your sequence is correct to activate PDP context - if you want to pass traffic through Direct IP interface, you need to pass the assigned IP from carrier to DIP interface via dhclient or ip route command
Make sure your modem has got IP address
After that, start dhclient on direct ip interface (dhclient wwan0) -
check wwan0 interface - make sure it got the same IP address as from AT!SCPADDR=1 command
set any route you wish through wwan0 interface
should be able to send traffic via wwan0 interface