Multicast eventing with UPnP - multicast

I am implementing the multicast eventing feature in a Java environment. However I could not find any other implementations to test with. Does anyone know of a stack supporting multicast eventing, in that it can offer a device with a service that sends multicast events?
I have looked at the MS implementation and some open source stuff on git hub and sourcefore, but could not find anything useful. The language is relatively irrelevant, as long as I can get it to work ;)
Thanks in advance.

Maybe this answer is quite outdated, but you can try XBMC
It's a UPNP software stack that you install on your computer and it acts like a real multimedia device (e.g. TV). You can test and send commands to it and also you can listen to the UDP packets that it sends in the network, so that you can write your program for the UPNP protocol.
If I got your question correctly, I think XBMC software can be used as a device with services that can send multicast messages.

Related

Can i intercept traffic of all nearby bluetooth devices with built into the laptop bluetooth dongle?

I know that bluetooth uses hoping, and because of this difficult to intercept traffic.
Сan i put my dong into monitoring mode?
If for example are 30 devices nearby, and i will always listen just one bluetooth channel, and my dongle works in monitor mode, should i get sometimes some data?
Can i use for these purposes Hcidump or tcpdump?
If I understand correctly, if bluetooth device does not have a password, i can directly interact with its services(with hcitool and tmux).?
I read that i can watch the battery level, device name, and other information.
PS: sorry for bad english.
It is possible to monitor traffic between Bluetooth devices but I am quite sure that your default laptop dongle is not capable of doing that.
Before establishing connection between two Bluetooth devices, they send connection request/response packets on primary advertising channels (37th, 38th, 39th channel). You need to capture these packets to learn hopping pattern, connection interval and etc. After receiving packets, you can monitor insecure Bluetooth connections. However it is hard to monitor 30 device simultaneously because you need to make time division between each connection.
Let's answer your questions.
It might be possible but you need to write driver level code.
It might be possible. As I mentioned, it is good approach to capture connection request/response packets before monitoring devices.
I have no idea about these tools.
To manipulate services, you need to know service handle and duplicate GATT client's mac address. I am not sure that, this method will work.

Are RFCOMM packets guarnteed to be whole?

I'm writing an application that interfaces with Bluetooth devices using Headset Profile. These devices primarily communicate via AT commands send over a Serial Port Profile (SPP) connection. SPP is directly on top of RFCOMM.
My concern is whether or not I am guaranteed to receive "whole" packets (AT commands), or if there is a possibility that I will need to be able to handle an AT command split across multiple packets.
Furthermore, if the RFCOMM protocol does not guarantee this, does the protocol stack do any processing to guarantee receiving "whole" AT commands? I am using BlueZ 5.46 on a Linux 4.12 kernel.
If possible, please reference the standard or an external source that details how RFCOMM guarantees this so I can learn a bit more about it.

Tools for bluetooth monitoring

For my project I have an Android phone and an Arduino device that communicate via Bluetooth. I was wondering if anyone knows any software tools I could use to monitor a bluetooth communications between two devices. Something like a packet eavesdropping. Preferably for Linux.
Take a look at ubertooth one. In the linked webpage there are instructions on how to build the dongle, as well as links to shops selling assembled dongles may be bought. Ubertooth one should work well with Kismet, and thus in Linux, by using a BT plugin (disclaimer: I have no personal experience on this).
Sounds like you are after a Bluetooth sniffer.
Bad news: They are almost exclusively Windows OS based and cost mega-$.
http://www.fte.com/products/bluetooth.aspx
If you were using BlueZ for one side of the communication you could use the BlueZ HCIDUMP app and Wireshark.
I don't think anyone has made a Linuz/Bluez Sniffer - could be wrong.

Can't send raw packets to local mac with PF_PACKET?

I've been playing around with an ethernet protocol (not IP) constructed using
socket(PF_PACKET, SOCK_RAW, ether_type)
I have a small problem. I've got a packet constructed that has the source and destination mac set to my local cards mac that I've also bound the socket to with bind.
I can receive packets fine from the network.
I'm able to send packets to the degree where I see them appear in wireshark.
However, my listening app doesn't see those packets. It is able to see packets from other sources on the network however.
I should point out that my mac addresses do appear to be being sent in the correct byte order.
Can you send packets to yourself?
Do network cards not loopback?
Does the linux kernel do something special at the IP level for loopback and because I'm below that, ignore me?
Yes, IP "loopback" packets, as you put it, are treated specially. They're looped back internally, not sent out through the interface. So ethernet-level loopback, in this sense, is a special case that doesn't normally need to be supported. Some old 10Mbit ethernet cards were even half-duplex, so it couldn't have worked on that hardware :).
On the other hand, you can buy/make loopback adaptor cables to test network cards. So it must be possible on (hopefully all) modern hardware. And people have used them under linux with AF_PACKET (evidence, though no more details, here).
I guess the next question would be whether your switch supports this. A dumb hub would have to support it, but there's room for a modern switch to get confused. Or maybe disallowing it in fear of an infinite loop of packets.

Is multicasting inherent to all ethernet systems?

Is multicasting inherent to every ethernet system?
What I am trying to do is send codes via ethernet to many devices (without having to send the same 'message' to each device). I am not familiar with the design of multicast systems, so forgive me if this is a lame question. I do know there are IP ranges reserved for the use of multicasting, but does that mean if i set receiving devices to those IPs, they will all receive the same 'messages'?
The IGMP wikipedia page has a lot of good information. Your question is a bit out of scope for stackoverflow.
Multicast uses IP, but I wouldn't say it's inherent to every ethernet system because all network infrastructure needs to be properly configured to allow IGMP subscription.
You do not set a client to the multicast IP. Your client subscribes to the multicast ip, your router sees this subscription and passes it along to that device. The wikipedia page will point you in the right direction, but as I said earlier, it's a bit outside the scope of Stack overflow.

Resources