Changing Beacons Minor and Major without specific application - raspberry-pi

Beacons like Radbeacon, Estimote, Accent and so on have their own application for changing different features of beacons(UUID, minor, major, Tx power), is it possible to change UUID or minor and major via something else dynamically? is it possible to do that via Bluez on raspberry pi or any other library like noble?

While this is in theory possible, but I don't know of any manufacturers that support this with off-the-shelf beacons for a few reasons:
Some manufacturers limit the configurability of beacons over a bluetooth interface to only a short-time interval after you put them in configuration mode (by power-on, double clicking a button, etc,) as #Paulw11 mentions. This is for security reasons.
While some beacons (like Radius Networks' RadBeacon USB) allow you to set the power-on configurability timeout to be forever, this device does not have a publicly available SDK to configure over bluetooth. You have to use the manufacturer's app, which understandably you do not want to do.
There are certainly use cases where this is desirable. With such a setup as you describe, you can have a configuration computer within bluetooth range of all your beacons, and programmatically push identifier changes over the air whenever you want -- either in an ad-hoc manner or at regular intervals to rotate identifiers for anti-spoofing reasons.
There are paid service options from Kontakt.io and Radius Networks to accomplish the above, but to my knowledge their solutions do not allow you to roll your own without paying for the service.
If you do want to roll your own, you could build your own beacons that do this, perhaps using a Raspberry Pi to act as a beacon with BlueZ, Bleno, or AndroidThings, and then another one to be the management device that commands the changes using BlueZ, Noble, or AndroidThings.

Yes you can change major, minor and uuid as per your requirement.
Have a look on this Bleno
It is a Node.js module for implementing BLE.
You can Install it in Raspberry Pi also.
Hope this Helpful.

Related

How do I detect iBeacon device without knowind uuid in iOS?

I would like to develop app which detects a lot of beacon device withoud knowing uuid.
However I cannot find way to do this in internet.
I have to define uuid in code.
So is there way to detect iBeacon without knowing uuid?
I know CoreLocation requires you to know the UUID of the beacon you are CBCentralManager, which handles all of the bluetooth spectrum. It has methods for scanning for bluetooth devices. I don't have an iBeacon handy at the moment to test and see if it picks them up, but it is probably worth a try.
The nomenclature used is quite important here. If you want to detect 'iBeacon', then you need to at least know the UUID of the device or devices you're looking for. That's because, in the iBeacon standard, the ID is the only piece of information included in the advertising packet. iBeacon lets you do two things: monitoring and ranging (detecting whether there is an iBeacon in range, and detecting how close the iBeacon is), and both require you to know the UUID.
If you just want to look for beacons, without including the iBeacon properties and features, you can use Core Bluetooth to do that. SDKs of particular beacon vendors base their beacon maintenance features (firmware updates, settings changing) on that. This method is also used by vendors that use their own protocols alongside Apple's iBeacon. We do that at Estimote with Estimote Stickers, and AFAIK Gimbal does this as well.
Cheers.

Is it possible to make a (non jailbroken) iPhone emit i2c commands?

I want to control a string of LEDs directly from my iPhone. The LED controller chips talk the i2c serial protocol.
Can I do this with Apple-supported APIs on a non-jailbroken iPhone? Which frameworks do I need to use?
Yes, but you will need an external hardware to do that. iOS does not give you access directly to I2C in the docking connector.
KissBos has a OEM board to do that, with a special firmware. You can connect to their board via WiFi, using a TCP based protocol, or via a RTP-MIDI based protocol (RTP-MIDI is implemented in iOS, you don't have to deal with the protocol details, it's just a MIDI port for your application).
If you want to go through the dock connector, you will need their USB interface (it will transform the USB into RTP-MIDI, which goes in the OEM board)
I'm quite sure that you can't do that. Apple is very strict about what you are allowed to and not. I spent days trying to find a way to get access to the iphone's bluetooth layer and ended up with my head against the wall (only a limited game api is public, else you have to go with the Made For Iphone program). However, you are able to do some stuff using the usb cable, but I guess that the possibilities are limited with that too.

iPhone to RS-232 via Bluetooth

I'm looking to connect my iPhone to an RS-232 serial device via Bluetooth. Has anyone implemented this successfully and can offer advice on hardware to use? It's kind of tricky because of the need for the Apple Authentication Processor with the device. The best potential device I've found is this guy but it only comes in an embedded package, its serial port interface is just logic-level UART rather than line-level RS-232, and I can't find a supplier with it in stock.
Any thoughts would be appreciated.
I'm considering just using WiFi to serial instead, but please ignore that possibility for the purposes of this question.
most of the question was answered by yourself already.
Basically you have 5 (+2) choices.
Join the MFi program. This might be hard to impossible if you are not part of a at least mid-size company.
Buy the OEM Bluetooth Module. I'm not sure if this is even allowed by the apple policies.
Use WiFi. Keep in mind that you want to use a wifi chipset that can act as at least ad-hoc access point. Those chipsets are quite expensive, and you have to think of a way to join existing networks (customers don't want to leave their home network to use your product). This will add a lot of cost to the BOM of your device.
Jailbreak might be an option. I never tried to use accessories with a jailbreak, so I don't know if it's possible to use bluetooth without authentication.
Work with a company that is member of the MFi program.
(Maybe an option, and depending of the speed you want to have via RS232: Eventually you can convert the audio output of the head-phone jack to RS232 levels and vice versa)
(Not really an option: develop for Android and do whatever you want)
If you jailbreak your device, you can use BTstack.org (disclaimer: I'm the author of BTstack) to connect to a Bluetooth device that supports the Serial Port Profile. You can get Bluetooth Modules that implement SPP and provide UART level output. As David R. above points out, you then need a UART to RS232 converter, e.g. the MAX232.
Ok. Another option. There are one or two companies that sell RS232 cables for iOS, eg. Skywire here: http://www.southernstars.com/products/skywire/index.html
Then, you could uses a Bluetooth RS232 extender, which consists of a RS232-to-SPP and a SPP-to-RS232 pair. Ugly, but within Apple's rules.
Well. It seems like my answer could be something you didnt ask for.
But the guy you referred to is the answer. Buy his product and you are good to go, all you need is a MAX232 chip. Converts logic level UART to RS232.
the diffrence high + voltage low zero voltage is converted to high +~10volts low -~10volts.
I use the MAX232 chip with my microprocessor, that uses logic level USART to communicate over RS232.
There is a lot of tutorials out there explaining how to hook things up.
This product works: https://serialio.com/product/bluetooth-serial-adapter/bluesnap-smart-bluetooth-40-ble-rs232-adapter
The only downside is that the adapter requires power.
It should be possibly I would think to create something in the middle that accept the bluetooth commands and convert them to serial, similar to what this does with TCP connections: https://www.npmjs.com/package/stellar-socks

How to implement indoor navigation on the iPhone

I would like to locate the iPhone in a building to build an application with similar features as the iPhone app of the American Museum of Natural History. There is no good GPS reception as there are also rooms in the cellar I would like to cover.
What can save me is that there is good wifi coverage in the whole area, so my idea was to triangulate the position based on the wifi base stations in range, whose positions are known. However I found no public API to find out which base stations are in range.
Questions
Do you have an idea how the app mentioned above manages to get the correct location indoors?
Could one add the wifi base stations manually to Apple's database and use the usual CoreLocation?
Do you have other ideas how to implement it?
Any help is very much appreciated!
Boundary conditions
The indoor navigation is only used during an event to guide guests new to the building, so no complex infrastructure should be installed.
There are approximately 14-18 rooms to be covered. They are in different parts of the building, so wiring everything up would be very costly.
The preferred solution would not require a server backend of any kind and would work with a list of wifi access points and their corresponding locations.
I wouldn't know about 1 and 2. But if you would implement such a thing, turn it around to save a lot of trouble: create your own free-of-charge wifi network, and let the network determine the location, either based on triangulation, or just based on the currently associated access point. Make their signal weak so you have one audible access point per room. Let the app ask a server in what room he appears to be. This will also work for any other mobile/pda/laptop.
As for other ideas: You could use bluetooth to do somewhat the same as you're planning for wifi. You can't do everything with bluetooth, but listing devices seems to be one possibility. So just put a bluetooth device in every room. Bluetooth range is limited by definition.
Another one would be to use the microphone in conjunction with a high pitched sound which identifies the room, but that would cause trouble with dogs (for blind people), attract bats, and repel mice at the same time. Better focus on an RF based solution ;-)
You can also check out Navizon's indoor positioning system:
http://www.navizon.com/product-navizon-indoor-triangulation-system
Their system is able to locate iPhones by using the WiFi signals transmitted by the device and doesn't require an app to run on the phone to locate it. It can locate any other WiFi enabled device for that matter.
Check out wirelesswerx.com They seem to be doing indoor location using Bluetooth and it looks like they can do permanent install or temporary for events.

What is the range of bluetooth and is it strictly 1:1?

Does anyone know what kind of range can you get from the iPhone
bluetooth? Also, would the connection be strictly one to one? I know you
can choose from a number of peers to connect to but once the connection
is established, it seems you can only transfer data between one peer? So
basically, is it possible to create some kind of "multiplayer" experience?
Just answering the range part of your question...
The 10 meter figure for class 2 devices (of which the iPhone is an example) is very much a guideline.
The range of a Bluetooth device is limited by many real world factors. The 2.4 GHz radio frequency used by Bluetooth is strongly absorbed by water. For example, consider an iPhone connected to a Bluetooth mono headset. If the headset is in one ear and the iPhone is in your trouser pocket on the opposite side of your body, then there's a lot of water between the two devices. This will often cause a significant amount of packet loss in practice (you can hear this in the audio being carried). So, in this case, the range is about one meter.
At the opposite extreme, two class 2 devices separated by nothing more than clear air can get ranges of hundreds of meters.
Other factors that influence things are:
Interference - Lots of things use 2.4 GHz. WiFi, for example can cause problems.
Antenna design - Space and cost constraints often mean that the antenna design is sub-optimal. I don't know how good the iPhone is in this respect.
Walls - Generally walls attenuate Bluetooth signals. However, sometimes they are useful reflectors.
Quality of hardware - Some chips work better than others. Even different firmware revisions of the same chip may perform differently. Different versions of the iPhone probably have (or will have) different chips in them.
Protocol - It is possible to work around poor signal quality with error correction and retransmission. Even if the iPhone SDK forces you to use a particular protocol, careful design of your application can make a difference.
So, in summary, you should probably do some real world tests.
The connection is one-to-one, but you can create an adhoc network with one of the phones acting as the master/coordinator. The other phones would route all their communication through the master/coordinator.
One device can theoretically connect to 7 devices. according to the master-slave role, the device can multiplex between each of them giving the user an impression that you are connected to all of them simultaneously. Bluetooth specification does not stop you from doing that.This is theory.
Now for the iphone, whether it can connect to to more than one device can only be answered by apple or someone who knows the iphone bluetooth API. But I am pretty sure the bluetooth chip inside iphone should be able to connect to more than one device.
Range is essentially going to be good enough for a normal sized room to be covered. It can be longer or shorter depending on environmental circumstances, but remember that bluetooth was created to implement short range connections.
A bluetooth device can be part of a piconet of eight devices, one master and up to seven slaves. The slaves cannot communicate with each other, they must talk through the master, think of a star topology with the master in the center. The iPhone SDK has a GameKit framework that can be used to create the network for multiplayer games. Go to developer.apple.com at look at the GKTank and GKRocket sample code to see how it's used. These games only support two players, but the GameKit framework supports more. Look at the app store and you will see games that have four or more players.
Hope this helps to get started.
Apple iPhone 3G has a Class 2 bluetooth module. Class 2 Bluetooth devices have a communication range of 10 meters.
At a given instance a device can connect to just one device because it follows a master/slave communication model. But still we can perform a multiplexing. So we can virtually connect to more than 1 device and by rapidly changing the connected device.
I found a good article here. It explains bluetooth very well.
According to the my knowledge, multicasting is not impossible with bluetooth. So gaining a multiplayer experience is NOT impossible.
The bluetooth in the iPhone is Class-2, with a 10-meter range, approximately.
Unfortunately I can't answer the other parts of your question.
One device can be connected up to 8 others. It all depends on the iPhone bluetooth API (which I don't know anything about), but with Bluetooth itself you could then send data to multiple devices.
I tether my iPhone to my laptop over bluetooth every day, and I seem to remember having done that at the same time as using a bluetooth headset. YMMV.
It’s the latest incarnation of Bluetooth, the wireless device-to-device technology that allows your phone to talk to headsets, car stereos, keyboards and other devices directly, without the need for a router or shared wireless network.