Hoping to get a nudge in the right direction :-).
I am writing a Java application that will run on a Raspberry Pi 4, embedded in a vehicle (headless, no keyboard). The client or central will be android or iOS.
I'd like the following:
- ABSOLUTELY painless pairing - this is the most important point! You walk into range and you're automatically connected. NEVER a PIN verification prompt or "connection verification" prompt.
- cannot interfere with connecting to the same BT profiles used by the car entertainment system (i.e.cant interfere with hands-free or audio profiles)
- relatively small file transfers (about 500K) in a reasonable amount of time
- when not transferring files I need to be able to send a few random bits that the server/peripheral will act upon.
- battery life isn't really a concern
- security is not really an issue
I've written some classic BT code using jSerial, but the raspberry pi has a few connection issues that make Classic BT seem unwieldy. The connection process requires acceptance of PIN codes, which the headless raspberry, buried under the hood of the car, is unable to validate. Disconnects/reconnects cause issues with the rfcomm/serial port. I can transfer files relatively quickly over SPP, but the connection/reconnection issues are a show stopper.
I've tried Classic BT with SSP ("just works" security ) and I still got a PIN prompt. :-(
BLE would seem to be an option with respect to the "no pairing required", but file transfer would be painfully slow (I'd have to create the file xfer process myself). Upside is that iOS does support BLE, though.
I've looked into wifi direct briefly, but even it requires connection validation from the server side (the appliance under the hood), so this is probably a no go.
Is BLE the best way to go and I just need to get used to the poor file transfer speeds? Any suggestions or libraries that handle xmodem or other guaranteed file xfer over BLE?
Thanks for any advice!
Regards,
Bret