Can devices with different port settings work normally in modbus network? - modbus

We have several devices connected to Modbus network. We bought a new device that can't be tuned and has fixed settings: baudrate=19200, parity=odd, while others have baudrate=38400, parity=none. Is it possible to use them in one network, i.e. first read from old devices, and then reset serial port to read from the new device?

Yes, as long as the devices ignore data encoded with the wrong baud rate.

Related

Extending Wifi/WLAN Range with one NIC on a Laptop

I plan to extend the range of my Wifi with my Notebook. - My question to this, is it possible to build a wireless repeater with only one NIC? or do I really need at least two NICs, one for being logged in and receiving the packets and the other for extending the WiFi/Signal. - Actually, what I wanna do is, using my laptop as a WiFi-Repeater, but only with the built-in NIC, no second one.
I've searched the net already but found nothing about the functionality of a WiFi-Repeater and if they have two NICs integrated.
Hope you guys can enlight me ;)
EDIT(added schemes):
Possibility A
Possibility B
What can be achieved with an AP capable Chip/Firmware, for instance, the Ath9k.
You can't turn laptop's WiFi into range extender, since I believe it requires a special WiFi chip firmware and a special configuration of antenna(s).
However, you might try to look on the internet if WiFi chip you have supports AP mode in firmware (not all manufacturers provides that), and if yes, you can set up the access point with the same SSID. In this case your WiFi clients will roam from one AP to another. Of course, this kind of setup requires Ethernet cable attached to your laptop.

How do I detect iPhone on network?

I am trying to detect if my iPhone is in the same network as my Raspberry Pi. I would like to execute a script when I am at home and my iPhone's presence is registered in my LAN.
It seems that when the phone is in standby not even the iphone-sync port (6207/tcp) is found. "/usr/bin/nmap -n -sT -p62078 [my phone's local IP]" shows no host. I wonder what else I could scan for. Obviously the phone is online and ready to accept facetime calls (data via 3G is deactivated). Could I accomplish something with avahi which I am using on my Raspberry Pi, or are there other ways.
I've just spent a week beating on this problem so I can refrain from sending SMS home alarms to my wife when she's at work.
Pinging won't work because the iPhone won't respond to ICMP when asleep. Reading the ARP cache won't work because a sleeping iPhone will come and go (check it every 30 seconds for a few minutes).
The only way I have found to 'reliably' determine when my two iPhones are on my local (home) network is to use the PCAP dotnet library to look for any packets originating from either of the phones' MAC addresses. For example, if you run Wireshark with the capture filter
ether src <iphone-mac-address>
you will see a surprising amount of network discovery/announcement traffic from the phone. It still has quiescent states, but so far the longest interval I have seen between captured packets is around 10 minutes. You would have to wait until you have not heard from the phone for some interval (I use 15 minutes) before declaring it not-home.
With this technique you will find a phone quickly when it rejoins the home network, assuming your phone is configured for DHCP. I also use port mirroring on my main Ethernet switch to include traffic from my wireless access points.
I don't have a Raspberry Pi solution for this, because my linux expertise is very limited, but someone else may be able to help you along those lines. I have a Windows Service using the PCAP library and so far it works reliably, with the limitation of waiting 15 minutes before deciding an iPhone has left the network.
* update 2-3-2018 *
I have this detection algorithm down to about 5 minutes, using a combination of ping/arp messages directed to each phone, about once per minute. Seems to work great.
You can find a list of devices on your network by investigating your arp cache.
arp -a
Simply write a bash script to run arp -a at a regular interval, and search for the mac address of your phone.
You could go even further with this and perform different actions depending on what brand of device is connected.
The first 3 hexadecimal digits of a mac address are the vendor id.
Take the following mac address:
00:19:E3:AB:CD:EF
00:19:E3: is one of the registered mac address for apple devices.
By comparing the devices on your network with this list, you could detect when for example a '3com' device, or a 'dell' device attaches to your network.
http://www.coffer.com/mac_find/?string=apple
You can do "arp-scan -l -r10" for that (tested this myself), but the problem is if mobile data enabled the iphone will go and suspend wifi if screen is locked to safe battery. so you need to disable mobile data .. then arp-scan will work.

iPhone chat application

I have try to make chat application with socket programing and I am using Chatty source code and its working perfect on same network. But not work for different network.
Is chatty work for different network iPhone?
I have tried chatty for different network in iPhone but no success.
Any idea about chatty for different network for iPhone?
From looking at the source code for Chatty, it seems that it just uses an IP and port number to connect to a different device, and that's the reason why you can't connect when users are in a different network. Being able to connect or not will depend a lot on the network configuration you both of your devices have.
For example: it works if you're in the same wifi, because there's no firewall between the devices, and the IP is reachable (192.168.x.x, for example). If you take one of the phones to a 3G network, it won't be able to reach the other one in the wifi, but the one in the wifi might still be able to reach the one on the 3G, depending on your career and port number, and if the network stack is on in the phone. So, conclusion is: this will be highly unreliable.
Usually, for this kind of communication, apps rely on a third party, so both of your phones connect first to a webserver, that is always available on the internet, and the web server sends the messages to each of the apps. This also solves the problem of one app going off the network (when you take an elevator, for example).

How many iphone devices we an connect via bluetooth or wifi?

maximum How many iphone devices we an connect via bluetooth or wifi at a time ?........i need to connect 10...is that possible.......??
The Bluetooth standard (802.15.1) only allows 7 devices to be connected to a master at once. If too many are actively communicating, however, the bus can be exceedingly slow.
I'm not sure of the WiFi (802.11b/g) standard, some WAPs say "up to 255" which may be possible, but hilarious to try. Regardless, 10 is well within WiFi's capabilities.

How to list all devices in my wifi range in iphone

I am using the reachability code from apple to find if my iphone is connected to the wifi. Next i would like to list all the devices that are in my wifi range. How should i do this. The other devices do not publish any service. I want to detect all devices in my wifi range and send that device a request for tcp connection.
If a device does not advertise its presence and is not otherwise active, TCP/IP does not give you a way to "detect" it. If you can identify your subnet (which has nothing to do with a "wifi range", whatever that may be), you can try connecting to each possible host in it on all possible ports -- this is generally considered an attack (what legitimate reason could you have for such a port scan?), so, if you're detected trying this attack, be prepared for the consequences.
As #Alex says, even if you could find devices that weren't advertising, what's the point? You can't most likely do any adhoc communications with them. Instead you'd need to find copies of your application running on connected devices, and your app needs to advertise.
Take a look at Gamekit sample projects which will give you bluetooth connectivity, and you could dig into something like Jens Alfke's MyNetwork and Blip libraries for tcp/wifi. http://jens.mooseyard.com/2008/05/blip-come-n-get-it/