Any chance the project fi data-only sim cards would work?

Project fi just announced that they will let you add up to 9 data-only sim cards to an existing project fi account and share the same $10/GB data with your main plan.

This would be a great way to prototype with the electron board without having to pay anything extra for the data - it says that devices need to be compatible with t-mobile for them to work.

Could you use another sim in the electron? (And can you change apn settings etc)

You can definitely use any other sim card with the electron :wink:

I was just going to come here to ask the same question that @ryebrye asked :smile:

@kennethlimcp so youā€™ll be able to change the APN setting if you use a different sim card? The Fi sims require setting the APN to ā€œh2g2ā€.

I see that thereā€™s a function available but have not tried:

Iā€™m sure Iā€™m not the first, but Iā€™ll reply here just to close the loop for readers of this thread.

I have a Project Fi sim card in my Electron and it works [currently with some connectivity issues, almost certainly due to something other than Project Fi].

The Electron claiming process knows all about 3rd part sim cards, and allows you to create/download a Tinker firmware with the Project Fi credentials.

For those who donā€™t know, the data-only Project Fi sim cards are totally free from Google (even free shipping) for Project Fi phone owners. You can have up to 10 data-only sim cards per phone account. The best part for me is that data is 1 cent per megabyte ($10 per Gig). So all in all,my Electron cell connection becomes basically free. I really like Project Fi!

1 Like

When you say the claiming process knows about non-particle SIMs do you mean that you went through and entered in the numbers on the project fi sim card when you provisioned it, or you skipped that part of the little wizard thing?

On mine I get ā€œInvalid SIM ICCID Numberā€ when I try to use the project Fi sim for claiming it.

I was able to claim it when I put the particle SIM in it.

My Project Fi SIM cards all end with the letter ā€œFā€. If I left that final letter ā€˜Fā€™ off when entering the ICCID, the ICCID was accepted as being OK.

2 Likes

Cool. That worked for me too, thanks.

It gives instructions on what to do next - itā€™s not quite as easy as the normal particle provisioning, but the instructions are pretty straightforward.

Iā€™ll switch over to project fi after I play around with mine a bit more. $0.01 per MB and no monthly cost is pretty hard to beat.

1 Like

Here is a datapoint: I have used my Electron for a week, just with the Tinker firmware installed. My project Fi app shows that I am using an average of about 200K-400K bytes per day. The first 7 days of usage has cost 4 Megabytes, or only 4 cents of Project Fi data. I donā€™t know why the usage is so high, except that my Electron is constantly losing its cloud connection. Perhaps reconnecting to the cloud is an expensive operation. In any case, 1 cent per megabyte means I donā€™t care.

I couldnā€™t get it to claim it on the fi sim, but I did put the other sim back in, claim it, then switch to the fi sim and it worked.

If you use a firmware other than the customized tinker that it gives you, you need to put this in your custom projects to get the apn settings to bake in:

