Functioning with wifi and internet drops

  1. We have plans to make it possible in June. I’ll have it on my list when we have discussion with the team

  2. This is pretty much a built in feature and the core will do it automatically

  3. Same as point 2.

  4. Sounds good and I would love to have this for my own firmware as well. The current setup is for general use cases and since our code is open source, feel free to modify it!

Some users might want, some users might not. It’s hard to strike a balance but if it’s really critical, we shall bake it into the default :slight_smile:

Thanks for your reply @kennethlimcp. I hope with the possibility of #1 in June it gets implemented since it seems like how most users expect the core to function. I don’t see much harm implementing #4 since if you don’t need that type of functionality you could just leave the function blank. I will have to pull down the code and see if I can figure out how to implement such functionality. How does the process work to get functionality baked in to the default? Is there some sort of voting?

Thanks!

Pull request and reviewed by the Skynet department.

Opps i mean :spark: HQ :smiley:

1 Like

My wifi has dropped out at night for 2 days in a row. Green light flashing. Signal strength is reasonable strong. Im about 7 meters away from a 3 antenna router. It will not recover unless I reset the spark. As a test, i turn router wifi off and on, and it recovers fine. Any tips? How can I tell the signal strength?
Is the external trigger going to help signal strength. (I have internal)
Can i ping the spark?

Yes you can ping the core via it’s IP address like a normal device.

Did you do a CC3000 patch before and reflashed firnware recently?

I know nothing about cc3000, and have just a simple bit of code on the core. It gets flashed each day.
How do I tell the ip / mac. I dont see it in my router, though I have a lot of IP’s

Find the device with mac address:

0x08 0x00 0x28 0x01 0xA8 0x1F

You can use this code to get the IP address:

http://docs.spark.io/firmware/#connection-management-network

I dont have that mac. Closest mac to that doesnt ping, thought the spark works.
So I will try serial console.
Ive never run console on spark before. I held down switch to get usb to work, installed drivers ok.
open com port and there is no traffic, and the spark code doesnt run.
Lot of things to know for new person to spark. Love it though.

Just match the 1st two hex. Every core has unique Mac Address but different hex behind.

You can consider a CC3000 patch :slight_smile:

can you give the url to this patch. I see lots of chats about it, but not specific instructions. Are there any negatives to the patch?

Not at all!

You will require dfu-util though.

github.com/spark/cc3000-patch-programmer/blob/nobuttons/build/cc3000-patch-programmer.bin

can you give the url for the patch?

Opps sorry! Was already in the post but https caused it to work

Is it this link? https://community.spark.io/t/can-i-turn-the-cc3000-off/3233
there are 135 replies. In a nut shell how do I turn cc3000 off?

1 Like

github.com/spark/cc3000-patch-programmer/blob/nobuttons/build/cc3000-patch-programmer.bin

As for turning off the CC3000, I’ll let others pick up this question

@kiwibird1, you can put the CC3000 in standby using Spark.sleep(seconds) and it will wake after the specified time. You cannot actually turn the CC3000 off unless you put the Core into deep sleep. You can boot with WiFi disabled by including:

#include "spark_disable_wlan.h"
#include "spark_disable_cloud.h"

at the top of your code and then use WiFi.on()/WiFi.off() to control the wifi with your code. You can test for wifi connectivity using WiFi.status() which will return an WIFI_ON/WIFI_CONNECTING/WIFI_ON status that you can test and act on.

You could use a combination of these:

  • setup your code to start with wifi disabled
  • at the top of loop() and based on a timer (see below) do a WiFi.on() and timeout if it does not connect
  • if you timeout, do a WiFi.off() to put the CC3000 in standby
  • (re)start a timer to wait x seconds or minutes before trying the WiFi.on() again

:smile:

2 Likes

I will try the above. Looks like a great work around. Should I also do the patch to cc3000? If so how is this done?

Also,i cant get usb coms to work. I had blue light flashing, and com port comes up in device manager. My code stops running. If I reset the spark, the code runs but come port is gone.

You need to install Dfu-util and use the .bin file to flash

Alternatively, you can use the Spark-cli to flash the .bin patch file as well :slight_smile:

@kiwibird1 if you are going to upgrade the cc3000 firmware the instructions are found here: https://github.com/spark/cc3000-patch-programmer Please note I have lost my mac address on both cores that I updated. You should take a note of what your mac address is on your router or pull it off your core. If you do lose your mac address you can restore/set it following this post: https://community.spark.io/t/1-spark-core-ok-2-spark-cores-constant-reset-solved/4472 It really is not a big deal if you lose your mac address and you can’t retrieve it since it is really layer 2 and not exposed on the internet if you are behind a router being NATed. Layer 3 the router’s mac is what is exposed…

The com ports working and not working seems to happen to me as well from time to time. I have found sometimes I just unplug the usb going to the core wait a little and connect and the com port is back. On windows you can verify when the port if available via device manager under com ports.

Best of luck!

2 Likes

Im very familiar with arduino, but not spark. Can you explain the basics of how the com port works?
Mine com ports only go when blue light flashing (and the spark code doesnt work), and then com ports stop when its cyan throbbing.