3G usb modem using CDC interface

19 posts / 0 new
Last post
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have successfully been talking to a 3G usb modem using CDC interface. Problem is after I configure all the settings and APN and then do a dial up and establish an IP session, the port then becomes a data interface. After which I can see all the data transmission and reception etc..

But what if I want to use AT commands while data mode is still active? like say I want to querry the RSSI values etc using AT comands. How do I switch from PPP/data session to AT commands?

I have read about +++, but it doesnt do anything for me... :|

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The huawei modems have three ports. Also for +++ there is a guardtime before and after the sequence so that the pattern appearing in a valid datastream doesn't cause command mode.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok thanks for that. I have managed to talk to the other diagnostics interface on the usb...so I can send commands through that interface (1) while data interface (0) is in use.

The other thing is how can the micro know if the data session is still up? What if for some reason the network disconnects the usb dongle? How will the micro know that? Is there a special char sequence sent to the interface when the modem is hung by network? Or something I could probe every few minutes?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Some timeago, you wanted to know how to talk to these devices and i suggested looking at linux sources. I suggest this again. Benefit from the open source revolution.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

back in the days when I was writing PPP with usb dongle I did indeed look them codes up. Most of them I found very hard to follow. I do have a successful PPP session written up, I just need to know how to detect a network forced disconnection... I shall google again.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If its like a modem, the Carrier Detect goes away doesn't it?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Its a usb dongle modem. Dont think u can see carrier detect via + and - pins :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok according to google... I am supposed to see "NO CARRIER" phrase coming from the usb terminal instead of a packet starting and ending with 0x7E (for ppp data session).

The NO CARRIER should tell me that the data session has ended...or a dial attempt was unsuccessful.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok after 0x7E I expect a 0xFF (PPP address field) if this is not 0xFF then it would be '\r' char (if its text command response eg OK or NO CARRIER), this is what I catch. I use a state machine. Not sure how to simulate a NO CARRIER condition though to test it....lol I dont control the network!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Poke the dongle into a Coke can!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You might also benefit from studying this project:

https://code.google.com/p/avrusbmodem/

Which uses my LUFA project to talk to a 3G modem and establish a PPP session to fetch data remotely (keep in mind that most of these dongles pass through a NAT at the carrier's end, and thus can't act as a server).

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

Pages