We've got a self-built mobile device which can transfer data via Bluetooth SPP to a PC. On the market there are numerous devices acting as mobile printers via Bluetooth. Some of them use a custom ASCII-based printing language, e.g. the label printers from Zebra.
So there is the idea of printing via SPP from our device.
Sadly there is not too much usable information on the internet on this special topic.
Can you recommend any printer (at least A4) capable of printing via Bluetooth SPP with publicly available protocol specs?
Or do you have any hints where to start?
Bluetooth printers typically use profiles other than SPP. There are several flavors, some printers will support a variety of them:
1) BPP - Basic Print Profile can send simple text-based data, no need for printer-specific drivers
2) HCRP - Hard Copy Cable Replacement Profile is used to send the same data format as you would over a wire, typically requires printer-specific drivers to format the data.
3) BIP - Basic Imaging Profile allows transfer of photos, etc.
4) OPP - Object Push Profile is also sometimes used to transfer files
So in general, you are not going to be able to just use SPP to talk to a normal printer, although these other profiles may sit on top of SPP.
Related
I would like to print to thermal receipt and label printers through the web (PWA) on Android devices.
In this page you can see some example code:
https://github.com/WebBluetoothCG/demos/blob/gh-pages/bluetooth-printer/index.html
Is it possible to print to "any" bluetooth enabled thermal printer or is there some process to determine which bluetooth receipt and label printers are compatible.
My worry is that some printers will only work with provided sdk's that are only written for java/objective-c/swift.
Unfortunately from what I have seen it takes a bit of investigation into an individual model of thermal printer to figure out whether it supports Bluetooth LE (as opposed to Bluetooth Classic) and to learn what dialect of printer control language it speaks (ESC/POS, ZPL, etc.). I recommend asking the manufacturer for detailed documentation (in case you have to build your own library) and letting them know that you are looking for something you can interface with using Web Bluetooth. If enough customers ask for it maybe they'll start advertising compatibility and even produce SDKs.
For a project of mine I need a pairless bluetooth data transfer. I have first thought about doing it with BLE IBeacons but they can only advertise a very limited amount of data. I looked further through the Apple documentation and found this tutorial about Central/ Peripheral
BLE data transfer. I've implemented the code in my project but even though the devices were very close together they could not "see" each other. I have since looked up on the Internet and could not find a hint about whether the devices need pairing or not and what the problem of mine could be(the code is not throwing any errors nor warnings).
If it does require pairing, is there some way to do that in the background without requiring the user to perform an action, so that I could theoretically advertise some kind of pair request via. IBeacons to then transfer the data? If that's not the case, is there even a way to transfer data (mono directional, round about 512 bytes) between nearby bluetooth devices without user actions?
greets from germany!
To get started with Bluetooth Low Energy or any other protocol, it's best to learn how it works. At least basics.
Simplifying. BLE allows you to send data:
"Passive" (without conncetion) - over Advertisement Data. The size of the packages depends on the BLE version.
"Active" (requires connection with the device) - bidrirectional comunication. In this case size of the data package also depends on the BLE version.
Bonding and pairing is a separate issues.
I suggested you look at the following book:
https://www.oreilly.com/library/view/getting-started-with/9781491900550/
The websites of BLE module manufacturers also offer a lot of information about this technology. For example Nordic or TI. Very often with sample programs for various platforms.
For iOS:
https://developer.apple.com/videos/play/wwdc2017/712/
https://developer.apple.com/bluetooth/
You may also be interested in sending more data without connection using version BLE 5.0
https://www.bluetooth.com/blog/exploring-bluetooth5-whats-new-in-advertising/
We are developing a mobile application that tracks users while they are picking up and delivering commodities. We have overcome many issues, including poor connectivity in rural areas, the app going into the background, and so on.
One issue continues to befuddle us. When receiving calls some drivers lose connectivity, other drivers will gain connectivity, and others (most) have no change in connectivity.
I remember earlier that Verizon iPhone users couldn't access data while on a call. Naively I thought that this issue was completely overcome, but perhaps it is not.
My understanding is that a) there are still some cellular protocols that cannot handle voice and data and b) there are (or were) some settings in mobile phones that give the user a choice.
I have searched for some list of cellular protocols and iOS and Android settings but so far come up empty.
Any guidance would be greatly appreciated.
Hopefully this will provide some more clarity; it all depends on the Radio Access Network (RAN) technology they're using (2G/3G/4G) and the terminal itself's capabilities.
There's 3 umbrella terms of technologies, each with their own revisions and variants, but this should cover it:
LTE (4G) only supports voice calls via VoLTE (Voice over LTE). Calls made over VoLTE will allow the user to continue accessing data at the same time. Many devices & some networks don't yet have VoLTE capability, so they use Circuit Switched Fall Back (CSFB) to drop to a 2G/3G Radio Access Network for making voice calls. (If your terminal does this you then have that RAN's ability to allow simultaneous voice/data.)
3G - There's a few flavors of "3G", depending on the terminal and the RAN variant (UMTS / EDGE / CDMA / HSDPA / HSDPA+) you may be able to access data and be on a call at the same time.
GSM (2G) does not have this functionality, the handset is either in Circuit Switched (Voice) or Packet Switched (Data) mode but not both.
The decision of which RAN to use is based off the priorities stored in the SIM/USIM, the received signal strength of the available networks and the capabilities of the terminal.
This means for example your users who may gain connectivity may find themselves using a 3G access technology on a 4G enabled terminal, with VoLTE support, jumping up to VoLTE to make the call. (Some operators resell to MVNOs but default to slower / older RAN technology like the 3G family)
Others may loose connectivity as you've seen, if they're happily using LTE on a device with no VoLTE support and need to drop to 2G/3G for a call (CSFB) they may loose data services as they're back to the limitations of these older RAN technologies.
I am looking for a way to load data from an embedded device via a serial port (RS232) to an iPhone. The app needs to be on the AppStore and our company is not part of the MFI program.
Before you say, it can't be done, we are looking into Bluetooth Low Energy 4.0 as a possible solution. We can create a device that can turn ConnectBlue's OBS421 module into a serial port adapter (with the speed bursts limitation). To that effect, connectBlue provides their own protocol called Serial Port Service, but it is documented only on a very high level.
Does anyone have any experience in using this protocol? If so, can you provide an example(objective C) code that establishes communication in this way?
Has anyone submitted an app to Apple that does this without getting rejected for infringing MFI rules?
One more question.. The device I am trying to connect only supports serial commands in the EZII Escape Computer Command Set standard (PROG ID of "EZ2 2.0" and higher). They look different than the common ATT-Commands. Example: <ESC>Gc100<EOT>.
Any idea if I can send such commands via ConnectBlue's LE-SPS?
Your help is much appreciated.
Thank you!
I haven't used this protocol but from the documentation it seems quite straight-forward. You should be able to take any of the core-bluetooth examples and adapt it fairly quickly.
You need to look for a peripheral that is offering service 0x2456e1b926e28f83e744f34f01e9d701
This service exposes two characteristics -
0x2456e1b926e28f83e744f34f01e9d703 to read & write to the serial port
0x2456e1b926e28f83e744f34f01e9d704 for "credits" if you need flow control. Essentially it seems that this value indicates the number of bytes you can send to the device and you can write a value to indicate the number of bytes you are prepared to receive from the device
The device should support a full 8-bit data path, so I don't see why you would have a problem sending the serial commands.
Bluetooth Low Energy is specifically excluded from the MFI program, so you won't get rejected on that basis -
I want to develop an accessory that communicates with an Apple device
using only Bluetooth Low Energy. Do I need to join the MFi Program?
No. Accessories which connect to an Apple device using only Bluetooth
Low Energy/BTLE/Bluetooth 4.0 or standard Bluetooth profiles supported
by iOS are not part of the MFi Program.
Bluetooth Low Energy does not have a SPP defined as a standard protocol.
You have to program it yourself using the GATT service/characteristics, you just need to generate your own 128bit UUID (google it, there are plenty of UUID generators and even on Mac or Linux it's easy to generate from command prompt)
GATT sends smaller chunks of data which you would have to concatenate yourself in the other end.
Be aware that the throughput of BLE is quite low compared to Bluetooth Classic SPP. Maybe around 3kbytes/sec.
We manufacture a new accessory for iPad/iPhone which should transfer commands to the iPad. We like to use UART (through a certain Apple-protocol called Lingo). My research shows that I can only use USB (30PIN Connector) and custom protocols.
Question:
Is there any way to use UART to connect to the iPad accessory from APP side?
If the protocol is implemented in UART, we should be able to move it to USB, if it's not available to my App via USB.
My main guess is that the UART commands & access are protocols reserved to the iPhone OS and not available to Apps. Certain UART commands also include settings for volumes and Audio re-routing etc, so I guess that's secured.
Without jailbreak, you will not be able to access UART on iPad/iPod/iPhone as a normal developer. If you need access to the serial port or USB, you need to join Apple's MFi ("Made for iPhone") program and you will get full access to all relevant information. Unfortunately, you'll have to convince Apple that you're doing serious business and have a high volume manufacturing facility at hand (see also this thread).