Any ideas?
WiFis don't reliably identify themselves as mobile hotspots. Basically, a hotspot tells you nothing about how it's connected to the Internet, so there isn't a clean way of telling. The hotspot's upstream connection could be anything out of the following:
(How to detect if you're connected to one of the latter three is described here).
Radiobeacon (licensed under AGPLv3) has an approach to detect mobile hotspots. (The idea here is somewhat different, as the app georeferences hotspots to use for position tracking, and thus needs to filter out hotspots whose position is likely to change – but those tend to be on mobile data connections, so you should get a good hit rate from them.)
This is one of the two methods employed by Radiobeacon. Examine the SSID for patterns that are commonly used in mobile hotspots (strings such as Android, mobile, iPhone and the like). Of course, anyone could use that in their non-mobile hotspot (people do get creative about their SSID names), so there's both a false acceptance and false rejection rate to consider.
The other method employed by Radiobeacon: Look at the BSSID (the hardware address of the hotspot). The BSSID is a hexadecimal string of the form 00:60:0d:c0:ff:ee
, of which the first half identifies the manufacturer of the chip. Some chips are used mainly in mobile equipment while others are used in fixed equipment, thus some prefixes indicate a mobile hotspot. A few prefixes will already help you filter out all iPhones. Still, there may be prefixes that are found in both mobile and fixed equipment, and we're not even talking about home routers which have a mobile data connection as their upstream link.
For both these examples, visit the Radiobeacon link for the code containing the blacklists. They have been obtained by trial and error, may be far from complete or even contain errors – but they may serve as a starting point.
As a third method, you can also try looking up the geographic coordinates for the BSSID through a service such as Mozilla Location Service. There are a handful of other, smaller providers out there, plus the services offered by Google and Apple, but the last two are probably not legal to use for that purpose.
Though I don't really know the details of how these service handle mobile WiFis, they will need to do take some precaution to prevent using these to establish the user's location. The may eliminate hotspots from the database if they move around too frequently, or give them a low confidence interval, or just keep them in the database and leave it up to the consumer to decide which BSSID-location tuples to use for establishing their location.
If they go for one of the first two approaches, then getting a position with a high confidence (up to 2000m, which is the typical range of a WiFi) is a sign that you're on a fixed WiFi. If they go for the last approach, you will additionally need to establish your position by means of GPS or cell lookup. If that is far away from the WiFi's location (something beyond 4000 meters), that indicates a mobile hotspot.
A fourth approach you could look into is to determine your external IP address (not the one assigned to your device but the one that your communication peers would see as the originating Internet address), and matching that against a list of Internet providers. You'll need to research that a bit:
Again, there is a chance of carriers using the same IP address pool for both mobile and fixed data customers.
All approaches mentioned here may give false negatives or false positives. You will probably want to combine he result of all four methods into a likelihood that you're on a mobile data connection, and avoid moving large amounts of data if the likelihood exceeds a certain threshold.