Function call failed Timed out

I should also add that the board had run out of battery power over night yesterday. When I started working on it again today I suddenly have this problem. Maybe the board running out of power corrupted something?

Also in addition to breathing cyan, the board suddenly flashed cyan rapidly for 10 seconds and then went back to breathing cyan.

That's not actually hanging, that's the page waiting for any updates on your events list.
You can try particle publish testEvent testData

But this is odd, a few minutes ago your device was reported as

{
  ...
  "connected": true,
  ...
  "functions": [
    "led"
  ]
}

Was the device still breathing cyan at that point?

I tried that page again and now it says the board is online. I put the argument on into the box and press go but nothing happens.
***edit: *** I tried again and it says offline … no idea what is happening here.

That does in fact look like your program is blocking the cloud connection for some reason or the other.
Try updating to 0.6.0 and flash the code again, and this time build it via CLI
For that put your code into a text file with the extension .ino and run

particle compile electron <yourTextFile.ino> --saveTo firmware.bin

put your device in DFU Mode (blinking yellow) and run

particle flash --usb firmware.bin

paricle flash --serial frimware.bin will also report succes even when the firmware didn’t stick.

Well I did all those things, which seemed to work fine. Updated the firmware. Flashed the program as you said. Still getting Function call failed Timed out.

https://api.particle.io/v1/devices/450039000e51353433323633/?access_token=PASTE_TOKEN_HERE gives me this:

{
  "id": "450039000e51353433323633",
  "name": "Irrigation-Particle1",
  "last_app": null,
  "last_ip_address": "176.83.208.50:31387",
  "last_heard": "2017-01-19T16:41:14.271Z",
  "product_id": 10,
  "connected": true,
  "platform_id": 10,
  "cellular": true,
  "status": "normal",
  "last_iccid": "8934076500002934545",
  "imei": "352253065046731",
  "current_build_target": "0.6.0",
  "variables": {},
  "functions": [
    "led"
  ]
}

Can you post the code then?
I’d like to try it on my own device.

This code worked fine for me the other day. I’m getting the same result with other code.

// -----------------------------------
// Controlling LEDs over the Internet
// -----------------------------------

/* First, let's create our "shorthand" for the pins
Same as in the Blink an LED example:
led1 is D6, led2 is D7 */

int led1 = D6;
int led2 = D7;

// Last time, we only needed to declare pins in the setup function.
// This time, we are also going to register our Particle function

void setup()
{

   // Here's the pin configuration, same as last time
   pinMode(led1, OUTPUT);
   pinMode(led2, OUTPUT);

   // We are also going to declare a Particle.function so that we can turn the LED on and off from the cloud.
   Particle.function("led",ledToggle);
   // This is saying that when we ask the cloud for the function "led", it will employ the function ledToggle() from this app.

   // For good measure, let's also make sure both LEDs are off when we start:
   digitalWrite(led1, LOW);
   digitalWrite(led2, LOW);

}


/* Last time, we wanted to continously blink the LED on and off
Since we're waiting for input through the cloud this time,
we don't actually need to put anything in the loop */

void loop()
{
   // Nothing to do here
}

// We're going to have a super cool function now that gets called when a matching API request is sent
// This is the ledToggle function we registered to the "led" Particle.function earlier.

int ledToggle(String command) {
    /* Particle.functions always take a string as an argument and return an integer.
    Since we can pass a string, it means that we can give the program commands on how the function should be used.
    In this case, telling the function "on" will turn the LED on and telling it "off" will turn the LED off.
    Then, the function returns a value to us to let us know what happened.
    In this case, it will return 1 for the LEDs turning on, 0 for the LEDs turning off,
    and -1 if we received a totally bogus command that didn't do anything to the LEDs.
    */

    if (command=="on") {
        digitalWrite(led1,HIGH);
        digitalWrite(led2,HIGH);
        return 1;
    }
    else if (command=="off") {
        digitalWrite(led1,LOW);
        digitalWrite(led2,LOW);
        return 0;
    }
    else {
        return -1;
    }
}

Hmm, as expected by you and after looking at the code, that should in deed work - and it does on my Electron too.

So some stabs in the dark.
You are using the Particle SIM?
Can you post the output of particle binary inspect firmware.bin (executed where you’ve got the binary) and particle serial inspect (with Electron in Listening Mode and USB connected)?

This appears (to me) to be related to the other thread ā€œElectron won’t publish eventsā€ – very similar symptoms

Yes

 CRC is ok (76575a3d)
 Compiled for electron
 This is an application module number 1 at version 4
 It depends on a system module number 2 at version 102
Platform: 10 - Electron
Modules
  Bootloader module #0 - version 6, main location, 16384 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 102, main location, 131072 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #3 - version 102
  System module #2 - version 102, main location, 131072 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 102
  System module #3 - version 102, main location, 131072 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  User module #1 - version 4, main location, 131072 bytes max size
    UUID: D358FD0C361416F496DB74E4705B44AEF12C54B6CDFE6BEE90FD945214756DFC
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 102
  empty - factory location, 131072 bytes max size

Also, after my particle has been sitting for a short while https://api.particle.io/v1/devices/450039000e51353433323633/?access_token=PASTE_TOKEN_HERE returns

  "connected": false,

but if press the reset button on my particle it says

  "connected": true,

But seems to disconnect again after five minutes or so. My Particle is new btw. I’ve only been using it about a week or so.

That’s odd. Everything looks fine but doesn’t behave as expected.
Maybe @ctmorrison is right and there is something fishy with some servers.
Maybe @Dave can have a look at some logs about your device.

I’ll just post here and hope the other thread gets attention, too. I have noticed it seems to make much longer for the Electron to get into a normal ā€œbreathing cyanā€ pattern and along the way between rapid flashes of cyan there are brief multiple flashes of read. I’ve not noticed this in the past, but wanted to mention it in case it’s symptomatic of some underlying cause.

This particular Electron is not not able to publish and never shows anything in the logs. It is as identical as possible to the other 4 Electrons that are not experiencing the same issue: same application code, same SIM source (Particle), same hardware (very simple). The only difference since the problem surfaced is that I recompiled this one and updated the OS from 0.5.2(?) to 0.6.0.

It backs to work now after over almost a day

Seems related to Particle webhooks outage, can anybody confirm if they have similar issues and are using webhooks

Hey folks – thanks for raising flags and reporting some inconsistent behavior. We picked up on the issue this morning and it should now be resolved. You can learn more and read the incident report here:

http://status.particle.io/

Unfortunately for me, after having my Particle off all night I came back today to find the same problem.
This is quite frustrating as I am working on a project and now I can’t develop any further.

@Antoniokly – is everything still working for you today?

@superliminal,

  1. Is the electron with you right now?
  2. Can you flash it with tinker firmware and do a particle device online poll and check the functions available?

@kennethlimcp ok I just downloaded tinker app for my phone to try this. The device appears in the list – does that mean it has the Tinker firmware? I can’t find where to download the Tinker firmware. Can flash it over serial from my machine to save data?

When I enter particle device online into command line i get this:

NAME:
particle device online

1.) What system firmware are you on?
2.) Can you also PM me your device id or the output for particle serial identify?

  1. "current_build_target": "0.6.0",
  2. Ok