Hi,
Sorry for very simple question.
Is “http post” not supported on WP76xx devices?
Regards,
you can use curl command in linux console
If you want to support in AT command format, you need to write a legato application to support it:
Thank you for the reply.
My colleague is thinkng to use “http post” in WP7605 target app and pass the data to host system via USB.
Are there any sample code for the target app?
I think we should think about the use of DCS API.
Regards,
you can ssh via USB ecm port and use curl command
or you can use the USB raw data port and modify the legato sample code i shared with you above
OR you can write an legato app to read the RAW data sent from host and use system() to call curl command to do the HTTP post operation.
Thank you for the detailed advices. I’ll pass your suggestion to my colleague.
Because our host does not have SSH procedure, I think the second or the third alternative would be good for us.
Regards,
I’ve imported “UART_KHTTP_Demo1” to VSCode and built it without errors. My colleague would proceed with the modification of it. Thanks.
We would like to study your third alternative as well. Are there any sample code regarding your third alternative?
Regards,
You can try the following in an unsandboxed legato application:
char* SERVER_ADDR1="https://123.123.123.123/test-data.json";
sprintf(temp_Str,"curl -X POST %s -H 'Accept: */*' -H 'Accept-Encoding: gzip, deflate' -H 'Cache-Control: no-cache' -H 'Connection: keep-alive' -H 'Content-Type: application/json' -H 'Postman-Token: 50cd09f6-0d05-4168-ad1d-8e4faabc1249,9e575ef1-ba07-45bb-ad05-5f987f7c6391' -H 'User-Agent: PostmanRuntime/7.20.1' -H 'cache-control: no-cache' -d '{\"TelematicData1\":%s,\"TelematicData2\":%s}'",
SERVER_ADDR1,
"test",
"test");
system(temp_Str);
Thank you for the sample code.
I’ve passed it to my colleague.
We have one more question.
Does Legato in target have something like “RAM disk” or “folder”?
We would like to save tentative files for buffering use.
Regards,
do you mean this?
How to make WP76 module as mass storage device.docx (700.3 KB)
Thank you for the advice.
I’ve passed it to my colleague.
Host cpu could use wp7605 as external memory device.
Regards,