This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CC3120BOOST: Issue with firebase cloud response to receive data using Rest API call

Part Number: CC3120BOOST
Other Parts Discussed in Thread: CC3120

Tool/software: Code Composer Studio

Hi

I'm having trouble when trying to call rest API from google firebase real time database. I use this URL  https://minmin-68c89.firebaseio.com/.json. Response always come in web browser, but when called by using GET or curl command in the program of Ti-RSLK robot kit Lab20 program, it does not work. Other APIs such as thingspeak and ifttt works perfect and is able to receive data from them. But for firebase, it does not work totally. One thing found out is google firebase requires https request. I have changed port number to 443 everything and this still does not work. Any setting still needed to be able to call Rest API?

Following texts show as firstly sending request using curl command. After that the response sent by the firebase below which replies error "HTTP/1.1 Bad Request". I need help urgently thus any fast response reply is very appreciated. 

curl minmin-68c89.firebaseio.com/.json
HTTP/1.1
Host:minmin-68c89.firebaseio.com
Accept: */*


HTTP/1.1 400 Bad Request
Server: nginx
Date: Tue, 17 Sep 2019 17:16:55 GMT
Content-Type: text/html
Content-Length: 166
Connection: close
Strict-Transport-Security: max-age=31556926; includeSubDomains; preload

  • Hi,

    I suggest that you first debug and fix your curl issue on your PC. On your PC, you can use wireshark to sniff the packet traffic goign to your firebase server, and it will be easier for you to iterate and test different HTTP GET data. Only once you have figured out how to send the curl request correctly on your PC should you move on to the CC3120.

    While I'm not familiar with the Google firebase service, given the curl output that you have shown it seems like you are not formatting your request correctly. I suggest you take a closer look at the Google API references, or search for curl examples that interface with Google firebase.

    Regards,
    Michael

  • Hi Reymond

    I posted here without https wrongly. With https, it is also not working as some issue exists. Is there any https certificate issue with CC3120 simplelink configuration? Or can I use URL with GET request? I absolutely believe it is the issue with CC3120 setting cos I tested it curl command line and postman. Really need solution from your site since I have been consuming many weeks trying to figure this out. Only got 400 error when the database is called using this C program. I need help asap. Thanks.

    curl -v https://minmin-68c89.firebaseio.com/.json
    HTTP/1.1
    Host:minmin-68c89.firebaseio.com
    Accept: */*

    Thanks and best regards

    Min Min

  • Hi Min Min,

    I am addressing your issue with the root CA certificate in your other thread here:

    https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/t/842086

    Please keep discussion on your firebase issue focused in one thread.

    Thanks,
    Michael