GPRS Modem Troubles with PPP Class

We are currently trying to get an AirlinkGL6110 modem (product description: http://www.sierrawireless.com/productsandservices/AirLink/Programmable%20and%20Simple%20Modems/GL_Series/GL6100_GL6110.aspx)
(technical specification and user guide: http://www.sierrawireless.com/Sierra%20Wireless/Support/Downloads/AirLink/Programmable_Gateways/~/media/Support_Downloads/AirPrime/Hardware_specifications_and_user_guides/AirLink_GL61x0_Product_Technical_Specification_and_User_Guide-Rev004.ashx ) to get to work with your EMX devboard and PPP.Connect(“ourusername”, “ourpassword”) always fails.

The modem is connected using the COM2 port with a RS323 cable. The SerialPort uses hardware handshaking and as far as we can tell, that does not seem to cause the problem. (We checked that with a logic analyzer) Sending commands to the modem works just fine. We also achieved to connect to the GPRS network:

AT+IFC?
+IFC: 2,2
OK
AT
OK
AT+CGMI
WAVECOM WIRELESS CPU
OK
AT+CGMM
MULTIBAND 900E 1800
OK
AT+CCID
+CCID: “8943050810202738161”
OK
ATV1
OK
ATH
OK
ATZ
OK
ATE
OK
AT+CSQ
+CSQ: 8,0
OK
AT+CGREG=1
OK
+CGREG: 0
AT+CGATT=1
OK
+CGREG: 2
+CGREG: 1
AT+CGATT?
+CGATT: 1
OK
AT+CGREG?
+CGREG: 1,1
OK
AT
ad: 1 - current message: ‘OK’
OK
AT+CGDCONT=1,“IP”,“web.one.at”
OK
ATD99**1#
CONNECT 115200

Our problem now is, that the PPP.Connect(string username, string passwort) call always fails with the status PPP.ConnectionStatus.Connection_Faild

Just a note: We make heavy use of your sample code of the PPP class in the GHI Framework so that should be fine too.
We also tried the very same with our old Siemens MC35i modems and that worked like a charm.
We also tried changing the cable, power adapter, sim card, and used another Airlink GL6110 to exclude a hardware fault.
We even tried using the USB version of the GL6110 and had the very same issue.

That makes us think that there might be a problem with your internal PPP stack. Are you currently working and/or planning to release an updated version of your stack?

Any advise on what we could do/try next would be apprechiated!

We bought a new modem - the WISMO228 devboard by GLYN (FTDI USB) - and have the very same troubles. ([url]http://www.glyn.de/content_xl.asp?wdid=2227&sid=00000026795C5159595241645258415347[/url])

In the beginning it looks fine, as the EXM boards detect a connection of a FTDI USB device - absolutely correct.
Even sending the commands works like a charm:


AT+CGMM
WISMO228
OK
ATV1
OK
ATH
OK
ATZ
OK
ATE
OK
AT+CGATT?
+CGATT: 0
OK
AT+CGATT=1
OK
AT+CSQ
+CSQ: 31,99
OK
AT+CGATT?
+CGATT: 1
OK
AT+CGREG?
+CGREG: 1,1
OK
AT
OK
AT+CGDCONT=1,"IP","web.one.at"
OK
ATD*99***1#
CONNECT
AT connected, Ready for PPP connection Establishing!
Connect PPP

But again, the PPP class fails to establish a connection.
Now the error is a little bit different:

if (!PPP.IsEnabled)
                    PPP.Enable(at.Modem);
                switch (PPP.Connect(username, password))
                {
                    case PPP.ConnectionStatus.Authentication_Faild:
....

the program hangs when calling “PPP.Connect()” - so we do not even get an “Authentication_Faild” or anything like that.

Even “funnier”, plugging that board to the EMX devboard makes the EMX crash (rebooting and restarting all the time) as it seems it cannot provide enough voltage.
However plugging it to the FEZ Cobra, the power supply seems to be sufficient. (we checked several cable combos)

We would REALLY appreciate any help on this topic. :cry:

Didn’t you have a problem with this thing before?
[url]http://www.tinyclr.com/forum/1/2148/[/url]

yeah - that was a little different though.
In that post we already achieved to connect with the “grandpa modem” siemens mc35i and I did not know then, that GPRS modems always get a private IP. :slight_smile:

Now I’m a little smarter. :wink:

Anyways - any ideas? PLEASE? :expressionless:

I’ve just installed the new firmware for the EMX devboard and the FEZ Cobra.

The only difference now?

Instead of “PPP.Connect()” to return a “Connection_faild”, it gets stuck forever/hangs.
This is the case for the following modems:

[ulist]Airlink GL6100 connected via USB
Airlink GL6100 connected via RS232
GLYn devboard for Wavecom WISMO 228 connected via USB[/ulist]

–> it seems that my last post was a little inaccurate: it was not because of the WISMO 228 modem that the call to “PPP.Connect()” hung, but the new firmware of the FEZ board…

Not good… - please GHI team - give us support.
I’ll keep posting :wink:

Let me answer you last question

[quote]Instead of “PPP.Connect()” to return a “Connection_faild”, it gets stuck forever/hangs.
This is the case for the following modems:

Airlink GL6100 connected via USB Airlink GL6100 connected via RS232
GLYn devboard for Wavecom WISMO 228 connected via USB

–> it seems that my last post was a little inaccurate: it was not because of the WISMO 228 modem that the call to “PPP.Connect()” hung, but the new firmware of the FEZ board…
[/quote]

The PPP code and related code have not been changed with the latest firmware. Please double check the code, recompile it.

I remember you tried mc35i before. can you try it with the new firmware first?

For the other modems, give me some time to take a look at your posts.
The first things that comes to my mind before reading them is, did you try the modems with a PC first? with PAP athentication only?

Lets try to start over.
Create a brand new application with the PPP example code avaiable with the PPP library documentation.
First try it with the siemens modem that worked before then try the other modem.

And show me the code you are evaluation with.

[quote]Even “funnier”, plugging that board to the EMX devboard makes the EMX crash (rebooting and restarting all the time) as it seems it cannot provide enough voltage.
However plugging it to the FEZ Cobra, the power supply seems to be sufficient. (we checked several cable combos)
[/quote]
EMX Dev Sys has a display which withdrow considerable power. You should try it with 6V external power or connect the USB cable to a powered USB HUB.

Ok that sounds interesting… :slight_smile:

[quote]did you try the modems with a PC first? [/quote] Well we checked the AT-Commands until we got a “CONNECT”. That seemed to be enough for us.

[quote]PAP athentication only?[/quote] As it worked with our “good old siemens” using PAP authentication, we thought that using PAP for the other modems would be the best idea.

However I just read in your documentation of the PPP class: [quote]Only PPP client with PAP authentication or non-authentication is supported.
[/quote]
but how do I connect without PAP authentication?? I mean the method “PPP.Connect()” does not have an overload without parameters. Or should I pass “null” for username and passwort?

I’ll now go and try to build a veeery basic sample using the code of your documentation. I’ll just need to modify it to use USBH_SerialUSB instead of SerialPort. → I’ll ping back later…

OK… I started over and tried to get your GHI SDK Demos to work with any of those modems.

  • no luck so far.
    I created two small projects - one for PPP over SerialPort and one for PPP over USB.

You can download the sources from:
[url]http://cid-7f3cbb45213a5b15.skydrive.live.com/redir.aspx?page=browse&resid=7F3CBB45213A5B15!124&type=6&Bsrc=EMSHOO&Bpub=SN.Notifications[/url]
(note: please mark the whole link above. Seems your forum engine splits it with a line break!)

Just one guess: How is the handshaking implemented in USB? I mean there cannot be a hardware handshaking enabled, right?
It’s just because the Airlink GL6100 uses hardware handshaking by default:

[quote]< DCE_by_DTE>: local flow control parameter
0 none
2 RTS (default value)
< DTE_by_DCE>: local flow control parameter
0 none
2 CTS (default value)[/quote] (see: [url]http://archive.sierrawireless.com/resources/AirPrime/Open_AT_SDK_All_devices/AT_Command_Interface_Guide_Open_AT_Firmware_7-4.pdf[/url])

and the WISMO 228 is by default configured like this:

[quote]<TA_by_TE> Description
0 (default) No flow control
1 Software flow control
2 Hardware flow control
<TE_by_TA> Description
0 No flow control
1 Software flow control
2 (default) Hardware flow control[/quote]
(see [url]http://www.rftechsales.com/sitebuildercontent/sitebuilderfiles/wismo228atcommandmanualrev001.pdf[/url])

could that cause an issue? I mean of course we tried changing those values to “no flow control” as in our minds that has no effect on the USB interface, or are we wrong with that in mind?

I now also tried the sample code with all modems and my “holy ChipworkX”.
However I am experiencing the same behavior: PPP.Connect() hangs.

Now I also tried calling PPP.Connect with “string.Empty, string.Empty” and “null, null” as I was hoping to get an unauthenticated connection (so without the “PAP thing”) but no luck. The string.Empty call hangs just as the one with username and password, and the null-call internally throws a NullReferenceException and then returns “Connected” which is an error for sure as DNS resolving is nor working and the IP is a 192.168.xxx.xxx although our provider always gives us a 10.xxx.xxx.xxx IP address…

No idea…

Alexander,

Try your modems with PC, you should be able to access the Internet through you PC with the exact same AT commands first and with PAP authentication enabled (take a look at the image attached), before moving to EMX or ChipworkX.
Getting AT commands to work and getting the CONNECT message do NOT guarantee that this is enough to be able to access the Internet.

No USB modems (USB2Serial) modems. use only serial modems for now.

I see that you did not test the Siemens modem first as I asked you before.

Also I recommend that you use the same SIM card of the same ISP you used before and got it working

Also comment out this line to disable hardware handshaking

//modem.Handshake = Handshake.RequestToSend;

Don’t forget to disable hardware handshaking on the modem side also.

PAP authenticaion currently is the only authentication protocol supported with our PPP support. Some ISP (Internet Service Providers) does not accept PAP, that is why I asked you make sure that PAP authentication is supported. Do not use PPP.Connect() without username and password.

By the way, the maximum timeout is more 60 seconds before you get the connection failure.

OK.
Sorry for not mentioning it: of course I double checked it with our Siemens MC35i, and the GHI.PPP.Demo project runs perfectly.

The second RS232 modem we have is the Airlink GL6110. According to your hint, I changed flow-control to “none” first. See the following code section. As the Airlink GL6110 uses hardware handshaking by default, we first need to open a SerialPort with hardware handshaking enabled. Otherwise we never get a response of the modem. Then we change the handshaking to none using an AT command first, and then re-opening the SerialPort.
However we still get a “Connection_faild”

 public static void Main()
        {
            //disable AIRLINK handshake
            modem.Handshake = Handshake.RequestToSend;
            modem.Open();
            string cmd = "\r+++\r";
            Thread.Sleep(1500);
            modem.Write(System.Text.Encoding.UTF8.GetBytes(cmd), 0, cmd.Length);
            Thread.Sleep(3000);
            cmd = "AT+IFC=0,0\r";
            modem.Write(System.Text.Encoding.UTF8.GetBytes(cmd), 0, cmd.Length);
            Thread.Sleep(1000);
            modem.DiscardInBuffer();
            modem.DiscardOutBuffer();
            modem.Close();
            modem = new SerialPort("COM2", 115200, Parity.None, 8, StopBits.One);
            modem.Handshake = Handshake.None;

NetworkChange.NetworkAvailabilityChanged += new NetworkAvailabilityChangedEventHandler(NetworkChange_NetworkAvailabilityChanged);
            // Till this point TCP/IP stack is hooked previously Enabled interface (Ethernet by default)
            PPP.Enable(modem);
            //modem.Handshake = Handshake.XOnXOff;
            //modem.Handshake = Handshake.RequestToSend; // This is to avoid data loss during PPP communication.
            modem.Open();
...

Changing the sim card is also what we already did. I did it again -> used the sim card that works with our siemens, but airlink won’t do its job…

(by the way there is a bug in your sample code: when the connection can be established the flag “network_is_read” is also set to “false”, though it must be set to “true”:


case PPP.ConnectionStatus.Connected:
                        // PPP setting will overload the first interface settings since only one interface is supported.
                        netif = NetworkInterface.GetAllNetworkInterfaces();
                        Debug.Print("PPP Network settings:");
                        Debug.Print("IP Address: " + netif[0].IPAddress);
                        Debug.Print("Subnet Mask: " + netif[0].SubnetMask);
                        Debug.Print(" Default Getway: " + netif[0].GatewayAddress);
                        Debug.Print(" DNS Server: " + netif[0].DnsAddresses[0]);
                        network_is_read = true; //this was originally set to "false" at this position...
                        break;

)

Still there remains an open question for us: What modems did you check your stack with? Is there any (even an internal) list of supported modems? If so, we would highly appreciate if you could list those.

I now achieved to connect the Siemens MC35i to my laptop using a USB2Serial cable.

I installed a Standard 9600bps Modemdriver in Windows Vista device manager and specified the corresponding COM Port (which is COM27)

See the following screenshot of the device manager where you can see the default modem and usb2serial port installed:
[url]http://public.bay.livefilestore.com/y1pRnjEaYnxKJDNWHeIpRKwsntNlCci0ZR9LO8nqa93ZIwLulADSsgKIbw3vHXj0eMqMBIMRq2wlstGqxhErEdMgg/4.png?psid=1[/url]

The following are the settings I used for the dial up connection:
[url]Login | Microsoft 365
[url]Login | Microsoft 365
[url]Login | Microsoft 365
[url]Login | Microsoft 365
[url]Login | Microsoft 365

The interesting part is, that this dial-up connection works with our siemens mc35i without a problem:
I can specify 9600bps, disable hardware handshaking and it still works seamless.

However, when I connect ther Airlink GL6110 with the very same settings (115200bps and hardware handshaking), I get the following error immediately:
[url]Login | Microsoft 365
(immediately = after ~half a second. It doesn’t even seem to try to connect to the server/or even dial the number)
I am sorry for the german error messages. That error message says: “Error 668: The connection was closed”

When I retry that connection procedure, I even get a worse error saying “Error 692: Hardware error in modem (or within another plugged-in device)”:
[url]Login | Microsoft 365

Might there really be a hardware error??

Another interesting fact for me is that we now used the dial up number *99#. Using AT-commands, we always used the AT+CGDCONT=2,“IP”,“web.one.at” settings. However “dialing-up” with that address (web.one.at) does not work.

I’ll go on and try the other USB modems as well! :slight_smile:

Update:
I now also tried the Airlink GL6110 connected through USB.
Although I copied all settings, I get the very same error as with the serial Airlink modem:
[url]Login | Microsoft 365
The only difference in the settings are the modem and the flow control settings
[url]Login | Microsoft 365
(Note: disabling hardware flow control and/or switching back to 9600bps does not help either - and “Yes - I used the very same sim card as in the working Siemens MC35i” ;-))

Installing the WISMO228 Modems does not work either. Again, I use the same settings as with the other 3 modems.
However, during dial-up I get the error message “Error 633: The modem (or another device is already in use or is not properly configured)”:
[url]Login | Microsoft 365

The only thing I had to additionally configure is the baud rate, as the wismo boards only seem to work with a baud rate of 115200 bps. Any other baudrate like 9600 results in being unable to send at commands (eg. in TeraTerm)
[url]Login | Microsoft 365

Might be a driver problem eh? :slight_smile: (as I always used the “Standardmodemtreiber for 9600bps modems”)

Wow that is a lot of information. But I am not sure if I can help you more in that. But I am almost positive that as soon as you get familiar with these modems and the Internet service provider settings and get them to work with your PC then getting them working with EMX will be a piece of cake.

I got curious about this modem. I ordered the Airlink GL6110 to take a look at it. But this does not mean you stop trying ;). I will tell you when I will dedicate time to work on it, this might be after weeks.

Hmmm - I was hoping to read another answer…
Acutally we are really a little in a hurry, was we need to be sure that at least SOME modem works.
We are planning to order between 2k to 4k boards and modems and that takes some time. Additionally our management is not so sure anymore that your stack is that compatible with the modems on the market. I mean what are going to do if the one modem we (MIGHT) find is not produced anymore? This is a relatively hight risk for us.
Therefore we are already considering to switch to another platform unless I get those devices to work.
As I personally WOULD like to stick to your boards, as until recently I just made good experiences, I would really appreciate your support.
–> several weeks will for sure be too late. :frowning:

As I told you before, if it worked with your PC then it should work with EMX. PPP is a standard communication protocol. And our PPP implementation is now used in many commercial projects with various serial modems.
I believe more effort should be made on your side. You should study the modem more and try to get it working with the PC first.

[quote]–> several weeks will for sure be too late.
[/quote]
If you like you can contact GHI directly for consulting service if you like us to expedit testing this modem for you or any other modem. We can also get you a working project if that is needed. :wink:

Just wanted to tell you the good news:
About 20 minutes ago we got our Telit GE865 devboard shipped.
Now what shall I say:
[ol]
I plugged it in (the EMX devboard)
Started the demo app (that you can download from the link in one of the previous responses)
and guess what?
[/ol]

I got an IP! :slight_smile:
So the Telit family seems to work fine with the GHI boards. (As you can see the GM862 was already used for the IP camera project [url]http://www.microframeworkprojects.com/index.php?title=PPP_IP_Camera[/url])

the devboard can be bought from roundsolutions.com
→ [url]http://www.roundsolutions.com/shop/products/en/GSM-Modem/Starter-Kits/GE865/GE865-QUAD-Starter-Kit.html[/url]

One interesting fact is that I could not get the modem to work with my laptop as I tried to do it with all the other ones. Only the Siemens MC35i works for now. → Whether a modem works with your PC or not does not necessarily imply that it will/won’t work with the GHI boards… :wink:

Just wanted to tell you the good news:
About 20 minutes ago we got our Telit GE865 devboard shipped.
Now what shall I say:
[ol]
I plugged it in (the EMX devboard)
Started the demo app (that you can download from the link in one of the previous responses)
and guess what?
[/ol]

I got an IP! :slight_smile:
So the Telit family seems to work fine with the GHI boards. (As you can see the GM862 was already used for the IP camera project [url]microframeworkprojects.com)

the devboard can be bought from roundsolutions.com
→ [url]http://www.roundsolutions.com/shop/products/en/GSM-Modem/Starter-Kits/GE865/GE865-QUAD-Starter-Kit.html[/url]

One interesting fact is that I could not get the modem to work with my laptop as I tried to do it with all the other ones. Only the Siemens MC35i works for now. → Whether a modem works with your PC or not does not necessarily imply that it will/won’t work with the GHI boards… :wink:

However we would appreciate if you could check out the Airlink GL6110 serial edition and tell us if it works for you and if not - what the problem might be! :slight_smile:

Nice,

Can you try the telit with a PC to access the Internet? Does it work unlike the other two modems you tried before?