I am trying to get a CC2650 module to talk to an XBee S2c RF board. I have updated the XBee with the 802.15.4 driver. On the CC2650 end, I am using Contiki. Even as I was considering implementing the Rime stack, I am suspecting if the idea would even take off because XBee may not understand Rime. After all, the CC2650 is bei9ng flashed with a Contiki-based code, while XBee has its own internal firmware, which may not have been programmed to respond. Can somebody please correct me if I am wrong?
Also, kindly help me with answers to the Q's below:
Does the XBee use the Proprietary 802.15.4 protocol, which the CC2650RF layer is set to by Contiki?
I was looking at Contiki so that I need not have to change my code much if I migrated to another MuC. Contiki'platform layers take care of converting the common Contiki mechanisms to the underlying API. Is this assumption about Contiki being a generic layer correct?
Is there any communication method (runicast,broadcast et al supported by Contiki out of the box), to directly talk to the XBee?
Is there a single place where all protocolsof Contiki have been clearly explained? Iam having a hard timegoing thru the code alone and trying to make out the exact nature of each of these methods. I already went thru the Contiki wiki and a couple of other resources
Please help.
Can somebody kindly also tag this question with CC2650. It appears I am under-qualified to do that.
Thank you in advance,
Rahul
Ok. I should have done this before I posted the question. The answers lay in slightly more experimentation that I did after stumbling across this link:
http://knowledge.digi.com/articles/Knowledge_Base_Article/XBee-802-15-4-Addressing
Answer to Q1: Yes. It appears they both are talking of the same protocol
Answer to Q2: Yet to prove myself right. Opinions on this one are welcome.
Answer to Q3: This is slightly long.
Adam Dunkel's research paper on the Rime protocol presents the RIme as a way to minimize Code. Not as a new way of fiddling with the PHY or MAC layers of the 802.15.4. Therefore, my fears that the Rime protocol changes the way messages are transmitted is misplaced. Now for the actual paper, it can be easily found with some googling. But here is the easier click. So regardless of what part of the stack is used, an XBee would be able to receive it as long as it is configured following the first of the above two links.
Q4: The Adam Dunkels' Rime link is the one I was referring to in my initial question. It possibly takes some very detailed code inspection to interpret the Figure 1 of the RIme paper itself.
Related
I have an obsolete hardware level/pressure transmitter that communicate with mcu using custom protocol (it appear to be similar to modbus RTU), that hardware comes along with an old commissioning software that works perfectly fine under latest windows, that software contain all communication protocol components that I try to extract and use in something like Arduino to pull data out of transmitter, anyone can help out?
Update - Didn't mentioned above that form of communication here is half-duplex serial communication where master hardware/software query slave transmitter.
Now mentioned to program Arduino mcu to pool data out of transmitter.
What best way of getting readable data out of it?
Again many thanks for all your comments and help!
What you need is called a sniffer. Use that as a keyword and you should be able to find plenty of info here at SO and around the web.
To set the record straight it is actually possible to use Wireshark to sniff on Modbus RTU over serial, see my answer here. If your protocol is similar to Modbus I would start with SerialPCAP.
If you prefer more Windows-friendly solutions you can check these out: 1, 2.
Since Modbus is pretty simple I would say reverse engineering a similar protocol should be, maybe not a piece of cake but just manageable, even if you are not very experienced.
These days when almost everyone is a maker or at least a wannabe, you might want to first take a good look around, maybe somebody else already reverse-engineered that protocol and published it somewhere.
The best tool to analyze a protocol is Wireshark. Run it on the communication link between the Windows machine and the radar. First possibility: the protocol is actually something that Wireshark knows (some trials and errors with the "Decode as" menu may be necessary.) Second possibility, less funny: the protocol is indeed completely proprietary and unknown to Wireshark. At least, Wireshark will make it easier to examine the binary data.
I want to get in the middle of packet forwarding (Not routing). For example, the system is a layer 2 bridge between hosts and their gateway. I want to check the layer 7 for string or whatever "foo" and forward/drop/delay the packet based on the result. What I am having trouble with is intercepting the packet.
What I have read so far:
I know I can get the copy of packet from BPF device (Usenix paper by Steven McCanne and Van Jacobson http://www.tcpdump.org/papers/bpf-usenix93.pdf ). that's good for sniffing but not for me.
I can access the PF device and set the filtering rules which is good for forwarding or dropping decisions, but not for inspection. man pf (4)
I can get packets into the ALTQ queues, BUT I do not know how to access the individual packets located in the queue. man altq(9)
I have also looking into the source code for PF(/usr/src/sys/contrib/pf/net ), PFCTL (/usr/src/contrib/pf/pfctl) and ALTQ(/usr/src/sys/contrib/altq/altq).
On FreeBSD 9.1 machine
I am not C expert, but I am good with it.
Maybe I am getting tired today with all the reading and missed something trivial. Please forgive me if so. Plus, this will be a very good find fro those looking into the subject.
P.S. There is a way of controlling the flow of "foo", by detecting "foo" in packet and denying the answer to that from coming back by setting up the filter for answer to that request. This is NOT what I am trying to achieve. I do not want the packet to leave the system if it should not.
EDIT 2 P.S. There is a great way of doing this on Linux. I can achieve everything I mentioned here on Linux with libnetfilter_queue. I will not bother posting solution here because there are many many many tutorials on how to do it on Linux.
In conclusion, I am still looking for answer on how to do this on BSD. As far as I can understand, I need to write a wrapper/library based on pf (because there is no such thing on the net - otherwise I should have found it already), that does the same thing as libnetfilter with it's libnetfilter_queue library. Or I could somehow dig into libnetfilter and port it to FreeBSD, but since it is based on iptables, only thing I can get from digging into libnetfilter library is logic and algorithms not the actual code itself, which by itself could prove to be of no use to me.
FreeBSD 9.1 has an userspace framework for packet access called netmap. It was recently introduced and has an amazing performance scale. It does very simple but powerful thing - just mmaps the NIC buffers to userspace portion of memory and detaches the packet processing from host stack, this was exactly what I needed the rest is on me.
If anyone needs any goods reference for this, please refer to man netmap (4)
Have a look at OpenDPI or nDPI.
Check out the "Divert Sockets" in BSD implementation as well. Unlike Netmap, it is not zero-copy (IMHO) however it can work with ipfw in order to implement the necessary filters in order to filter packages you want to process.
I'm developing a basic program for multicasting frames on a wireless network to determined stations, based on some rules. I use lorcon to handle the injection part, but I also need to look for which stations are present (both APs and clients).
I've googled a lot about how to do this, and I found that iwlib.h and linux/wireless.h can do the trick, but I wasn't able to see any clear example of how to use that libs out there.
Which of them is better for my purpose? Or are the same thing?
If you could link/post some examples of scanning it would be awesome ^^
Best Regards
It looks that this is near impossible, so I decided to grab wireless packets with libpcap (pcap/pcap.h), and build a list based on its headers (src, dst, bssid).
This helped me a bit with the developing: http://www.tcpdump.org/pcap.html
So I may have done something VERY foolish
I've agreed to a project where a Roomba is controlled via bluetooth. I thought everything was fine and dandy, BUT, I'm not allowed a computer for the end system.
Instead, I'm allowed a Xilinx Virtex II Pro board.
My plan is to buy a bluetooth serial adapter, and buy the iRobot accessory to foster the communication. My hope is that it'll be about as hard as sending messages over a serial port (and I won't have to deal with too much low level socket programming, but if I have to I have to).
My question is, has anyone done something similar to this? Can anyone recommend a tutorial, or a website or a specific product?
I'm aiming to buy these:
http://store.irobot.com/product/index.jsp?productId=2649971
http://overlandresource.com/wp-content/gallery/images/bluetooth-serialconverter.png
Can anyone recommend something better? Can anyone tell me what trouble I'm in for? Really, ANY advice would be nice.
To clarify this project has to be in C and VHDL as C.
You can pretty much just plug and play a Bluetooth module that will do Serial Port Profile e.g. it looks and works like a serial port, even down to RS-232 type connections to the module.
For example, I've played with an RN-42 module by RoHS and it works pretty well. I am pretty sure there are others out there as well.
However, you will have to somehow pair the two ends of the Bluetooth connection. Might involve one end knowing the fixed pin number of the other end. That's going to be down to the modules you end up using.
Don't expect high baud rates either.
So I hope my response isn't too late, but a great tutorial that covers EXACTLY what you are looking for is here:
http://www.robotappstore.com/Knowledge-Base/1-Introduction-to-Roomba-Programming/15.html
It goes over the setup, communication, and basic use of the roomba SCI commands. What's great about the roomba is that you can use any sorta of lanugage you wish to actually handle all your complicated computing, and then just send down your motion commands to the roomba.
Controlling the roomba is pretty easy, just the setup is the most difficult part. The other annoying thing is that the roomba's commands are not in plain ASCII chars, but rather sent in byte form. Once you get over that, its a breeze though.
Hope this helps!
I am currently working on a wireless solution for my Arduino and computer. I am trying to connect a transmitter to my computer and a receiver to my Arduino. I have seen a lot of examples with Arduino to Arduino communication but none for computer to Arduino. What would I need to interface the transmitter with my computer, PIC?
Any insight or any links it would be greatly appreciated.
The jeenode is a good low-cost solution. It really depends on your needs, though.
Sparkfun has a Wireless Buyers guide. It's a couple of years old though. There's also this blog post, which seems to be a pretty comprehensive survey of the available options. It certainly listed every option I've ever heard of and several I'd never heard of before.
This Freakduino board looks interesting. It's an Arduino clone with a built in IEEE 802.15.4 radio (the same radio in the Xbee's). It's also priced very nicely. I wish I'd known about it before I ordered my Arduino Uno earlier this week!
You can use XBee from SparkFun.com. I think they sell a kit for $70 or so. I think they also have wifi solutions too.
Or you could easily connect the two using a Bluetooth module.
Sparkfun has a really good selection and tutorials on how to achieve what you want.
Worth a look in my opinion.
http://www.sparkfun.com/categories/115
There is another interesting low power RF protocol called Ant+. You can find more information at http://thisisant.com.