Furthemore, I changed the mainboard, network, sensors and see what it got me … a human sensitive raptor runnig the latest software and made using VS2013 U4 …
Oh, I had to do a new SSL Feed in MFDeploy (multiple times) the FEZ Config seems to bring no solution in this case …
The spikes in the picture is me walking by and see how the temp is reacting …
wish it did it to the real dots in the days back, now that would have been an adventure …
… so after some time, like minutes, sometimes more time goes by, I get a AMQP Timeout exception, the interlock stays and no new messages are written to Azure anymore, only a complete restart/redeploy of the solution in VS does get it starting again, so am I fludding some possible queue in Azure or how does this go, any body any idea ?
Or is this more off topic and should be reported to … ?
@ Pete Brown - Any body I could address ?
The error is outputted before the caught exception is outputted …
Frist this:
[quote]01/11/2015 15:03:34
Temperature=23.949999999999999
Humidity=32.759999999999998
Light=320.62561094819154
#### Exception Amqp.TimeoutException - 0x00000000 (1) ####
#### Message: The operation {0} did not complete within the allocated time {1} for object {2}.
#### Amqp.SenderLink::Send [IP: 002d] ####
#### ConnectTheDotsGadgeteer.Program::SendAMQPMessage [IP: 00b4] ####
#### ConnectTheDotsGadgeteer.Program::tempHumidity_MeasurementComplete [IP: 00d7] ####
#### Gadgeteer.Modules.GHIElectronics.TempHumidity::OnMeasurementComplete [IP: 0036] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 001d] ####
A first chance exception of type ‘Amqp.TimeoutException’ occurred in Amqp.NetMF.dll[/quote]
Then this error:
[quote] #### Exception System.Net.Sockets.SocketException - CLR_E_FAIL (8) ####
#### Message:
#### Microsoft.SPOT.Net.Security.SslNative::SecureRead [IP: 0000] ####
#### Microsoft.SPOT.Net.Security.SslStream::Read [IP: 0040] ####
#### Amqp.TcpTransport+SslSocket::Amqp.ITransport.Receive [IP: 0007] ####
#### Amqp.TcpTransport::Receive [IP: 000a] ####
#### Amqp.SaslTransport::Receive [IP: 000a] ####
#### Amqp.Framing.Reader::ReadBuffer [IP: 0009] ####
#### Amqp.Framing.Reader::ReadFrameBuffer [IP: 0007] ####
#### Amqp.Connection+Pump::PumpThread [IP: 0039] ####
#### SocketException ErrorCode = -1
#### SocketException ErrorCode = -1
A first chance exception of type ‘System.Net.Sockets.SocketException’ occurred in Microsoft.SPOT.Net.Security.dll
#### SocketException ErrorCode = -1
#### SocketException ErrorCode = -1
The thread ‘’ (0x8) has exited with code 0 (0x0).
Exception caught:The operation {0} did not complete within the allocated time {1} for object {2}.
[/quote]
It all happens in this:
// Send a message to Azure Event Hubs using AMQP protocol
// we are using the sender resource created in the intialization
void SendAMQPMessage(string payload)
{
try
{
// 0 indicates the method is not in use
if (0 == Interlocked.Exchange(ref IsSendingMessage, 1))
{
// Create the AMQP message
var message = new Message();
message.Properties = new Properties()
{
Subject = "wthr",
CreationTime = DateTime.UtcNow,
ContentType = "text/json",
};
message.MessageAnnotations = new MessageAnnotations();
message.MessageAnnotations[new Symbol("x-opt-partition-key")] = DeviceID;
message.ApplicationProperties = new ApplicationProperties();
message.ApplicationProperties["time"] = message.Properties.CreationTime;
message.ApplicationProperties["from"] = DeviceID;
message.ApplicationProperties["dspl"] = DeviceName;
//message.Properties.ContentType = "text/json";
message.Body = new Data() { Binary = Encoding.UTF8.GetBytes(payload) };
sender.Send(message);
// release lock
Interlocked.Exchange(ref IsSendingMessage, 0);
}
}
catch (Exception e)
{
Debug.Print("Exception caught:" + e.Message);
InitAMQPconnection();
}
}
@ uffe - It is just a re-use of the connectingthedots at git, I followed the instructions and adopted the software to my gadgeteer environment. Changed a bit here and there, and it all of sudden it started spitting data … and the gadgeteer code is amongst the simplest … the RS21 compared to the ENC28 seems to have more doubt about this continious traffic feed …
As you can see, the data still comes in and keeps on going. I’ll have to see how stable this is with the wired connection …
After some time I probably will add more devices just to see how it scales … like spider, another raptor and finally an old cobra, there is room for 4 devices. And maybe get a grips on how to add a lightsense as well …
I’ll need to check out the source of that project, to see how Microsoft actually implement the whole things.
Meanwhile, I did something similar using Firebase. It let you easily sync data back and forth in real-time using a document store (Had to prove to a friend that using NetMF, you are not necessarily tied into Azure!). Still a few bug to fix… but…
So I’ll run a Raptor on wifi and a wired Spider and see if I run into any problems over time.
If anyone else builds one of these, start with the Cloud Deploy project and not the Web Site like I did as I think it messed up the Cloud Deploy and caused an error when I ran it.
since when looking @ Duke’s website I got the same undefined error I had the idea it could be something local here I amn at the moment and tried it on my cell … surprise, surprise, mine did still work and checking Duke’s … working as well …