This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Sending JSON from android app to nrf52

I am new to ble programming. I am trying to find the best way to send json objects from android app to nrf52 chip.

What is the best way to send the json object to the BLE device and use it there.

Also is JSON supported in the BLE device, are there any libraries which I can use to work with JSON objects.

Parents
  • (oh yes, because what is better idea then sending JSONs everywhere... one would wonder what happened to all these guys who were sending XMLs before JSON came to the fashion;)

    Sure, you can be sending JSONs encoded as ASCII or UTF8 or whatever else string over whatever interface including various BLE layers. However please note that even people speak about IoT here and there embedded systems like nRF5x are not meant to be exchanging some stupid formats made for high layer internet protocols. You can find initiatives like Espruino which are using high level languages like JavaScript to put user logic to nRF5x. Some of these will probably have some JSON parsers as well. However all standard profiles and services in BT SIG Low Energy stack are using much simpler protocols to interact between two peer devices.

Reply
  • (oh yes, because what is better idea then sending JSONs everywhere... one would wonder what happened to all these guys who were sending XMLs before JSON came to the fashion;)

    Sure, you can be sending JSONs encoded as ASCII or UTF8 or whatever else string over whatever interface including various BLE layers. However please note that even people speak about IoT here and there embedded systems like nRF5x are not meant to be exchanging some stupid formats made for high layer internet protocols. You can find initiatives like Espruino which are using high level languages like JavaScript to put user logic to nRF5x. Some of these will probably have some JSON parsers as well. However all standard profiles and services in BT SIG Low Energy stack are using much simpler protocols to interact between two peer devices.

Children
No Data
Related