Posting to Firebase Database from BC66

Does anyone know how to post data to google firebase database using BC66 module. Using AT commands.

Hi rajendran
Please also confirm what protocol Google firebase is using.

We provide corresponding AT Commands.

HTTP connection, can post some examples

https://cloud.google.com/iot/docs/how-tos/http-bridge
for google rest api ( https ) you need:
google_long_ca.pem certificate (can and full certificate)
https://cloud.google.com/iot/docs/how-tos/mqtt-bridge#using_a_long-term_mqtt_domain

and you need to calculate your JWT key
load certificate in module
create post header
post json data {“binary_data”:“SGVsbG8gZnJvbSBBenVyZSBTcGhlcmU=”} // Base64

easy … tested with different modules…

Is there any step by step tutorial which I can follow?
Is there a need to download such certificates? Examples using wifi boards to publish data to Firebase only require credentials like token. Greatly appreciate the help. Thanks

from Arduino example (using cURL https-post) you can get the solution

1 Like

Hi Rajendran
The attachment is the AT command of the HTTP protocol. please try to connect.
If you have any questions, please provide feedback. You can also grab the Genie log on the module side so that we can view the communication protocol and give the corresponding solution.
https://cnquectel-my.sharepoint.com/:b:/g/personal/ae-fae_quectel_com/Ec3D1ObmHM9HmxZNs6YHexoBfPBe-0gNHuLlaRZ2_rdwmw?e=BdgEGE

You can download the log tool and useguide from the following link.Thanks!
https://cnquectel-my.sharepoint.com/:u:/g/personal/ae-fae_quectel_com/EW2HRwhCp3BGiMMDvm5aADwBsFBVxgu67YsxgvM37f0q0w?e=6fCRae

Hi Abner, I am new to HTTP protocol, can you advise me on the following,

AT+QHTTPCREATE=flag,<total_len>,len,host[,<auth_user>,<auth_password>,<server_cert_len>,<server_cert>,<client_cert_len>,<client_cert>,<client_pk_len>,<client_pk>

Based on the above command I have created as such,
AT+QHTTPCREATE= 0,103,103,“https://projectid.firebaseio.com[,projectid,”",<server_cert_len>,<server_cert>,<client_cert_len>,<client_cert>,40,apikey]

I am not sure on how to proceed with the certs, server, client. Firstly how to get these certs and upload to my module using AT commands. And how can we calculate the total len? Greatly appreciate your help

Hi rajendran
Please follow up the following step to modify your setting, then to test it again.
AT+QHTTPCREATE=0,103,103,"“https://projectid.firebaseio.com,0,0,0,"
If you still have any questions about how to test HTTP function, please refer to the following document. Thanks!
HTTP
By the way, please double check whether the google firebase support HTTP or HTTPS, if it just support HTTPS, please contact google firebase to get the needed certificate. Thanks!

Hi Abner, thanks again for the help. Yes Google is using https. But after getting the certificate, how can I specify it in the command? I checked BC66 doesn’t have QFUPL function

Hi Abner, thanks for the reference. From the HTTPS 5.3 example, I could see the certificates were posted in the AT command line. But there were 9 cert keys that were entered. But from AT+QHTTPCREATE , there are only 3 cert keys. Server, client and client private key. Another question, can each key be keyed in different command line as shown in the 5.3 example?

Hi Rajendran
BC66 currently does not support HTTPS, waiting for later development.

Does it support MQTT TLS? I am currently using MQTT which works. But most iot platforms require secure MQTT. In such cases, how can the certificate be attached to the device esp for BC66? Are there any AT command libraries that are available for BC66? Now im using an ESP32 controller to send AT commands over UART to BC66 module.

TLS is bad solution for NarrowBand - slow and big trafic
you can test with BG96

Hi WizIO,

Too bad I only have BC66 with me. Does it support TLS? If yes, any command to upload a cert to the BC66 module?

Quectel BC66 not support userware TLS