FONA 3G Module not reading or writing to website

Adafruit cellular platform - SMS and IoT over celluar

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
kiratmokha
 
Posts: 18
Joined: Tue Dec 14, 2021 1:20 pm

FONA 3G Module not reading or writing to website

Post by kiratmokha »

I am trying the FONA 3G module with the circuit exactly as shown in the Adafruit documentation and the Adafruit test program with a Ting SIM CARD. When I send 'G' command to start GPRS, it returns with Network Opened, however, when I send 'w' and try to read a website (I tried using the example website provided by Adafruit) the module just returns with error. This happens in every case. I have attached pictures of Serial Monitor and Circuit below.

**The phone and SMS features on the Module work fine, it is just the internet that is not working.
Attachments
MicrosoftTeams-image.png
MicrosoftTeams-image.png (18.31 KiB) Viewed 865 times

User avatar
rskup
 
Posts: 230
Joined: Sat Aug 01, 2020 9:04 pm

Re: FONA 3G Module not reading or writing to website

Post by rskup »

Just tossing this out there...did you set your APN according to what your carrier says using the AT+CGDCONT command?

User avatar
kiratmokha
 
Posts: 18
Joined: Tue Dec 14, 2021 1:20 pm

Re: FONA 3G Module not reading or writing to website

Post by kiratmokha »

Thanks for the suggestion, I just checked on the Ting website and the APN is listed as 'wholesale'. I had not added this to the FONA Test code. I am going to add it in and try again.

User avatar
kiratmokha
 
Posts: 18
Joined: Tue Dec 14, 2021 1:20 pm

Re: FONA 3G Module not reading or writing to website

Post by kiratmokha »

rskup wrote:Just tossing this out there...did you set your APN according to what your carrier says using the AT+CGDCONT command?
Hello rskup, I set the APN from the Ting website in the FONA test code from Adafruit and I am still getting the same errors unfortunately. If you have anymore advise please let me know, thanks!

User avatar
rskup
 
Posts: 230
Joined: Sat Aug 01, 2020 9:04 pm

Re: FONA 3G Module not reading or writing to website

Post by rskup »

Interestingly, I also now cannot download web pages with my FONA 3G. I got out my old notes on how to do it manually entering the AT commands (as opposed to using the FONA Test sketch), but it won't work now. I wonder if it may have something to do with 3G shutting down??

Anyways, I'm gonna try some more things, then dig out a Waveshare 4G board that I have (SimCom 7600 chip) to confirm I'm using the right AT commands, and will update the post.

User avatar
kiratmokha
 
Posts: 18
Joined: Tue Dec 14, 2021 1:20 pm

Re: FONA 3G Module not reading or writing to website

Post by kiratmokha »

Sounds good, thanks! Adafruit has not been replying about this issue at all. I am on a huge time crush with my senior design group on this project where we are supposed to build a GPS tracker which sends coordinates to a database using cellular. So, if you have any other suggestions of GPS/3G/4G modules I'd appreciate that.

User avatar
rskup
 
Posts: 230
Joined: Sat Aug 01, 2020 9:04 pm

Re: FONA 3G Module not reading or writing to website

Post by rskup »

Well, not sure what happened, turned FONA off/on and then things worked better...but not perfect unfortunately.

I seem to be able to connect to wifitest.adafruit.com, and even get back an "OK".

However, I can't seem to get past that point....ug. Will try more stuff later.

Just a couple things...I saw on TING there are two APNs depending on your sim card...maybe double-check you're using the right APN for your sim.

And double-check the FONA 3G took your APN entry by entering the AT command:
AT+CGDCONT?

You should see your APN in the line that's returned.

One more thing to check ... since you're using the FONA Test sketch, I seem to recall there's a line in there near the beginning you have to "un-comment" if you're using the FONA 3G ... did you do that? Otherwise the sketch treats your FONA 3G like it's a FONA 800/808.

Ok, hopefully better news tomorrow.

User avatar
rskup
 
Posts: 230
Joined: Sat Aug 01, 2020 9:04 pm

Re: FONA 3G Module not reading or writing to website

Post by rskup »

Yep, me again, look at this post I just found, could be helpful:

viewtopic.php?f=54&t=175691&p=856048&hilit=http#p856048

User avatar
kiratmokha
 
Posts: 18
Joined: Tue Dec 14, 2021 1:20 pm

Re: FONA 3G Module not reading or writing to website

