-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XBeeNode.SampleReceived Handler not called. Continued #36
Comments
Not a difference in the way we're creating nodes, a difference in the way the hardware is configured. Can you use X-CTU to export your node configuration?
…________________________________
From: PaulNoto <notifications@github.com>
Sent: Sunday, September 10, 2017 3:16:41 PM
To: jefffhaynes/XBee
Cc: Subscribed
Subject: [jefffhaynes/XBee] XBeeNode.SampleReceived Handler not called. Continued (#36)
Hope you don't mind, I wanted to start a fresh Issue, because the other one had gotten to lengthy.
Anyway, my way of initializing the XBeeNode.SampleReceived handler still doesn't work. However, I made a test, adapting your DiscoverNetwork example and it works.
I did find 2 Issues:
#1<#1>) args.Name is missing the first character of the Name for all nodes found.
#2<#2>) DiscoverNetworkAsync does not discover Sleeping Nodes, which is to be expected because they are asleep. That is why I developed a reactive system that adds nodes when they send a sample for the first time.
Now I'm back to my original problem. I remember you said you tried my code on your machine and it worked. I am lost at this point. You just suggested that it might be a difference in the way we are creating nodes, but you ran my code on your system and it was calling the Node_SampleReceived Handler.
Anyway, I have made something that does work, and it is always good to know that everything can work. However, it won't work for what I need, because of the sleeping nodes. Any suggestions would be greatly appreciated.
Thanks, Paul.
________________________________
THIS CODE WORKS to call the Node_SampleReceived Handler
using System;
using System.Windows;
using XBee;
namespace WpfApp2 {
///
/// Interaction logic for MainWindow.xaml
///
public partial class MainWindow : Window {
private XBeeController controller = null;
public MainWindow() {
InitializeComponent();
controller = new XBeeController();
controller.NodeDiscovered += NodeDiscovered;
Await_DiscoverController();
}
//----------------------------------------------------------
private async void Await_DiscoverController() {
try {
await controller.OpenAsync( "COM3", 115200 );
// NOTE: DiscoverNetworkAsync does not discover Sleeping Nodes < < < < < < < < < < < <
await controller.DiscoverNetworkAsync();
}
catch ( Exception e ) {
string s = e.Message;
}
}
//----------------------------------------------------------
private void NodeDiscovered( object sender, NodeDiscoveredEventArgs args ) {
// NOTE: args.Name is missing the first character of the Name for all nodes found < < < < < < < < < < < <
string s = args.Name;
if ( args.Node.Address.LongAddress.Value == 0x0013A20040F4F731 ) {
args.Node.SampleReceived += Node_SampleReceived;
}
}
//---------------------------------------------------------------------------
private int _sampleReceived_Cntr = 0;
private void Node_SampleReceived( object sender, SampleReceivedEventArgs e ) {
_sampleReceived_Cntr++;
}
}
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#36>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AJSKRwJ1F7IY_M54HcDnhhCEICegX06Xks5shDWZgaJpZM4PSa6t>.
|
Sorry, I misunderstood. I assume you mean the profile.xml files. |
Attached are the configuration for my Coordinator and 1 of the Routers.
From: Jeff Haynes [mailto:notifications@github.com]
Sent: Sunday, September 10, 2017 1:00 PM
To: jefffhaynes/XBee
Cc: PaulNoto; Author
Subject: Re: [jefffhaynes/XBee] XBeeNode.SampleReceived Handler not called. Continued (#36)
Not a difference in the way we're creating nodes, a difference in the way the hardware is configured. Can you use X-CTU to export your node configuration?
…________________________________
From: PaulNoto <notifications@github.com>
Sent: Sunday, September 10, 2017 3:16:41 PM
To: jefffhaynes/XBee
Cc: Subscribed
Subject: [jefffhaynes/XBee] XBeeNode.SampleReceived Handler not called. Continued (#36)
Hope you don't mind, I wanted to start a fresh Issue, because the other one had gotten to lengthy.
Anyway, my way of initializing the XBeeNode.SampleReceived handler still doesn't work. However, I made a test, adapting your DiscoverNetwork example and it works.
I did find 2 Issues:
#1<#1>) args.Name is missing the first character of the Name for all nodes found.
#2<#2>) DiscoverNetworkAsync does not discover Sleeping Nodes, which is to be expected because they are asleep. That is why I developed a reactive system that adds nodes when they send a sample for the first time.
Now I'm back to my original problem. I remember you said you tried my code on your machine and it worked. I am lost at this point. You just suggested that it might be a difference in the way we are creating nodes, but you ran my code on your system and it was calling the Node_SampleReceived Handler.
Anyway, I have made something that does work, and it is always good to know that everything can work. However, it won't work for what I need, because of the sleeping nodes. Any suggestions would be greatly appreciated.
Thanks, Paul.
________________________________
THIS CODE WORKS to call the Node_SampleReceived Handler
using System;
using System.Windows;
using XBee;
namespace WpfApp2 {
///
/// Interaction logic for MainWindow.xaml
///
public partial class MainWindow : Window {
private XBeeController controller = null;
public MainWindow() {
InitializeComponent();
controller = new XBeeController();
controller.NodeDiscovered += NodeDiscovered;
Await_DiscoverController();
}
//----------------------------------------------------------
private async void Await_DiscoverController() {
try {
await controller.OpenAsync( "COM3", 115200 );
// NOTE: DiscoverNetworkAsync does not discover Sleeping Nodes < < < < < < < < < < < <
await controller.DiscoverNetworkAsync();
}
catch ( Exception e ) {
string s = e.Message;
}
}
//----------------------------------------------------------
private void NodeDiscovered( object sender, NodeDiscoveredEventArgs args ) {
// NOTE: args.Name is missing the first character of the Name for all nodes found < < < < < < < < < < < <
string s = args.Name;
if ( args.Node.Address.LongAddress.Value == 0x0013A20040F4F731 ) {
args.Node.SampleReceived += Node_SampleReceived;
}
}
//---------------------------------------------------------------------------
private int _sampleReceived_Cntr = 0;
private void Node_SampleReceived( object sender, SampleReceivedEventArgs e ) {
_sampleReceived_Cntr++;
}
}
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#36>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AJSKRwJ1F7IY_M54HcDnhhCEICegX06Xks5shDWZgaJpZM4PSa6t>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#36 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ARrLxKvCjXkMMhykPA-f1a2N7kjbAl4nks5shD_JgaJpZM4PSa6t> . <https://github.com/notifications/beacon/ARrLxCgcvb1ZkkiAnoVJXkRWsDjC4GQHks5shD_JgaJpZM4PSa6t.gif>
|
Just found out I could reply to your email with them attached. |
Did they come through on the email reply? |
Doesn't look like it. Could you pastebin or publicly share a folder on OneDrive or something?
…________________________________
From: PaulNoto <notifications@github.com>
Sent: Sunday, September 10, 2017 4:25:23 PM
To: jefffhaynes/XBee
Cc: Jeff Haynes; Comment
Subject: Re: [jefffhaynes/XBee] XBeeNode.SampleReceived Handler not called. Continued (#36)
Did they come through on the email reply?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#36 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AJSKR5Xg4dhl1wo5F347MNf3xdHW1PR-ks5shEWzgaJpZM4PSa6t>.
|
Hmm... Let me look in to that. |
Haven't used onedrive since it was skydrive, here goes: https://1drv.ms/f/s!ArPDpRHDMgzfehRpy01XdthK3uo That should be a link to the files. Let me know if it works. |
Yup that worked. I'll load it up as soon as I can.
…________________________________
From: PaulNoto <notifications@github.com>
Sent: Sunday, September 10, 2017 4:49:31 PM
To: jefffhaynes/XBee
Cc: Jeff Haynes; Comment
Subject: Re: [jefffhaynes/XBee] XBeeNode.SampleReceived Handler not called. Continued (#36)
Haven't used onedrive since it was skydrive, here goes:
https://1drv.ms/f/s!ArPDpRHDMgzfehRpy01XdthK3uo
That should be a link to the files. Let me know if it works.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#36 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AJSKR4TdHFMiGuENCg65vHaDP-zYP5d-ks5shEtbgaJpZM4PSa6t>.
|
Thanks I appreciate all the help. |
I tried loading both. Coordinator, no problem. For some reason the router config is putting the node into a state where I can't talk to it (locally) and I have to do a forced recovery on it. Have you seen this? I also realized that I only have one S2C module so I may have to order a second one before I can reproduce this. I don't mind but obviously it'll be a few days... |
OOPS! I sent you the Router config off the xbee network, after my software had changed the DIN pin to an output. I just added the unchanged profile to one drive as profile_Router_2.xml. Does the link above still work to be able to get at it. |
No worries. No, the folder just has the coord config now. |
Try this link |
Yup, that works but I am going to need more nodes to reproduce. I ordered them so hopefully it won't take too long. |
Found it! Try 1.5.4 |
Hope you don't mind, I wanted to start a fresh Issue, because the other one had gotten to lengthy.
Anyway, my way of initializing the XBeeNode.SampleReceived handler still doesn't work. However, I made a test, adapting your DiscoverNetwork example and it works.
I did find 2 Issues:
#1) args.Name is missing the first character of the Name for all nodes found.
#2) DiscoverNetworkAsync does not discover Sleeping Nodes, which is to be expected because they are asleep. That is why I developed a reactive system that adds nodes when they send a sample for the first time.
Now I'm back to my original problem. I remember you said you tried my code on your machine and it worked. I am lost at this point. You just suggested that it might be a difference in the way we are creating nodes, but you ran my code on your system and it was calling the Node_SampleReceived Handler.
Anyway, I have made something that does work, and it is always good to know that everything can work. However, it won't work for what I need, because of the sleeping nodes. Any suggestions would be greatly appreciated.
Thanks, Paul.
THIS CODE WORKS to call the Node_SampleReceived Handler
using System;
using System.Windows;
using XBee;
namespace WpfApp2 {
///
/// Interaction logic for MainWindow.xaml
///
public partial class MainWindow : Window {
private XBeeController controller = null;
}
The text was updated successfully, but these errors were encountered: