LTE Project: SMS, read and reply!

Of course the Botletics shield that houses the modem was able to receive sms messages the moment I put a sim card in it, but now I can read them on my device! That’s right! Using nothing but the interface and buttons on the device, I can select which message to read, I can view it, and then reply or delete it!

Originally, I was going to have a scrolling screen that you could use the buttons to scroll through and read the text messages. This had several advantages, like being able to see a conversation flow. However, it had some disadvantages too. Namely, I don’t have enough memory left on this thing to hold the messages in the Arduino’s ram.

That said, I needed to just read the message and display it to the screen. I already have a buffer for sending a text message, and a buffer for what phone number to send it to (2 char arrays, the message one is 140, and the phone number is 21). This actually worked out in my favor greatly. With the read screen, you get to choose a message number to read, so I made a small int to hold that number and you can use up and down to change it, or move it by 10 with left and right.

Once you settle on the message to read, you press select, which then reads that message from line into the phone number send char array, and the from message into the send message char array. These are simply displayed on the screen.

With that done, it is actually really easy to delete the message, since you have a message number already, so selecting to delete it, it already knows which one to delete!

Also, replying becomes easy, since the send to phone number is already saved in the send to phone number char array! Also the text message is saved their too, so you can read the message you were sent while you write the new message. I think it is great! The only problem is this: if your wife texts you and says “what should we have for dinner tonight?”, when you hit reply, you have to overwrite that whole message so you can say, “tacos”. So I’m not sure, I may want to blank it out instead, but for now, it’s pretty hand for testing, since I can just hit reply and send the same message back for testing purposes.

Be sure to check out the entire commit for all the good details I missed here!

Linux – keep it simple.

LTE Project: Sent a text message!

Today was a great day for my LTE project! Today I sent a text message using only the buttons on the device itself! It was great to be able to do that from the gui/interface without the need for a serial over USB connection!

So, how does it work? Well, you can check out the entire commit on my GitLab, but I’ll highlight the main parts here. First, I needed a way to type with only 6 buttons, one of them permanently being the “home” button, and one always being the “select/ok” button. So really just 4 buttons. With that in mind, I made a simple interface that I’ve seen before: Up/Down to cycle through the letters/numbers, and Left/Right to move which place you are typing at.

To make that work, I added an array of characters that you can cycle through, like so:

char letterNumbers[91] = {'0','1','2','3','4','5','6','7','8','9',' ','A','B','C','D','E','F','G',
  'H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e',
  'f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','`','~','!',
  '@','#','$','%','^','&','*','(',')','_','+','|','-','=',';',':',',','/','.','<','>','?'};

Notice that not every keyboard character is there. You have the forward slash, but not the back slash, due to an issue with char. I’m sure I can work it in, but I needed to get it working first, then I can edit it more later.

Then, I use a variable called curPos to mark which spot in the message you are, and numLetter to hold which number of the 91 characters you are trying to use. It looks like this:

case 30:{ // Screen 5 – Enter phone number screen.
// Up one character
if (numLetter >= 91){
numLetter = 0;
} else {
numLetter++;
}
break;
}
case 35:{
// Down one character
if (numLetter <= 0){
numLetter = 91;
} else {
numLetter–;
}
break;
}
case 40:{
// Left one position
if (curPos <= 0){
curPos = 0;
} else {
sendText[curPos] = letterNumbers[numLetter];
curPos–;
}
break;
}
case 45:{
// Right one position
if (curPos >= 21){
curPos = 21;
} else {
sendText[curPos] = letterNumbers[numLetter];
curPos++;
}
break;
}

It allows you to wrap around from character 91 back to character 0 in the list. Then when you press left or right, it saves the character you chose, say “A” in the spot where you were! It’s a little cumbersome, but it actually works!

The only thing I wonder is if the left button should be like delete, and leave a blank space instead of writing the current character and going left. I’m not sure which works better. I suppose a smart person can actually write the entire text backwards if they mess up and want to retype it…. maybe not.

