arp -a command doesn't consider my smartphone - arp

I'm a bit of a newbie, so bare with me, please.
So long story short, I've been thinking about being hacked a lot lately, probably due to a (very well made) documentary I watched recently - this might be paranoid, but it is what it is.
I was browsing 9gag today when me opening a new tab redirected me to a reCAPTCHA page to prove I'm not human and it said one of the possible reasons was that my IP was changed. And so my quest for truth began. I ran a batch of the sites I've visited through the McAfee WebAdvisor and it claimed they're all safe. I've been running F-Secure on my computer and it hasn't found any issues so far.
So I did a bit of reading and tried to find how many devices are using my Wi-Fi - I read that the arp -a command gives you the IP's of devices using your Internet and that switching them 1 by 1 will result in the number of IP's decreasing by 1. And this is the problem - the amount of devices was the same regardless of whether my phone's Wi-Fi was turned on or off. Is that good, bad or doesn't even matter? Also, how can I efficiently find if there's an external connection to the network at home/my computer/my phone without using ARP
I'm trying to educate myself a bit more on the topic to avoid such panic thoughts so any tips and any help will be much appreciated. Also, apologies for the long post, but I thought that the whole story would show a more clear picture.

Related

Upload in a restricted country is too slow

I'm a C programmer and may write programs in Linux area to connect machines over internet. After I examined that speedtest.net can't upload or has a very poor upload speed, I decided to examine a simple TCP socket connection and see whether it's really slow, and found that yes, it's really slow. I've rented a VPS outside of my country. I don't know what's happening by the government in infrastructure and how packets are routed and how they're restricted. Examining what I saw in speedtest.net, again in a simple socket connection proves me that I can't have a chance. When the traffic in shaped so, there's no way. It proves that it's not a restriction on HTTPS or any application layer protocol, when just a simple TCP socket connection also can't succeed to gain reasonable speed. The speed is below 10 kilobytes per second! Damn!
In contrast, after I got disappointed, I examined some barrier breakers like CyberGhost extension for Chrome. I wondered when I saw that it may overcome the barrier by increasing the upload speed to about 200 kilobytes per second! How?! They can't use any method closer to hardware than sockets.
Now I come here to consult with you and see what ideas you may have about it, so that I may write a program or change the written program based on it.
Thank you

How to create a BACnet client in C

