Community
cancel
Showing results for 
Search instead for 
Did you mean: 
MEple
Novice
992 Views

Sending string from Android to Edison via Bluetooth

Jump to solution

Hi all,

I'm trying to build a simple Android app that accomplishes the following:

- sees/pairs with Edison

- prompts user to enter WiFi ssid + psk

- send data as string over bluetooth to Edison

On the Edison side:

- receive string

- configure wpa_supplicant.conf file accordingly

- reboot

I've been doing a lot of research into how BLE works and wanted to ask whether my approach is the best option.

Right now I'm using the https://github.com/sandeepmistry/bleno bleno library to create a Service that can read a string when sent. Within the same app file, I can use file manipulation calls to change the wpa_supplicant.conf file and reboot the system.

Does that sounds like I'm on the right track? Seems like a lot to just get a string from one device to another. I had previously gotten /message/292975# 292975 this setup to work, allowing for pairing between Edison and a device without the need for bluetoothctl CLI and had it echoing strings back and forth using SPP but was unsure if that was accomplishing what I needed...any advice would be helpful. Thanks!


Accepted Solutions
Pablo_M_Intel
Employee
35 Views

Hi mepler,

It does seems like a lot of work just to send a string and manipulate a file, but you're on the right track. That's how it should be done. Regarding the setup that you already had, I believe that SPP is the most adequate profile to accomplish the desired behavior. You could also take a look at FTP (file transfer protocol), among the several profiles that come in the http://download.intel.com/support/edison/sb/edisonbluetooth_331704004.pdf Edison Bluetooth Guide SPP and FTP are the ones that would work best.

As you can see in the Bluetooth Guide, the Edison module supports all BlueZ profiles but just some of them have been validated, you might want to check the other profiles available in the BlueZ site as you might find some helpful information.

Regards,

Pablo

View solution in original post

1 Reply
Pablo_M_Intel
Employee
36 Views

Hi mepler,

It does seems like a lot of work just to send a string and manipulate a file, but you're on the right track. That's how it should be done. Regarding the setup that you already had, I believe that SPP is the most adequate profile to accomplish the desired behavior. You could also take a look at FTP (file transfer protocol), among the several profiles that come in the http://download.intel.com/support/edison/sb/edisonbluetooth_331704004.pdf Edison Bluetooth Guide SPP and FTP are the ones that would work best.

As you can see in the Bluetooth Guide, the Edison module supports all BlueZ profiles but just some of them have been validated, you might want to check the other profiles available in the BlueZ site as you might find some helpful information.

Regards,

Pablo

View solution in original post