It can be a little confusing, because it doesn’t save the letter/number/punctuation you have chosen until you move left or right, which appears like it is there, but it is not saved until you move off of it. You also can’t read what is under the “cursor” because it always displays the current chosen character you want to write. I’ll look at ways to fix that, but for now, it’s pretty functional, just not very pretty.

Linux – keep it simple.

LTE Project: Button it up.

Now that I shoved all the wires in there and soldered in the connections for the buttons, I was able to close the case. It still opens, you just have to unscrew the 4 screws to take it apart.

With that, I’ve also made progress on the button reading and programming. As we saw before, the program uses a “truth table” where based on the math formula of (btn# + screenNumber)*screenNumber = menu option, we can calculate all possible outputs and assign them to operations or values.

So, this is a compilation of four different commits:

  1. Update the truth table and screens.
  2. Adding button reading.
  3. Screen updates.
  4. Some small updates.

You can check out all of the above commits to see the process, but here I’ll cover the main part. This is the button reading function.

int read_LCD_buttons(){               // read the buttons
  adc_key_in = 0;
    //adc_key_in = analogRead(A0);       // read the value from the sensor 
    Serial.print("anolog0:"); Serial.println(adc_key_in);
    if (adc_key_in > 550)   return btnRIGHT;
    //adc_key_in = analogRead(A1);       // read the value from the sensor 
    Serial.print("anolog1:"); Serial.println(adc_key_in);
    if (adc_key_in > 550)   return btnUP;
    adc_key_in = analogRead(A2);       // read the value from the sensor 
    Serial.print("anolog2:"); Serial.println(adc_key_in);
    if (adc_key_in > 550)   return btnDOWN;
    adc_key_in = analogRead(A3);       // read the value from the sensor 
    Serial.print("anolog3:"); Serial.println(adc_key_in);
    if (adc_key_in > 550)   return btnLEFT;
    adc_key_in = analogRead(A4);       // read the value from the sensor 
    Serial.print("anolog4:"); Serial.println(adc_key_in);
    if (adc_key_in > 550)   return btnSELECT;
    adc_key_in = analogRead(A5);       // read the value from the sensor 
    Serial.print("anolog5:"); Serial.println(adc_key_in);
    if (adc_key_in > 550)   return btnBACK; 
    return btnNONE;                // when all others fail, return this.
}

At first, I have it log everything to serial so I can see what is happening. Essentially, I took a wire from 3.3vdc that goes to the button. Then the button goes to the analog input, with a jumper going to a resistor to ground. That way, when you are not pushing the button, then the analog pin is not floating, and reads 0. When you push a button, that input reads around 700. So, I put the threshold at greater than 550. This seems to work fairly well.

The only problem is that I didn’t arrange the buttons the way I thought that I was programming them to work. Rather than swap the button wires physically, I just re-ordered them in my program, saying one was two, etc.

Here is the call inside the loop, asking for which button is pressed:

int waiting = 0;
menuNumber = 0;
while ( waiting < 30 ){
waiting++;
delay(10);
lcd_key = read_LCD_buttons(); // read the buttons
// TESTING ONLY // Serial.print(lcd_key);
switch (lcd_key){

case btnUP:{
menuNumber = (1+screenNumber)*screenNumber;
break;
}
case btnDOWN:{
menuNumber = (2+screenNumber)*screenNumber;
break;
}
case btnLEFT:{
menuNumber = (3+screenNumber)*screenNumber;
break;
}
case btnRIGHT:{
menuNumber = (4+screenNumber)*screenNumber;
break;
}
case btnSELECT:{
menuNumber = 255;
break;
}
case btnBACK:{
menuNumber = 256;
break;
}
}
// TESTING ONLY // Serial.print(menuNumber);
}

The above call checks every 10 milliseconds to see if you pressed a button. After 30 checks, it continues through the process and refreshes the screens, etc. This works out to be about a half second, due to the length of the program. There is a small window of about a tenth of a second, where pushing a button doesn’t do anything, but I’ve found in test runs that it was really rare that pushing a button didn’t respond immediately.

If you don’t do this, it is refreshing the screen about 30 times a second as it rips through the program, and there is only a fraction of a second where pushing the button actually works. There is probably a better way to do this, but this works really well for my program.

Now I just need to make it send and receive text messages!

Linux – keep it simple.

LTE project button code

lteprojecta

Here’s the deal, I have a very small screen, with six available buttons. I need to make sure that if you press the button, it does the right thing for the screen it is currently on. How do I map the six buttons to the specific screen I’m on, with only 32 kb of programming space?

Well, brilliant or butchered, here’s what I did….

First, I decided on the flow of screens. Example, from the main screen (screen number 1), you can go to the texting screen (sn 6) or GPS screen (sn 3) or the “other programs” screen (sn 12). From the GPS screen, you can go to the location screen (sn 2), or the compass screen (sn 4). And from the texting screen, you can go to the read messages screen (sn 9), or the send messages screen (sn 7), the delete all messages screen (sn 8), and so on and so forth. All told, there is around 15 screens currently.

But how to map pushing the same four buttons for each screen number? There are probably better ways to do this, but I came up with a mathematical formula and a switch to handle this for me.

sn Button 1 Button 2 Button 3 Button 4 Button 5 Button 6
1 2 3 4 5
2 6 8 10 12
3 12 15 18 21
4 20 24 28 32
5 30 35 40 45
6 42 48 54 60
7 56 63 70 77
8 72 80 88 96
9 90 99 108 117
10 110 120 130 140
11 132 143 154 165
12 156 168 180 192
13 182 195 208 221
14 210 224 238 252
15 240 255 270 285
16 272 288 304 320
17 306 323 340 357
18 342 360 378 396
19 380 399 418 437

What the above table does, is utilize the following formula: “Screen number plus Button number is multiplied by Screen number.” With this formula, I then used the variable screen number, which I need for what screen text to display anyways, and made a switch that checks the math to see what button I am pushing. What is interesting about this is that you technically could do any operation from any screen, but the screen number will make the math work only for the operations you should do on that screen.

As you can see, screen number 2 and screen number 3 both share the number 12. In my small table, it is the only occurrence of the same number twice. Fortunately, it is okay, because I made screen 2 the location screen, which you get to from screen 3. So pushing that first button on screen 3 takes you mathematically to screen 2, and on screen 2, pressing the last button takes you mathematically to screen 2, which is where location information is displayed. So it is a little sloppy, but works out in the end.

Buttons 5 and 6 don’t work that way, though. They are special buttons that always return the same two numbers. The first one is the “home” button, which from any screen takes you back to the main menu. The second is the “select” button, which will be unique in use and will have to have a special case by case use. It’s actually not used on any screens thus far, so it is held in reservation for now. I was thinking of making it a modem power on/off switch, but we will see.

As always, you can check out the commit on my GitLab.

Linux – keep it simple.

LTE project fitting, part 1.

As you can see in the pictures, I fitted several of the parts to my LTE project. Add a little hot glue, and viola! You have an LTE project under way! I still have to wire in the buttons, the battery, and the back case needs to get put on, but as of now, it is taking shape!

The button configuration will work something like this:

– 4 left side buttons for choosing which line on the screen.

– 2 right side buttons for special purposes.

Essentially, every screen will have up to 4 lines of text, not counting the status bar. This will allow you to select one of the lines by one of the four buttons on the left. Essentially, it will page through menu options to do what you want to do. Then, on the “unique” screens, the buttons will have functions.

My overall plan is that on the text message view screen, you can scroll through your messages with the last button. On the text message write screen, you can scroll through the letters/numbers/punctuation in an up/down sort of fashion, and then “select” it with the special buttons, but we will see. I might play with it a few different ways to see what works best.

Either way, stay tuned, because it is really coming along!

Linux – keep it simple.

First low resolution sample printed case for my LTE project!

Yesterday I printed up a low resolution (meaning less fill) plastic case for my LTE project. It is really low quality and not very structurally sound. I needed a quick print so that I could look at the design, hold it in my hands, and decide what needed changed.

Overall, I like it.

But, there is room for improvements. The Arduino and LTE shield are in a great spot with easy access to the USB/power plugs, which is great. But, the Nokia screen is larger than the hole I made for it to slip through, so I need to adjust that. Also, my screw holes are twice the size that I thought they would be, so I need to shrink those down. Also, the button holes, for the six functional buttons and one switch are a little too small, making them difficult to use.

lteproject1

I’ve been using FreeCad to build the case, and either my knowledge of 3D modeling is so low, or this program is really tough to use, but this is very difficult. I’ve actually taken more time on building the case (not designing, but actually building) than any other part of the project thus far. If you know of easier to use programs, please let me know in the comments.

The case will be rather large, about 7 x 4 x 1.5 inches. Seems a little overkill, but I need to fit the battery, the Arduino, the LTE shield, the Nokia screen, and the buttons all in there. I went with the raised sides to protect the buttons, so they wouldn’t get slammed or pushed when not in use. We’ll see how well that works.

Linux – keep it simple.

AsteroidOS on my LG Urbane

I took a little break from my main project to try out AsteroidOS on my LG Watch Urbane (Bass). I have to admit, I really like it. If you don’t know, AsteroidOS is the free and open source alternative to Google’s Android Wear operating system.

Don’t get me wrong, Google’s Android Wear is a great product. However, I don’t like how you cannot build your own custom ROMs from it, like you can with Android itself. You can also only access your Google Wear watch with Google’s apps installed, which is somewhat lame.

One thing that Android Wear still has a leg up on over AsteroidOS is that AW has many, many more apps. What I came to realize after using AsteroidOS for a week was that I didn’t miss one of them. Actually, the only thing I really use my smart watch for is, well, as a watch that notifies me that I have a text or phone call. Since the notification pops up on the watch face, I can determine if it is important enough to pull my phone out of my pocket or not.

Hopefully that doesn’t give you the impression that AsteroidOS is not a full feature wearable operating system, though, because that would be wrong. By default it comes with a calendar, calculator, timers, stop watch, weather app and more. There are also several other apps that you can get for it, built by a growing open source community. I guess what I’m trying to point out, though, is that I love the simplicity of it.

Screenshot_20190517-060054

AsteroidOS also comes with it’s own controller app, like Android Wear, but it’s open sourced, so you can have a look for yourself to see what’s going on under the hood. Or if you are really talented, you can edit it and modify it for your own needs.

It has a really great way for controlling notifications, but I did notice that you have to wait until you receive a notification from an app or the system to be able to edit the settings of that notification. By default it doesn’t know what apps you have installed, so it doesn’t list them until they actually post a notification. The first notification will show up on your watch, and then you can go into the app and decide the fate of future popups from that app, service, or function.

Just like Android Wear, AsteroidOS has a ton of watch faces made by users, or you can make your own with their SDK. The background of the watch face can also be changed, and there are numerous other options as well. It’s simple, but in a sleek sort of way.

There is one thing I don’t like, though. There is no selectable “always on” setting. You can enable it via usb, through an ssh connection to the watch. However, with this enabled, the watch will never sleep, and battery life suffered horribly, so I don’t recommend it.

However, with the default time delay mode, the watch face stays off until you swipe the screen or push the watch button, and I found battery life to be twice what it was when using Android Wear. So that is a big win for me. Before AsteroidOS, I often barely made it through the day, putting the watch back on the charger at single digit percentages. Now, with AsteroidOS, I find that I’m putting the watch back in the cradle with around 50% battery life left!

Oh, and one more thing: no more wasted data! With Android Wear, my phone was always “searching for WearOS updates”. This search burned several gigs of data per month! Fortunately, AsteroidOS doesn’t waste my data at all, with the exception of periodic weather updates, which seems to happen fairly infrequently when you are not looking at it.

Overall, I’m hooked.

Linux – keep it simple.

LTE project gets a status bar!

In my continuing effort to learn about programming, cellular service, and Arduino, I’ve made a couple of great developments on my LTE project. Essentially, I’m turning these parts into a texting/gps device. I want to say a phone, but since it uses LTE only, it can’t actually make a phone call. So it is a “smart device” rather than a “smart phone”.

Of course, any useful device needs to have a status bar. And that is what I have done so far. The Nokia 5110 display, at the current font, supports 5 lines of text. So, I decided the top line will always be the status bar. Just like your smart phone, this device uses a status bar to tell you the “status” of everything you really, really need to know in one glance.

The first digits displayed are the battery percentage. If you don’t know how much time you have left on the device before it dies, it can be a little hard to use. Here you can see the magic behind the curtain:

// Get the battery percentage:
uint16_t vbat;
if (! fona.getBattPercent(&vbat)) {
Serial.println(F(“Failed to read Batt”));
lcd.print(“**% “);
} else {
Serial.print(F(“VPct = “)); Serial.print(vbat); Serial.println(F(“%”));
lcd.print(vbat); lcd.print(“% “);
}

Next up is the GPS indicator. Note that this doesn’t tell you if you have a lock, but does tell you if the battery draining GPS is turned on or off (GPS for on, — for off). Fortunately, the fona library includes a GPS status checking function, so we just call it, like so:

// Get the GPS status:
int statGPS = fona.GPSstatus(); Serial.print(F(“GPS status = “)); Serial.println(statGPS);
if (statGPS == 1) {lcd.print(“GPS “);} else {lcd.print(“— “);}

After that, we have the network status indicator. I’ll delve into that a bit more. It looks like the traditional multi-bar display, but unlike traditional ones on your smart phone, this actually is just full bars, or not. As you can see, you can get different letters for different status, or just the home made bar indicator glyph for roaming or home connections.

// Get the network status:
uint8_t n = fona.getNetworkStatus();
Serial.print(F(“Network status “));
Serial.print(n);
Serial.print(F(“: “));
if (n == 0) {Serial.println(F(“Not registered”)); lcd.print(“X”);}
if (n == 1) {Serial.println(F(“Registered (home)”)); lcd.write(0);}
if (n == 2) {Serial.println(F(“Not registered (searching)”)); lcd.print(“S”);}
if (n == 3) {Serial.println(F(“Denied”)); lcd.print(“D”);}
if (n == 4) {Serial.println(F(“Unknown”)); lcd.print(“?”);}
if (n == 5) {Serial.println(F(“Registered roaming”)); lcd.write(0);}
lcd.print(” “);

Finally, there is a number that tells you how many text messages you currently have.

// Get the number of SMS messages:
int8_t smsnum = fona.getNumSMS();
if (smsnum < 0) {
Serial.println(F(“Could not read # SMS”));
lcd.print(“-0- “);
} else {
Serial.print(smsnum); Serial.println(F(” SMS’s on SIM card!”));
lcd.print(smsnum);
}

You are welcome to check out the whole commit, but this is the gist of how the status bar works. Currently, the sketch takes up 78% of the Arduino’s memory. I think the direction I am going with this is trying to make a beginning to end, build at home smart device that allows you to at lease navigate by GPS, and send/receive text messages.

If wishes were fishes, and moose’s excuses, I guess we would all have full freezers. With that said, if I am able, I wish I could work in a couple other simple tasks as well, such as a way to play a simple game, perhaps check an email, or maybe a very rudimentary e-link style web browser. But I think that might be a whole lot more than I can realistically accomplish with so little memory on the device. We’ll see though!

Linux – keep it simple.

Arduino LTE Botletics shield and a Nokia 5110 display!

image2

Today was a lot of fun, and I mean a lot! I was able to connect not only the Botletics LTE shield, but also the Nokia 5110 screen to the Arduino, AT THE SAME TIME! I know, for the rest of the Arduino enthusiasts out there, this may seem like child’s play, but it was a big deal for me.

First, I was using the Botletics modified fona library, and with the soldered board pins, it can only connect to the Arduino one way. The problem was that I was also using the PCD8544 library to control the Nokia 5110 display, but some of the pins needed were the same ones for both devices. That certainly wouldn’t do. So, I edited the PCD8544.h file as follows:

PCD8544(uint8_t sclk = 3, // clock (display pin 2)
uint8_t sdin = 4, // data-in (display pin 3)
uint8_t dc = 5, // data select (display pin 4)
uint8_t reset = 12, // reset (display pin 8)
uint8_t sce = 13); // enable (display pin 5)

Changing these pin outs allowed me to control it with the remaining pins on the board. Now I can have both the display and the LTE shield at the same time! Essentially, the old PCD8544 library had used pins 3,4,5,6, and 7, for simplicity. I however couldn’t use 6 and 7, as those were taken by the LTE shield. So, I swapped them in the header file to point to pins 12 and 13, since they were not being used.

The only problem I ran into, though, was space. It takes a lot of space for the fona library to run the LTE shield. Originally, I was going to use the U8 library, but using those two together actually took 109% of the storage space on the Arduino Uno. I tried to trim down the portions of code for the fona side, but couldn’t get everything small enough. Fortunately, the PCD8544 library was much, much smaller, and I found that it even has a simpler interface for text only, which is mostly what I want to use the screen for.

With those two libraries pared up, I added some lines to my LTE demo sketch to allow me to display the battery information on the Nokia 5110 screen. All told the sketch uses 26470 bytes (82%) of the program storage space, the maximum is 32256 bytes. It worked great, looked good, and still leaves room for more programming.

You can check out the full commit, of course, but here is the portion about the screen:

case ‘b’: {
// read the battery voltage and percentage
uint16_t vbat;
if (! fona.getBattVoltage(&vbat)) {
Serial.println(F(“Failed to read Batt”));
} else {
lcd.setCursor(0, 0);
lcd.print(“Battery Status”);
Serial.print(F(“VBat = “)); Serial.print(vbat); Serial.println(F(” mV”));
lcd.setCursor(0, 1); lcd.print(“VBat = “); lcd.print(vbat); lcd.print(” mV”);
}

if (! fona.getBattPercent(&vbat)) {
Serial.println(F(“Failed to read Batt”));
} else {
Serial.print(F(“VPct = “)); Serial.print(vbat); Serial.println(F(“%”));
lcd.setCursor(0, 2); lcd.print(“VPct = “); lcd.print(vbat); lcd.print(“%”);
}

break;
}

Really simple commands to set up the cursor, and then just lcd.print to display information. I really like this simple screen library for text. It doesn’t handle graphics too well, though, which is what the U8 library excelled at.

So I guess now I need to work out some sort of menu system, as well as some sort of buttons if I want to turn this thing into a portable texting/gps/data interface device.

Linux – keep it simple.

Testing other SIM cards with the Arduino LTE shield from Botletics

IMG_20190423_084454

In the continuing process of testing out various aspects of using the Botletics LTE Arduino shield, I’ve decided to do a quick test with a few other SIM cards that I have available. I tested two other options, my Straight Talk SIM card, and a Freedom Pop SIM card. I was particularly interested in the Freedom Pop card, since that would allow me to have a free option for my board.

The first thing I did was add the following lines to my sketch, to handle the APN’s:

//fona.setNetworkSettings(F(“your APN”), F(“your username”), F(“your password”));
//fona.setNetworkSettings(F(“m2m.com.attz”)); // For AT&T IoT SIM card
//fona.setNetworkSettings(F(“telstra.internet”)); // For Telstra (Australia) SIM card – CAT-M1 (Band 28)
fona.setNetworkSettings(F(“hologram”)); // For Hologram SIM card
// WJH fona.setNetworkSettings(F(“fp.com.attz”)); // For Freedom Pop SIM card – Sort of works. Connects, but you need their app to text/call/sms/web/etc.
// WJH fona.setNetworkSettings(F(“tfdata”)); // For Straight Talk SIM card – sort of works. Connects and sends/receives SMS, but no web data.

That way, I just un-comment whichever option I need, and flash that to the board. Note that there are other options that I think you can pass for APN controls, but these three options (APN, user name, password) are the only ones this sketch accepts.

Here was the results of my test. Starting with Freedom Pop:

FONA> C
—> AT+CCID
<— ***************
SIM CCID = ***************
FONA> 1
—> AT+CPSI?
<— +CPSI: LTE CAT-M1,Online,310-410,0×9308,125708560,61,EUTRAN-BAND12,5110,3,3,-16,-98,-65,10
—> AT+COPS?
<— +COPS: 0,0,”AT&T”,7

OK FONA>
n
—> AT+CGREG?
<— +CGREG: 0,1
Network status 1: Registered (home)
FONA> i
—> AT+CSQ
<— +CSQ: 24,99
RSSI = 24: -66 dBm
FONA> R
—> AT+CMGF=1
<— OK
—> AT+CPMS?
<— +CPMS: “SM”,0,10,”SM”,0,10,”SM”,0,10
FONA> s
Send to #***************
Type out one-line message (140 char): test FP
—> AT+CMGF=1
<— OK
—> AT+CMGS=”<MYPHONE#>”
<— >
> test FP
^Z
Sent!
FONA> R
—> AT+CMGF=1
<— OK
—> AT+CPMS?
<— +CPMS: “SM”,0,10,”SM”,0,10,”SM”,0,10
FONA> w
URL to read (e.g. dweet.io/get/latest/dweet/for/sim7500test123):
http://www.google.com
****
—> AT+HTTPTERM
<— OK
—> AT+HTTPINIT
<— OK
—> AT+HTTPPARA=”CID”
<— OK
—> AT+HTTPPARA=”UA”
<— OK
—> AT+HTTPPARA=”URL”
<— OK
—> AT+HTTPACTION=0
<— OK
Status: 601
Len: 0
—> AT+HTTPREAD
<— OK
Failed!
FONA>

And Straight Talk:

FONA> n
—> AT+CGREG?
<— +CGREG: 0,1
Network status 1: Registered (home)
FONA> 1
—> AT+CPSI?
<— +CPSI: LTE CAT-M1,Online,310-410,0×9308,125708560,61,EUTRAN-BAND12,5110,3,3,-18,-98,-64,8
—> AT+COPS?
<— +COPS: 0,0,”HOME”,7

OK FONA>
w
URL to read (e.g. dweet.io/get/latest/dweet/for/sim7500test123):
http://www.google.com
****
—> AT+HTTPTERM
<— ERROR
—> AT+HTTPINIT
<— OK
—> AT+HTTPPARA=”CID”
<— OK
—> AT+HTTPPARA=”UA”
<— OK
—> AT+HTTPPARA=”URL”
<— OK
—> AT+HTTPACTION=0
<— OK
Status: 601
Len: 0
—> AT+HTTPREAD
<— OK
Failed!
FONA> s
Send to #***************
Type out one-line message (140 char): test 2 st
—> AT+CMGF=1
<— OK
—> AT+CMGS=”***************”
<— >
> test 2 st
^Z
Sent!
FONA>
+CMTI: “SM”,1
R
—> AT+CMGF=1
<— OK
—> AT+CPMS?
<— +CPMS: “SM”,2,30,”SM”,2,30,”SM”,2,30

Reading SMS #1
—> AT+CMGF=1
<— OK
—> AT+CSDH=1
<— OK
AT+CMGR=1
+CMGR: “REC UNREAD”,”+***************”,,”19/04/29,10:42:01-32″,145,4,0,0,”+12085978931″,145,13
test 2 st
***** SMS #1 (13) bytes *****
test 2 st
*****

Reading SMS #2
—> AT+CMGF=1
<— OK
—> AT+CSDH=1
<— OK
AT+CMGR=2
OK
Failed!
FONA>

What is more important is what all that garble means. Essentially, it boils down to this:

  • Freedom Pop connects instantly to the AT&T network. However, you can’t read data, and you can’t send or receive text messages.
  • Straight Talk connects instantly to the AT&T network. It does send and receive text messages, but it cannot use data. So, there is no way to support web interface or tunneling.

So, without further breaking it down, and just using the sketches as is, you can connect with both FP and ST, but only ST can send/receive text messages, and no data, so neither option seems to really work out of the box. If you’ve tried other options, be sure to let me know the results.

Linux – keep it simple.