Post by kiratmokha »

Thanks for that update. I have tried both APN and used the ‘start GPRS’ function from the test sketch and every time I run it, it opens the network successfully, however, when I try to read or write, I am unable to. I just get errors. There’s also a screenshot of this in the post.

I’ll try the AT command you said tomorrow and also see if I can just push AT commands to the module directly instead of going through the test sketch.

If possible, would you be willing to share your schematic and code please?

User avatar
kiratmokha
 
Posts: 18
Joined: Tue Dec 14, 2021 1:20 pm

Re: FONA 3G Module not reading or writing to website

Post by kiratmokha »

rskup wrote:Yep, me again, look at this post I just found, could be helpful:

viewtopic.php?f=54&t=175691&p=856048&hilit=http#p856048
Looks great! Thank you for that. I will try I tomorrow and update the results in this post.

User avatar
rskup
 
Posts: 230
Joined: Sat Aug 01, 2020 9:04 pm

Re: FONA 3G Module not reading or writing to website

Post by rskup »

Well, at least I'm getting html back from Adafruit, it's just that it's the html for a "400 Bad Request" webpage.

Need to do some more research, but here's what I'm typing manually (I'm using X-CTU, I know most folks use PuTTY):

AT+CHTTPSSTART

AT+CHTTPSOPSE="wifitest.adafruit.com",80,1

AT+CHTTPSSEND=38

after the above you'll get a ">", then:

GET /testwifi/index.html HTTP/1.1

now it gets a little tricky sending ctrl stuff: ctrl-M, ctrl-J, ctrl-M, ctrl-J, alt-026

and after a moment I actually get back: CHTTPS: RECV EVENT
yeah!!!

So then enter:

AT+CHTTPSRECV?

and you get back a number, in my case, 327

then you enter:

AT+CHTTPSRECV=327

then the web page html will print out, but as I said, it's for a "400 Bad Request" webpage, sigh.

To exit out of http mode, enter:

AT+CHTTPSSTOP

Anyways, that's as close as I'm getting for now, gotta do some other stuff here, then I'll dig and test, curious now how to do this again.

User avatar
rskup
 
Posts: 230
Joined: Sat Aug 01, 2020 9:04 pm

Re: FONA 3G Module not reading or writing to website

Post by rskup »

OMG, got it working, and got back the "This is a test of Adafruit WiFi! If you can read this, its working :)" string!!

Ok, here the list of AT commands I manually typed in (btw, I switched to using PuTTY this time):

AT+CHTTPSSTART

AT+CHTTPSOPSE="wifitest.adafruit.com",80,1

AT+CHTTPSSEND=69

(now you'll get the ">" cursor)

GET /testwifi/index.html HTTP/1.1

type ctrl-M, ctrl-J

Host: wifitest.adafruit.com:80

type ctrl-M, ctrl-J, ctrl-M, ctrl-J

(after a moment, you should get an OK and a +CHTTPS: RECV EVENT)

AT+CHTTPSRECV?

(I got back 314 here)

AT+CHTTPSRECV=314

After the above you'll get some header info and the confirmation text from Adafruit!

Again, to get out of this http mode, enter:
AT+CHTTPSSTOP

Hope it works for you!

edit - btw, the 69 is the number of characters after the ">", plus the 6 ctrl characters

User avatar
rskup
 
Posts: 230
Joined: Sat Aug 01, 2020 9:04 pm

Re: FONA 3G Module not reading or writing to website

Post by rskup »

me again, took a pic of the PuTTY screen, it doesn't show the ctrl characters of course, but you can see everything else.
Attachments
putty.png
putty.png (31.59 KiB) Viewed 843 times

User avatar
kiratmokha
 
Posts: 18
Joined: Tue Dec 14, 2021 1:20 pm

Re: FONA 3G Module not reading or writing to website

Post by kiratmokha »

Thank you so much for the update! I will give that a shot. Just one more question, what SIM card provider were you using with your FONA 3G?

User avatar
kiratmokha
 
Posts: 18
Joined: Tue Dec 14, 2021 1:20 pm

Re: FONA 3G Module not reading or writing to website

Post by kiratmokha »

rskup wrote:me again, took a pic of the PuTTY screen, it doesn't show the ctrl characters of course, but you can see everything else.
Looks great! Just another question, what SIM card provider are you using with your FONA 3G?

Locked
Please be positive and constructive with your questions and comments.

Return to “FONA”