I'm developing a driver for a virtual HID that I'm working on. I am wondering, what values should I / can I pick as my Vendor ID and Product ID. Obviously I don't want to cause conflicts with existing VIDs and PIDs. What are my options, any tips?
Related
In my database, I'm looking for a primary key to save settings for a Wi-Fi network. Most people point to SSID+BSSID, but the problem with that is networks with multiple access points. After further investigation, the best solution I've found so far is having multiple database entries with SSID+BSSID linked together if they represent the same network.
Now the question becomes, is it possible to retrieve a list of all access points while you are connected to one of them ? Either that or a simpler list of all BSSID associated with the network you are connected to.
Either Swift or Objective-C is perfectly fine.
I couldn't find a way to retrieve all access points of a network in iOS.
For anyone curious, I went with storing SSID+BSSID as primary key and public IP as another field.
If the entry doesn't exist, I add it and check for other entries with the same IP and link them together.
If the entry does exist, I check if the IP hasn't changed since last time, since public IP can be dynamic. If it has, I update all entries with the old IP to the new IP.
It's still not a perfect solution. It doesn't cover the case where you go to a new access point of a network and the public IP for that network has changed, although it does fix itself to some extent if you go back to the first access point. Also, in general, places that have multiple access points also tend to have static IPs, so this case may be very situational.
Is it possible to access my Cisco router details like Name,Model,IP Address,Connection status etc from my iOS mobile.
I'm even ready to write small mobile app in iOS to get all router details.
Since I have just started learning in iOS, don't know if any library already exists for above task.
If my router does not work or gets hang.. I even want to try for restart of router using my mobile.
If example code exist, it will be very useful.
Like Cisco already has andriod and iOS app for same above function but dont want to use this app and want to write my own app with limited features only.
(http://www.addictivetips.com/mobile/cisco-connect-express-manage-router-settings-remotely-android-ios/)
Thanks,
Accessing network gear is best done by using SNMP. Cisco has extremely rich management/monitoring capabilities via SNMP and all of their MIBs are publicly available here.
Almost all Cisco gear supports the SNMPv2-SMI MIB (the 1.3.6.1.2.1 OID) so querying things like sysName, sysLocation, sysContact, sysDescription, sysUpTime should be very easy. This MIB even supports tables for listing all the interfaces and IP addresses and has a whole lot of other things that might be of interest to you.
If you have SNMP write access on the device then you can even make config changes and perform management functions like rebooting or bringing an interface up/down.
There are a few SNMP libraries for ObjectiveC and I think Net-SNMP is the most popular (It's not .net even though the title suggests that).
If you are new to SNMP then I suggest starting simple by querying easy objects like 1.3.6.1.2.1.1.5 (sysName) and 1.3.6.1.2.1.1.6 (sysLocation) before trying to jump into tables like 1.3.6.1.2.1.2.2 (ifTable)
Remember, you don't have to stick with the standard MIBs you can download all of the custom ones that are particular to your device which will give you incredible amounts of flexibility.
You could use a screen-scraping technique to telnet or ssh to the Cisco device and parse the "show version" output. This will give you some of the information you need. For others, like IP addresses, you can use "show ip interface brief", "show cdp neighbors" etc. as you need.
Keep security in mind: make sure that telnet/ssh credentials are adequately protected in your app's settings, and try to restrict your commands to those that do not need privileged access on the Cisco device.
Be aware that Cisco devices have a small pool of available VTYs, and every telnet/ssh access from your app will use up one VTY. So if you have for example 30 guys wanting to use the access the device simultaneously from their apps, some of those instances are not going to get access to the device.
If this is a concern, SNMP is a better and more scalable option as suggested by previous answer. Make sure that you (a) have a read-only community string configured on the device, and (b) use only the ro community string from the app.
Looking at this related SO question, I can't help but wonder about the uniqueness of MAC addresses.
How unique are MAC addresses?
I'm using them to semi-uniquely identify users. I have a website that users of virtually any device (PC, Mac, iPhone, Android phone, etc.) and any OS can hit via an HTTP request. I use a combination of IP address and MAC address to identify unique users.
I assume the following cases can exist:
A device has no MAC address (unlikely, sure, but anyway)
A device has a unique MAC address
A device has multiple unique MAC addresses
Two or more devices have the same MAC address
The first three of these cases are unique (the third because I only need a single unique MAC address). For the fourth case, how likely is this?
That is: given 100 random users (perhaps Windows users for any Windows OS), how many of them can I expect to have the same MAC address? Is it just generally because of the limited length of MAC addresses? Or is it dependent on some sort of purposeful configuration change (MAC address spoofing)?
I'm okay with MAC addresses being semi-unique, I just want some clarity on how to interpret the data.
(I'm using the C# code against .NET 2.0 in the linked question against .NET 2.0.)
This is only true on the same network.
MAC addresses are resolved locally using ARP to route local packets at a hardware level. ARP is not a routable protocol and is not resolved across subnets.
If your webserver is behind a router with port mapping and all the incoming traffic to it is coming from that router, then every connection will appear to come from the MAC address of the router, you won't 'see' the MAC address of the original machine, not unless you can pick it up with a web page somehow (i'm not a web genius so don't ask me on that one, but Im guessing you'd need some heavy lifting at the client end with Java, or some other kind of active component to interrogate the local machine, easier to use a cookie)
You can find out the Public IP address of the remote machine where the outgoing NAT took place, but once again, there could be multiple device connecting from behind a router which would limit the usefulness of this method, and it means need to look into IP packets, which I have no idea how you can do that from a web server (probably can't?).
Anyway, this is what cookies are for, a way of leaving an identifier on a remote machine so you can see where traffic came from. If people don't accept cookies, unless you start getting very very creative you aren't going to be able to uniquely identify them.
(BTW Mac address are always unique (ok, you can occasionally find a reused MAC, but its extremely rare, or at least needs to be for networking to work!), thats the purpose of them, it's just not much help in this scenario if you are not on the same network)
100 random users (perhaps Windows users for any Windows OS), how many
of them can I expect to have the same MAC address?
Zero. And when they are in the same network, they could not communicate with the same MAC-Address, since Ethernet uses them to find the Computer. They are pretty unique. Producers of network cards get ranges of addresses they may assign to their products.
But: There are ways to manipulate your MAC Address, and there are scenarios where people do just that! For example when you want to enter a network, which is restricted to certain MAC-Addresses, you can manipulate your own to match one of those (if you find out, which ones are on the whitelist). Since I don't know, what your szenario is, (what you wnat to accomplish), I can not tell you if that is relevant for yout.
You just need to understand the difference between a MAC Address (that can be changed) and the identifier of your hardware [your Network Interface Controler to be precise] (that is forever assigned by its the manufacturer).
MAC address is the name of your device when it connects to the internet (through a rooter or a switch). You can change your MAC Address, but by default, this ID uses the identifier assigned by the manufacturer of the network interface controller (NIC) (e.g. your Wifi antena)
Exemple: I've changed my MAC address for my two computers using the same MAC Address: 00:01:02:03:04:06. My computers seems to be the same when connected to the same router but the identifier of their wifi antena remain unchanged and different.
I have the following situation. I have some IP phones configured and registered in to a CCM in the lab. I have already enabled the SNMP service in CCM and I'm able to make a SNMP walk using a linux shell (the community and the version are OK). I would like to monitor the amount of IP phones that are registered/unregistered using Zenoss.
The CCM OID for those request are the following:
ccmRegisteredPhones : 1.3.6.1.4.1.9.9.156.1.5.5.0
ccmUnregisteredPhones : 1.3.6.1.4.1.9.9.156.1.5.6.0
I'm able to get the value (number of registered and unregistered phones in the server) using the smnpwalk in the command line.
Everything works 'till now, but I would like to monitor those values using Zenoss and make an alarm wheter the amount of unregistered phones is below a value.
I would like to know the steps I have to follow in Zenoss 3.0 Core to get those request working/monitoring since I can't get anything clear from the Zenos UserGuide.
I would really appreciate any help or guidance.
Best regards
Create a new monitoring template called "CCMPhones" or something like that. Add two SNMP datasources to this monitoring template. The convention would be to name them after the OIDs: ccmRegisteredPhones and ccmUnregisteredPhones. Put the appropriate OIDs from your question as the OIDs for these datasources.
You can then add these to a graph and create thresholds for them if desired.
At this point you have the monitoring ready to go, but it isn't being applied to any devices. I would recommend creating a device class for your CCM devices. If they're Linux-based you'd create /Server/Linux/CCM and place your CCM devices there. Then in that device class you can click over to More and choose "Bind Templates" from the gear menu in the bottom left. Select your CCMPhones template.
Now any devices you put into the /Server/Linux/CCM device class will have the CCMPhones monitoring applied to them.
Where/how do I locate the physical memory address of my CAN interface card?
I need to use this to open a port.
Since it's a PCI card, the libraries should know exactly where it is and how to access it. If you must have the physical address for a specific purpose, though, you can look in the device manager for windows, or the equivalent for linux or Mac. In many cases the address that is assigned by BIOS is not changed by the OS, so you can often find out at boot time.
You can also get the PCI vendor and card ID within your software, and get the assigned memory ranges that way.
However, the library should handle all that transparently. Have you contacted the vendor for correct library usage? There should be a "find card" function that returns what cards are installed and available, and then you can use a simple index to access a given card.
If you give the card manufacturer's name and type, then we can give better help - Vector's cards are almost trivial to find and control, and most CAN cards I've worked with have been easy to deal with.
-Adam