STARTUP(cellular_credentials_set("h2g2", "", "", NULL));```

I have also noticed that it does disconnect from the cloud quite a bit. I'll start another thread about that... it also seems that when it's in the blinking white "reconnecting" phase or whatever it is that interrupts don't happen and "publish" events get dropped on the floor :frowning:
1 Like

I couldnā€™t get the claiming process to work either. I mentioned that to the Particle support people, but the issue seems to have fallen off their radar. My solution was to do it ā€˜manuallyā€™, using the CLI with the device connected via USB cable:

particle device add [xxxxx]

Many thanks for the hint about the STARTUP() call. That would have stopped me dead.

I was really confused at how this all would work - to their credit, they DO say when you download the custom tinker that ā€œany time you flash a custom firmware you will need a setup macro to set the APNā€ in the text after you download the customized one, but itā€™s on a screen of text and didnā€™t really stand out to me.

After fighting through it a few time I read that and thought ā€œAhhh, that makes senseā€ - I was wondering if there was some kind of low level APN area of the firmware that you have to flash to get it to work. But nopeā€¦ just a simple macro command.

Itā€™s interesting that project fiā€™s sim pricing is cheaper than Particleā€™s when you have a bunch of electrons.

Doing the math here Iā€™ve found that you could sign up for an account with Project Fi. Using 100mb on 10 data-only sim cards would set you back $21 or $2.10 per sim.

I recently received 2 Electrons. From limited testing it appears both work fine with the sim cards shipped in the package. Not so with my Project Fi sim cards. The electron seems to take much longer to connect to the network and when it does it frequently loses the connection. The Project Fi sim cards connect to T-Mobile. I have verified that the T-Mobile service here is very strong. Project Fi sim cards work fine transferring data with a gsm iPhone.

When using the Project Fi sim cards, I am calling the cellular_credentials_set() function to set APN to h2g2. The Not sure what is going on here. I have to wonder if something within the low level Electron firmware is hard coded to work with the Particle sim cards. I am certainly not suggesting that this code is maliciously preventing other cards from working. I am just suggesting the code may not be setup to deal with other sim cards.

It would be nice to find a fix for this. I do appreciate the fact that sim cards are included with the electron but the data rate is a bit steep for my purposes and the 5MB limit is problematic as well.

I think what a lot of folks are seeing with 3rd party sim cards is that Particle has arranged a 23 minute timeout on the UDP over cellular data connection for cloud services, but on other carriers and MVNOs that number could be as short as 5 minutes.

Is it still as problematic if you write your code to do a short Particle.publish() every few minutes to keep the cloud connection open?

2 Likes

Interesting Idea. Seems like doing a periodic short Particle.publish() would solve this issue if this is indeed a timeout due to inactivity. This may not be as simple as a timeout problem. I lose the connection with the Project Fi sim even when I am in the middle of running multiple back to back requests for analog data via Tinker. That is my ā€˜does this sim card workā€™ test procedure. Basically I just continuously press the buttons on one or more of the 8 ADC ports that retuned with the last analog reading. I also throw in a occasional push of the A7 button to do a digital write and toggle the onboard LED. A lot of activity going on here yet it eventually fails and I can no longer communicate with the Electron unless I power it down/up.

I have the exact same problem. Tinker just craps out while I am in the middle of making tinker requests. I even drove into town and parked beside a T-mobile a cell tower (an indicated 5 bars of signal strength) and had the exact same experience where Tinker just quits responding while I am making constant Tinker update requests.

This code has been working solid with my Fi data-only sim for a couple days straight with no timeouts:

#include "cellular_hal.h"
STARTUP(cellular_credentials_set("h2g2", "", "", NULL));

void setup() {
  Particle.keepAlive(240);
  ...
}

If you donā€™t have an active Particle-provided sim youā€™ll need to flash this over USB the first time. Afterwards as long as you remember to include the STARTUP macro to set the APN to ā€œh2g2ā€ you can continue to flash new code OTA.

The Particle.keepAlive command was first added in firmware v0.5.0 to allow user-configured UDP ping frequency. Because Fi/T-Mobile times out the connection after about 5 minutes, here we ping every 4. Note this might not be required if you Publish at least that often alreadyā€“but Fi data is so cheap, you might as well!

The issue with trying to use Tinker to keep the connection alive is that all those requests are FROM the cloud to the Electron. The way the cell provider handles UDP connection firewall, no matter how many Cloud updates you throw at the Electron, if it doesnā€™t ā€œspeakā€ on its own often enough the pinhole is closed and the Cloud updates cease. The keepAlive command is a handy set-and-forget way to keep Electronā€™s ears open on otherwise ā€œmuteā€ applications. If you fork Tinker and add Particle.keepAlive(240) you should have no problems on Fi.

1 Like

Thank you rymo.

This is working perfectly for me in Canada. I just swapped SIMs and added your code to the top of my existing code and it worked all day. It looks like it is connecting to a different network/cell tower because the transmitted signal is stronger and there seem to be more handshakes going on, but webhooks were working with no changes.

Nice option, even with a lot more overhead, $10/Gb is a nice price for those of us with Project Fi on our regular phones. Good to know it works outside US as well.

Peter