# Electron doesn't seem to respond to Serial input

**URL:** <https://community.particle.io/t/electron-doesnt-seem-to-respond-to-serial-input/51640>\
**Category:** Troubleshooting\
**Tags:** electron\
**Created:** [August 12, 2019, 12:09pm UTC](https://community.particle.io/t/electron-doesnt-seem-to-respond-to-serial-input/51640 "2019-08-12T12:09:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hagandh](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hagandh/32/7900_2.png) [@hagandh](https://community.particle.io/u/hagandh)\
**Post date:** [August 12, 2019, 12:09pm UTC](https://community.particle.io/t/electron-doesnt-seem-to-respond-to-serial-input/51640/1 "2019-08-12T12:09:56Z")

</div>

I’m trying to allow users to set the APN and keepAlive for a 3rd-party SIM card; however, the trip up has been at accepting user input over Serial.

It seems like there is never data available over `Serial` despite clearly entering data. I have set up the serial connection and then try something like:

```auto
while (Serial.available()) {
        Serial.println("looking");

        serialData = Serial.read();
        switch(serialData) {
          Serial.println(serialData);
          case 'A':
          case 'a':
            Serial.println("Enter the APN: ");
            STATE = ENTER_APN_STATE;
            inputBufferOffset = 0;
            break;
          
          case 'K':
          case 'k':
            Serial.println("Enter the keepAlive value in seconds: ");
            STATE = ENTER_KEEP_ALIVE_STATE;
            inputBufferOffset = 0;
            break;
          
          case 'C':
          case 'c':
            Serial.println("Starting the carrier report...");
            STATE = TOWER_REPORT_STATE;
            stateTime = millis();
            break;

          case 'D':
          case 'd':
            Serial.println("Printing out EEPROM vars: ");
            STATE = EEPROM_DATA_STATE;
            stateTime = millis();
            break;
          
          case '\r':
          case '\n':
            STATE = MENU_STATE;
            break;
        }
      }

```

Everything is set up pretty much identical to @rickkas7 clouddebug library. In fact, if I flash the firmware for his library (clouddebug), I experience the same issue - I can’t ever enter in an option for the menu.

I am using os 1.2.1 on an Electron. What are some debugging measures I can take?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [August 12, 2019, 12:17pm UTC](https://community.particle.io/t/electron-doesnt-seem-to-respond-to-serial-input/51640/2 "2019-08-12T12:17:34Z")

</div>

What tool are you using to send the data to the device.  
Are you using a non-AUTOMATIC system mode and/or `SYSTEM_THREAD(ENABLED)`?  
Can you try a really minimal test sketch that only catches the input and mirrors it back as it comes in?

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [August 12, 2019, 12:25pm UTC](https://community.particle.io/t/electron-doesnt-seem-to-respond-to-serial-input/51640/3 "2019-08-12T12:25:09Z")

</div>

What ScruffR said. Make sure you’re not using `particle serial monitor` because that’s really only a monitor - you can’t type commands to the device into it.

---

<div class="post-metadata">

**Author:** ![hagandh](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hagandh/32/7900_2.png) [@hagandh](https://community.particle.io/u/hagandh)\
**Post date:** [August 12, 2019, 12:46pm UTC](https://community.particle.io/t/electron-doesnt-seem-to-respond-to-serial-input/51640/4 "2019-08-12T12:46:11Z")

</div>

Yea, I was just about to delete the question, ha. I’m pretty sure it is what @rickkas7 suggested. I was using particle serial monitor without thinking about it. Should probably sleep before posting questions…

Is there a recommended vscode extension for a serial monitor that supports input? Pretty sure that functionality was lost between the Atom-based IDE and the current vscode-based one?
