hello everyone!
as the topic say: i have a problem about settting the http port on qca4004 API.
the api provide method qcom_http_client_method() to support http. like this
HTTPC_CONNECT_CMD //connect
HTTPC_GET_CMD //http_get
HTTPC_DISCONNECT_CMD //disconnect
but, the problem I faced is what should I do to use self-defined http-port not the default port 80.
becasue of the consideration of security , I want to change the default port 80 to other port like 5677...
could anyone answer my question or provide anyother method??
thanks a lot.
Dear Customer,
As per you mentioned, change default port 80 -> 5677.
Please modify A_UINT8 *url. (e.g) http://192.168.1.1:5677.
8.3.45 qcom_http_client_method
Definition
Configure HTTP client
Prototype
A_STATUS qcom_http_client_method(
A_UINT32 cmd,
0 = HTTPC_CONNECT_CMD
1 = HTTPC_GET_CMD
2 = HTTPC_POST_CMD
3 = HTTPC_DATA_CMD
4 = HTTPC_DISCONNECT_CMD
5 = HTTPC_CONNECT_SSL_CMD
A_UINT8 *url,
Page name
A_UINT8 *data,
Object name
A_UNIT8 *value
Output of the HTTP client request
)
Return Value
A_OK on success, A_ERROR on failure
Regards,
Ray
qcom_http_client_method allways return A_ERROR. What can be wrong?
uint8_t localurl[] = "192.168.17.238";
uint8_t data1[128] = "9900";
Hi,
Please provide the QCA4004 DUT logs which you have observed.
Have you tried the below command parameters as well in the qcom_http_client_method() function?
HTTP_GET_CMD
HTTP_POST_CMD
HTTP_DATA_CMD
HTTP_DISCONNECT_CMD
Thanks,
Santhosh
Hi ,
Have you tried giving url value as http://192.168.1.1:5677 .
Else can you plaese try below with default sdk shell. Also which sdk version you are using?
Also can you please try with sdk shell defalut command like below
wmiconfig --ip_http_client connect <ipaddress_or_domain> <port_num>
Where: ipaddress can be IPv4, IPv6, or a domain name for example www.Qualcomm.com
port_num is optional. If no port is provided, the client connects to port 80.
PUT/PATCH/GET/POST requests can be issued in sequence once the connection is established