Main Site Documentation

The Great Network Shootout Part Deux


#1

Since everyone had so much fun with the last one, I dug out some very old code (and an old ThingSpeak channel too) to see just what can the Panda II do?

This is based on code that I wrote about two years ago. I did not update to the latest 4.1 libraries, so it is running whatever was current the last time I updated (4.1.9.0).

The code is using an older version of my Internet logging code and it appears to be working correctly and times out on connect when there is no response (if I pull the cable to the router).

It is sending an update after waiting 15 seconds after the prior one. It keeps track of how long it took to send the last update, how much memory is free (before it sends), and how many errors it has had sending, and of course how many loops it is done.

If it lasts for more than a day, I’ll post the code on codeshare.

You can see the graphs here:
https://thingspeak.com/channels/959


#2

I posted the code here: https://www.ghielectronics.com/community/codeshare/entry/882

The Panda II is still going strong with more than 7800 updates with only 2 errors. ThingSpeak, on the other hand, is not doing so well. I modified each of the 4 charts to support 8000 entries, which it was happy to do. But, it seems really can’t handle that many and now I can’t get the page to continue rendering long enough to change it.

I now remember why I started using Smart Energy Groups. It has much better visualizations and handles large data sets very well.


#3

Code is really here:
https://www.ghielectronics.com/community/codeshare/entry/883


#4

Loop count is now almost 22,800. (with only 2 errors, prior to me pulling the network on it for a period)

Finally, I was able to figure out a way to configure the graphs on ThingSpeak so they would render. It turns out having 8000 points in a graph is not something it can handle, especially with 5 of them set to auto update. While I can understand that this might be beyond the design requirements/specifications of the product, it let me do it and then made it nearly impossible to recover from this broken state.

I thought that perhaps turning off the new points (by disconnecting the network cable to the Panda II) would do it, but the graphs still try and update and they can’t complete the update before it’s time for the next one, which makes it really hard to interact with the page.

There is only one place to update the graph parameters and it only works when the graph has painted. The graphs remember the state they were in when you delete them, so adding them back puts them back in the bad state.

I was able to recover the page by being very patient and quick. I had a few seconds between the time it rendered a graph and the page stopped responding. I deleted the charts one at a time, by clicking on the delete icon at just the right time and then reloading the page.

When I had a single chart on the page, I was able to click the edit button and turn off auto update and reduce the point count to under 1000. I repeated this 5 times and now the page appears to be rendering correctly on a few different devices.

The error count went from 2 to 79 during this period. So, it took me about 19min to complete the process.

While there are some nice things about ThingSpeak, charts/graphing is not one of them. It also appears to require a different set of logon credentials for Forum and the service. Since I already have more than I care to remember, I didn’t sign up for the forum. If someone who uses ThingSpeak wants to pass on this feedback, that would be great.


#5

Can you do something like what @ Jay Jay suggested where you force the device to get a new IP address and see if it able to do that independently? So what I did was switch the network cable from one router to another where the IP Addresses were 192.168.5.x to 192.168.3.x.


#6

I’m going from memory here, but the wiz5100 code GHI wrote for USBizi didn’t handle dhcp and leases beyond the initial one. Even if they did, don’t think the info will be too useful because this is all inbuilt IP network stack on the wiz5100 and has no netmf network stack involved, and 4.1 to 4.2 moved IP stack completely…


#7

Brett is correct, the wiz5100 code does not handle DHCP leases correctly. It had errors when I switched the network cable to a different router that gave out leases on a different network. When I put the cable back, it resumed sending correctly.

I’ll try this with a G120 later.


#8

Hi Frogmore

How do you connect your Panda II to the net ?

I would like to undust my old Panda II and I was wondering if I can connect an Ethernet shield (Arduino shield based on Wiz5100 Chinese clone).

I bet a bit of wiring is required as the Arduino shield expect to get SPI on the 3x2 ISP/SPI connector.

But what about software support ?
Is it included into SDK v4.1 or should I look for other libraries ?

Thanks in advance


#9

Any Wiz5100 shield / module can be used on the USBizi based Fez devices, you just need to wire it up appropriately. You do have some ability to move pins, and you probably will need to, but I would have no hesitation in giving it a whirl.

You must use the GHI Wiznet libraries in the 4.1 SDK. You can install the last 4.1 SDK alongside the 4.2 or 4.3 SDKs.


#10

Thanks Brett