I am trying to create a client in C that will talk with a BACnet server. This BACnet server is stored on an industrial device (CAN2GO) and I am not sure how I could talk with this device.
I spent quite some time reading documentation for BACnet and I never found a clear example for a BACnet client. I already did some server and clients using TCP and UDP but I don't know how to start this BACnet client and I must say I am getting quite desperate.
I found a library which seems to correspond to what I want which is called BACnet protocol stack but when I tried the whois exemple no device was found (I expected to found the bacnet server but maybe I shouldn't ?).
So my question is : could you give me an exemple in C, or another language but C would be better, that would communicate with a BACnet server (nothing complicated just a question and analysing response). This example could be using the library I just wrote about or if you prefer another library I am of course open to everything.
Thank you very much for your time and answers.
I have used that stack and it is the best open source one you are going to find. If you cannot see anything using the demo\whois\bacwi example from that library, then there is something wrong with your setup. In particular, are you using IP? Are your BACnet client and BACnet server on different machines (they cannot be on the same without some serious tweaking)? Are the two machines on the same IP subnet? (They must be, once again, unless you do some serious tweaking (in this case, setting up BBMDs (BACnet Broadcast Management Devices))).
You will also want to try the "Read Property" example (demo\readprop\bacrp.exe) to actually read a value from the server.
If you are still stuck, then post your detailed problem at the link on Sourceforge, Steve, the author, is very responsive to questions.
I am currently using the stack - just started. I had a little trouble at first, not sure if my problem is the same but.. I basically am using some BAC components made from Schneider Electric (UNC-500) and an old un-supported platform (Niagara R2). On my laptop I created a host server and addressed it to a private LAN network between it and the UNC. My laptop was also using wifi, which was utilizing DHCP, so I had two separate interfaces going. This was my problem. I couldn't read or get 'I-AM' responses back from the UNC. As soon as I turned the WIFI off, I got the 'I-AM' broadcasts. Make sure that you are on the same network as your device, and that there are not other interfaces active. Maybe there is a way to assign the interface to use, IDK. I just started using it.

How would one go about to measure differences in clock time on two different devices?

I'm currently in an early phase of developing a mobile app that depends heavily on timestamps.
A master device is connected to several client devices over wifi, and issues various commands to these. When the client devices receive commands, they need to mark the (relative) timestamp when the command is executed.
While all this is simple enough, I haven't come up with a solution for how to deal with clock differences. For example, the master device might have its clock at 12:01:01, while client A is on 12:01:02 and client B on 12:01:03. Mostly, I can expect these devices to be set to similar times, as they sync over NTP. However, the nature of my application requires ms precision, so therefore I would like to safeguard against discrepancies.
A short delay between issuing a command and executing the command is fine, however an incorrect timestamp of when that command was executed is not.
So far, I'm thinking of something along the line of having the master device ping each client device to determine transaction time, and then request the client to send their "local" time. Based on this, I can calculate what the time difference is between master and client. Once the time difference is know, the client can adapt its timestamps accordingly.
I am not very familiar with networking though, and I suspect that pinging a device is not a very reliable method of establishing transaction time, since a lot factors apply, and latency may change.
I assume that there are many real-world settings where such timing issues are important, and thus there should be solutions already. Does anyone know of any? Is it enough to simply divide response time by two?
Thanks!
One heads over to RFC 5905 for NTPv4 and learns from the folks who really have put their noodle to this problem and how to figure it out.
Or you simply make sure NTP is working properly on your servers so that you don't have this problem in the first place.

Establish direct peer-to-peer Wi-Fi communication between laptops

TL;DR available at the bottom
I've been trying to figure out a way to get two laptops (both running Ubuntu) to be able to pass basic messages back and forth without the need for them to be connected via a wireless network,either by an AP or ad-hoc. I want to reiterate here that ad-hoc networking is not what I'm looking for, I've seen many similar questions here with that as the answer.
I guess what I'm asking is: how do I achieve this? All I really need is for one computer to be able to send a packet, and then for another to pick it up via a packet sniffer of some kind.
Currently: I have both laptops in monitor mode (via a mon0 interface created from aircrack-ng's airmon-ng)so that they can sniff nearby traffic (with Wireshark, tcpdump,tcpcump.org's sample libpcap code, and opening a raw socket and just printing out all the packets. I tried each just because I thought one could be doing something differently/leaving something out). I also have a very basic program that consists of opening a raw socket to send crafted ethernet frames out to the air, but I can't get my two machines to see the other's packets. The sniffer running on each machine can only see the packets going out of that machine (in addition to nearby beacons/control traffic from wifi in the area).
Some things to note that might be important are:
-the packets I'm sending out appear in Wireshark (only on the sending machine) as malformed 802.11 packets (probably because I'm just filling them with junk data for now). I was under the impression that my other laptop would also see them as malformed packets, but it gets nothing
-the sockets I'm using are from a call to socket(PF_PACKET,SOCK_RAW,ETH_P_ALL). Raw sockets are something I just recently was aware of, so I could be misunderstanding how they work, but my impression is that I can craft a layer 2 packet by hand and ship out straight out to the wire/air.
If you're curious as to why I want to do something like this, it's part curiosity, part research for a project I'm working on. I want to streamline / automate the process of setting up an ad-hoc network, and what I'm trying to do here is for the laptops to do a small exchange to figure out the specifics of the adhoc network they are about to create and then make/join that network automatically, instead of either one person explicitly setting up the network OR having both people pre-decide the name, etc of the network and have both computers constantly trying to connect to that specific one.
I'm more interested if I'm going about this process in the right way rather than if my code works or not, if someone thinks me posting my (very basic, taken from another post on Stack Overflow) raw socket code will help, I can.
Edit: I am more than happy to post a complete set of code with instructions if I can get this working. I couldn't find much helpful info on this topic on the internet, and I'd love to put it up for future people trying to do the same thing.
TL;DR I want to send out a packet from one laptop and pick it up on another via a packent sniffer of some sort. No wifi network or ad-hoc network involved. Something akin to spoofing an AP's beacon frame (or similar) for the purpose of sending small amounts of data.
Edit 2:After some thought, perhaps what I'm looking for is some kind of raw 802.11 use? Having direct control of the wifi radio? Is such a thing possible?
I found out I was able to send packets out through my monitor mode interface as long as I had correct 802.11 with radiotap headers. I think the problem I was originally experiencing (not being able to sniff the packets) was because they were malformed and thus not actually getting sent out.
I was able to accomplish this by adapting the example code found here, courtesy of someone named Evan Jones, except I did not need to use an Atheros based card or Madwifi drivers, everything worked fine with the mon0 interface created with aircrack-ng.
I am certain that Apple Mac do this. Apple call it 'bonjour'. There may well be a proper IETF spec for it. This is an Article on Bonjour this is Wikipedia on an open component of bonjour which might help get you moving.

Serial bluetooth to Roomba iRobot

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!

Resources