Nevermind! I finally dug up Nordic's documentation on the nRF240l+ radio, and found their "ShockBurst" header format on page 25 of their product specification.
Posts made by Apocrathia
-
RE: Wireless Communication Message Format
-
Wireless Communication Message Format
I'm currently working on a reasearch project involving MySensors, and I was curious as to what the message format of the wireless communications are. I can see what the serial communications are, according to the API documentation. However, is this the same format messages which are sent by the radios themselves?
node-id;child-sensor-id;message-type;ack;sub-type;payload
-
RE: What am I missing here?
@Dwalt After looking through my parts bin, I found one other radio that I already had (I guess I bought 1 and then 10 in two separate orders), and it had the white printings on the board. The other main thing I noticed is that the counterfeit boards had black epoxy over the actual chip, probably to hide the fact that it is a fake.
Obviously, everything is made in China, and not everything is going to be genuine. Hell, the radios I linked from Amazon and that just worked from me aren't even genuine. But they work. That's all I care about at this point. I'm going to take a shot at buying another batch of 10 radios from the vendor listed on the store at this moment (axeprice). Hopefully, I don't get ripped off again, but it looks like the seller that I originally bought the radios from back in 2014 (Yeah, I tried out this project once, but was in an apartment and didn't really have a use case for it yet) is no longer an eBay user. That says something in itself.
I would really like to see a better procured source, but I'm just happy that everything is working now.
-
RE: What am I missing here?
Got the new radios in today from the Amazon link posted earlier. EVERYTHING WORKS
I literally plugged everything in, hit the inclusion button, restarted the sensors, and BOOM, I started seeing data on both ends. The sensors are already populated into Domoticz, and working like a champ!
So, overall lesson here: There are entirely too many fake radios out there. I would like to hope that the people in charge of keeping the MySensors store up to date are verifying the eBay vendors they link to, but I have 10 completely bogus radios now that I get to trash.
Thank you guys so much for your help. Time to move on to building some more sensors!
-
RE: What am I missing here?
@sundberg84 I am also going to buy another 10 pack of radios from the eBay seller linked on the MySensors Store, but I am under a time constraint right now and needed something sooner. Hopefully, it is a hardware issue, and hopefully any problems that I have experienced can help someone else. The information about the knockoff radios definitely needs to be put somewhere on the "Connecting the Radio" page of the main project site. That way people are more aware of the presence of these knock-off radios.
I will post an update once I have my new hardware in (should be tomorrow), and then once I have my project submitted, I will also post the documentation to the "My Project" section of the forum. Hopefully, some of the information will be useful and can be contributed to the main project.
-
RE: What am I missing here?
@sundberg84 Okay, so I have uploaded the ClearEepromConfig sketch to all of my sensors, and then re-uploaded the respective sketch, all from the GitHub master repo. I have also double checked my solder joints for continuity issues. Same problem.
At this point, I have ordered a couple of new radios off of Amazon (as linked earlier), and I am going to wait to see what it looks like when they come in. Hopefully, @AWI was correct about the radios being crap. Either way, thanks for your help thus far.
With the node IDs, I still wasn't quite sure on if I have to hard-code node IDs somewhere, or if they were automatically assigned somewhere.
One more thing, with the DHT sketch I mentioned, I think I uploaded the wrong sketch then. I was uploading this sketch for the DallasTemeratureSensor and you were referring to the HumiditySensor sketch. I uploaded the other sketch, just to be sure, same problem. I'm hoping it's just bad radios.
-
RE: What am I missing here?
@sundberg84 No worries. Thank you for clarifying. I will definitely run that sketch here in a little while and update the thread with my results. While I was soldering, I had my big magnified ring light out and was double checking continuity between pins with the multimeter to make sure that they weren't touching. They're so close that it'd be easy to connect two of the pins on accident and screw everything up.
-
RE: What am I missing here?
@sundberg84 Excellent. Is it okay if I run the master branch version instead? It doesn't appear to be any different other than variable names, but I've already got the master branch cloned. I'd rather not make anything confusing by using multiple branches. I'm not in front of the nodes right now, but I will be in a couple of hours.
Another thing that I started doing with the radios that I had, was soldering the 4.7uf caps onto the header pins, rather than shoving them into the crimped connector sleeve. Is this okay to do? I've seen it a couple of times on the forum.
-
RE: What am I missing here?
@sundberg84 So, to clear the EEPROM, you basically run an
EEEPROM.write(pos, val)
as shown in this tutorial from Arduino, right? And then are you referring to any of the example sketches (which are the ones that I've been using) from the master branch of the GitHub repository?As an added note: I have now tried 4 different controllers with this; Vera, OpenHAB, Domoticz, and HomeAssistant. None of them have had any outcome. Even without a controller, the nodes should still "link" and dump some sort of output to serial (since debug is on), right?
-
RE: What am I missing here?
I have not messed with any of the radio settings (such as power). Unfortunately, I do not have any radios from another batch, but it looks like I might have to try buying some new ones. I just tried putting two next to each other with the long range radios, and still nothing. Since none of these actually have print on them, does anyone have a link to some "genuine" Nordic radios? Amazon Prime shipping would be excellent, as I can get them quicker. Almost all of these were bought from eBay already. It looks like these have good reviews on Amazon, and one user even calls out the MySensors project.
Again, sorry for spamming the thread. Since I'm working on this for a grad project, I'm getting more frustrated than I should.
-
RE: What am I missing here?
I swear I'm going to quit spamming this thread once I have a solution, but the more I post, the most some other poor soul having the same issue out there might be able to find an answer to the same issue.
I ran across this amazing gem in the forums: http://forum.mysensors.org/topic/1648/test-your-home-made-controller-with-mockmysensors-w-tutorial/
So, I threw together an entirely new node, and uploaded this sketch to it. Surely, it'll start spamming messages, right?
find parent find parent find parent find parent
Do I need to hard-code none IDs? That was something I noticed in the gateway sketch; 0 seems to be hard-coded as the ID. In the mock sketch, it's hardcoded to 50. So, it's different there, shouldn't cause an issue. Again, I've literally got everything sitting together on my desk, all running off of a powered USB hub, all radios have 4.7uf caps, and I've measured everything with my multimeter at 3.3v. There has got to be something completely stupid that I'm doing here, because the fake sensor sketch should have worked, but nothing is talking.
-
RE: What am I missing here?
I uploaded a DHT test sketch, just to make sure everything was hooked up and reading right, and I got perfectly good readings off of it. Okay, let's try 2 other things: a simple button node, and an inclusion button.
Well, the button node does the exact same thing, so let's try putting the button on the gateway to run inclusion.
0;0;3;0;5;1 0;0;3;0;5;0
Looking at the API, the message type 5 is for inclusion, and 1 meant it started, 0 meant it ended. So, that works. However, if I try to restart the other two nodes during inclusion, it still doesn't see anything.
-
RE: What am I missing here?
What about inclusion? Is there something that I need to do in order to get the node to attach to the gateway? I noticed when I had the gateway hooked to my Vera, there was an inclusion option. I assume you press the inclusion button, restart the sensor, and the gateway will see the new node come online and grab it. It never worked with the Vera, though. Do I need to add an inclusion button to the gateway? I'm getting so frustrated that this isn't working, but I'm sure it's got to be something completely idiotic that I'm doing wrong?
Looking a little bit more into the code for the DHT sketch, I'm seeing the following line in the variable initialization:
int numSensors=0;
And then both the setup and main loop havefor (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
. This seems a bit off. Shouldn't there be 2 sensors? That way sensor 0 and 1 are presented to the gateway? I know that on line 61, before the for loop in the setup function, there's anumSensors = sensors.getDeviceCount();
, but is there a way to see what the values of sensors is? Perhaps my OneWire bus isn't working, but there's really no way to debug that.Unfortunately, I'm not sitting in front of everything right now, but I'm trying to make as much sense of it as I can. Would I be correct in thinking that if the node has no sensors to present to the gateway, the gateway won't see the node? Or would an empty node still be able to find it's parent?
-
RE: What am I missing here?
I replaced the long range radio with a standard one, and I'm still getting the same problem. Re-uploaded the serial gateway switch (stock code from github repo), same problem. Again, they are right next to eachother on my desk.
Here's the
screen /dev/ttyUSB# 115200
output on both nodes.Hit the reset button a few times on each, in different orders, same thing.
Shouldn't the two be doing something with one another at this point? I got all of my hardware from the eBay stores linked by the project. The first nano that I got didn't even have the FTDI chip and I had to go get another one.
-
RE: What am I missing here?
@mfalkvidd I have read both nodes' radio with a multimeter to ensure that I was getting adequate power, and they are both sitting at 3.3v. I have some extra wires in my wiring bundle which may be confusing. Also the ethernet module runs off of 5v. Everything is being powered off of a powered USB hub right now, with a 5v 2A power supply. So, everything should have plenty of power.
@AWI Using the serial gateway was my first attempt at this. I have a bunch of off-brand nanos that had the cheap USB chip (CH340 and didn't do FTDI serial). The gateway nano is an FTDI capable unit now, though. As, initially, I was running it with a Vera and couldn't get the thing to show up. However, even then, while using both the normal and long range radios, I couldn't get anything to communicate. For the project I'm working on now, I'd prefer to get everything working with openHAB, but I can't get serial or MQTT to work.
-
RE: What am I missing here?
I haven't been able to ANY of the nodes to talk to each other. For the sensor nodes, I've been able to write test sketches just to dump variables to the serial output in order to make sure that the sensors are being read correctly (they are), but there is zero output from the MySensors nodes other than 'find parent'.
Rather than spam this post with a thousand lines of code, here is a GitHub Gist containing all of the relevant files, including the excerpt from my openhab.cfg.
So, here is the DHT sensor.
And here is the MQTT gateway.
See anything out of the ordinary? The MySensors code came directly from the master branch of the Arduino GitHub repository, and I loaded the nodes using the Arduino IDE version 1.6.8. I tried the Codebender stuff, and it wouldn't compile anything correctly for me. I'm really hoping that someone notices something painstakingly stupid here and calls me out on it. Because I feel like this should be a lot easier to setup than it has been.
-
What am I missing here?
I've got two nodes sitting on my desk right now. An MQTT gateway, and a DHT sensor node. Both of them are hooked into my computer, and both of them are in debug mode so that I can troubleshoot them. They're not talking, but they're not giving me any useful output, either. Hell, I can't even get an ICMP response from the MQTT node...
The DHT node simple displays this, I hit the reset button, same thing.
find parent
And my MQTT gateway just displays this.
0;0;3;0;9;gateway started, id=0, parent=0, distance=0 Ok!
I've run through the troubleshooting flowchart, put 4.7uf caps on both of them, measured voltage with a multimeter, they're literally sitting right next to eachother on my desk, but neither one of them will talk to eachother, or anything. I've set the IP in the MQTT sketch, and practically changed nothing in the DHT sketch. #define debug is set in MyConfig.h to provide verbose output, yet I see absolutely nothing here. It's getting frustrating, because this is the 3rd gateway I've build (first 2 were serial), and the 5th sensor (tried making an LM35 sensor, then a tilt sensor, then a light sensor, and this is the 2nd DHT sensor) that I've built, thinking maybe I had faulty hardware.
My end goal here is to get them talking with openHAB. I'm also a newbie there, but I've got it up and running and configured pretty much as described in this post. I'm doing this mainly as a grad school project for a wireless sensor network class, which I'm hoping to have a good bit of documentation from to donate to the project, but also as a proof of concept for deployment in my own home.