Hello! I'm hoping some good soul with more experience in PPP and GSM modems will be able to help me out here. As a disclaimer, I have almost zero experience with GSM modems, so please excuse any obviously stupid things (;
I have Huawei me906e modem with a working SIM card (I've just checked it again in my phone and it does connect to the internet and I can browse www). Some time ago I've checked the modem as a network card for PC and it was working fine in Windows, but I couldn't get it to work in Linux, but generally it works fine (in Windows [; ). Now I'm testing it with lwip in Linux with a simple test application. So I issue some AT commands, switch the modem to data mode and start lwip. I based my code on the "example_app" that can be found in the head of the repository. I did not enable any authorization, as the card does not require user and password. It seems to work somehow up to a certain point where the modem just disconnects and switches back to command mode. Here's the log of what is going on: -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- Wrote: AT Read: OK Wrote: ATI Read: Manufacturer: Huawei Technologies Co., Ltd. Read: Model: ME906E Read: Revision: 12.430.19.08.00 Read: IMEI: ... Read: +GCAP: +CGSM Read: OK Wrote: AT+COPS=1,0,"PLAY",2 Read: OK Wrote: AT+COPS? Read: +COPS: 1,0,"PLAY",2 Read: OK Wrote: AT+CREG=2 Read: OK Wrote: AT+CREG? Read: +CREG: 2,1,"D6","1857B3",2 Read: OK Wrote: AT+CGREG=1 Read: OK Wrote: AT+CGREG? Read: +CGREG: 1,1 Read: OK Wrote: AT+CGATT=1 Read: OK Wrote: AT+CGATT? Read: +CGATT: 1 Read: OK Wrote: AT+CGACT=1,1 Read: OK Wrote: AT+CGACT? Read: +CGACT: 1,1 Read: +CGACT: 2,0 Read: +CGACT: 16,0 Read: OK Wrote: AT+CGDCONT? Read: +CGDCONT: 1,"IP","Internet","0.0.0.0",0,0 Read: +CGDCONT: 2,"IP","internet","0.0.0.0",1,1 Read: +CGDCONT: 16,"IP","www.plusgsm.pl","0.0.0.0",0,0 Read: OK Wrote: ATD*99# Read: CONNECT 43200000 ppp phase changed[1]: phase=0 ppp_connect[1]: holdoff=0 ppp phase changed[1]: phase=3 pppos_connect: unit 1: connecting ppp_start[1] ppp phase changed[1]: phase=6 pppos_send_config[1]: out_accm=FF FF FF FF ppp_send_config[1] pppos_recv_config[1]: in_accm=FF FF FF FF ppp_recv_config[1] ppp: auth protocols: PAP=0 CHAP=0 CHAP_MD5=0 CHAP_MS=0 CHAP_MS2=0 EAP=0 sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x7ecae32e> <pcomp> <accomp>] pppos_write[1]: len=24 ppp_start[1]: finished pppos_input[1]: got 53 bytes rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0x4fe5c633> <pcomp> <accomp>] No auth is possible sent [LCP ConfRej id=0x0 <auth chap MD5>] pppos_write[1]: len=13 pppos_input[1]: got 46 bytes rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x7ecae32e> <pcomp> <accomp>] pppos_input[1]: got 45 bytes rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4fe5c633> <pcomp> <accomp>] sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x4fe5c633> <pcomp> <accomp>] pppos_write[1]: len=24 netif_set_mtu[1]: mtu=1500 pppos_send_config[1]: out_accm=0 0 0 0 ppp_send_config[1] pppos_recv_config[1]: in_accm=0 0 0 0 ppp_recv_config[1] ppp phase changed[1]: phase=7 ppp phase changed[1]: phase=9 ccp_set[1]: is_open=1, is_up=0, receive_method=0, transmit_method=0 sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>] pppos_write[1]: len=32 pppos_input[1]: got 21 bytes rcvd [LCP DiscReq id=0x2 magic=0x4fe5c633] pppos_input[1]: got 14 bytes ^C -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- This last "pppos_input[1]: got 14 bytes" is just the "NO CARRIER" from the modem after it disconnects. This all happens almost instantly - after switching to data mode all the following commands take less than a second. Seeing the first request from the modem (request for CHAP MD5 authorisation), I've also tried to enable "ANY" authorisation mode (or just CHAP) and using "" both for user and password, but the behaviour is mostly similar - the modem starts sending CHAP challenges, lwip doesn't answer anything (I assume this is because the user and password are empty, right?), and after some time the modem disconnects ("pppos_input[1]: got 14 bytes" == "NO CARRIER"). Here's the log: -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- Wrote: AT Read: OK Wrote: ATI Read: Manufacturer: Huawei Technologies Co., Ltd. Read: Model: ME906E Read: Revision: 12.430.19.08.00 Read: IMEI: ... Read: +GCAP: +CGSM Read: OK Wrote: AT+COPS=1,0,"PLAY",2 Read: OK Wrote: AT+COPS? Read: +COPS: 1,0,"PLAY",2 Read: OK Wrote: AT+CREG=2 Read: OK Wrote: AT+CREG? Read: +CREG: 2,1,"D6","1857B3",2 Read: OK Wrote: AT+CGREG=1 Read: OK Wrote: AT+CGREG? Read: +CGREG: 1,1 Read: OK Wrote: AT+CGATT=1 Read: OK Wrote: AT+CGATT? Read: +CGATT: 1 Read: OK Wrote: AT+CGACT=1,1 Read: OK Wrote: AT+CGACT? Read: +CGACT: 1,1 Read: +CGACT: 2,0 Read: +CGACT: 16,0 Read: OK Wrote: AT+CGDCONT? Read: +CGDCONT: 1,"IP","Internet","0.0.0.0",0,0 Read: +CGDCONT: 2,"IP","internet","0.0.0.0",1,1 Read: +CGDCONT: 16,"IP","www.plusgsm.pl","0.0.0.0",0,0 Read: OK Wrote: ATD*99# Read: CONNECT 43200000 ppp phase changed[1]: phase=0 ppp_connect[1]: holdoff=0 ppp phase changed[1]: phase=3 pppos_connect: unit 1: connecting ppp_start[1] ppp phase changed[1]: phase=6 pppos_send_config[1]: out_accm=FF FF FF FF ppp_send_config[1] pppos_recv_config[1]: in_accm=FF FF FF FF ppp_recv_config[1] ppp: auth protocols: PAP=1 CHAP=1 CHAP_MD5=1 CHAP_MS=1 CHAP_MS2=1 EAP=1 sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x8d98cb61> <pcomp> <accomp>] pppos_write[1]: len=24 ppp_start[1]: finished pppos_input[1]: got 53 bytes rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0x4fe7b5a6> <pcomp> <accomp>] sent [LCP ConfAck id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0x4fe7b5a6> <pcomp> <accomp>] pppos_write[1]: len=29 pppos_input[1]: got 45 bytes rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x8d98cb61> <pcomp> <accomp>] netif_set_mtu[1]: mtu=1500 pppos_send_config[1]: out_accm=0 0 0 0 ppp_send_config[1] pppos_recv_config[1]: in_accm=0 0 0 0 ppp_recv_config[1] ppp phase changed[1]: phase=7 pppos_input[1]: got 22 bytes rcvd [LCP DiscReq id=0x1 magic=0x4fe7b5a6] pppos_input[1]: got 42 bytes rcvd [CHAP Challenge id=0x1 <7eea571d3e05e4766c661474fc7750e7>, name = "UMTS_CHAP_SRVR"] pppos_input[1]: got 41 bytes rcvd [CHAP Challenge id=0x2 <08b8f55348400529024cbf177c231710>, name = "UMTS_CHAP_SRVR"] pppos_input[1]: got 41 bytes rcvd [CHAP Challenge id=0x3 <24aa1a5f425298cf88d54019aae082ef>, name = "UMTS_CHAP_SRVR"] pppos_input[1]: got 41 bytes rcvd [CHAP Challenge id=0x4 <be336c79383db9ae2681620386e70c38>, name = "UMTS_CHAP_SRVR"] pppos_input[1]: got 41 bytes rcvd [CHAP Challenge id=0x5 <282b34d778bdfda15e64a21976646bf4>, name = "UMTS_CHAP_SRVR"] pppos_input[1]: got 41 bytes rcvd [CHAP Challenge id=0x6 <56fc90b6bccfa6e8f8b6901ff863dc55>, name = "UMTS_CHAP_SRVR"] pppos_input[1]: got 14 bytes ^C -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- Any ideas what am I doing wrong? There are just too many variables for me to go further, as I'm not sure about anything here. Whether the AT commands that I issue and their arguments are correct, I'm not sure whether I should stick to "NONE" authentication or just keep using "ANY" with empty user/password, maybe my lwipopts.h are wrong, and so on and so on... So any help will be greatly appreciated! Thanks in advance! Regards, FCh _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users