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.

怎么在CC3200站点上,建立httpsever

Other Parts Discussed in Thread: CC3200

CC3200站点已经接入路由,然后怎么操作,能建立一个httpsever

我把lRetVal = ConnectToNetwork();改为站点连接服务器的函数,其它没怎么变,输入站点IP,打不开网页,希望高手指点一下

  • 你是要链接到server上面,还是用CC3200作为http server,然其他的设备访问呢?

    谢谢

  • CC3200作为http sever接入路由,局域网内设备访问它,最后把电脑上的防火墙和杀毒软件关了,能正常使用了,另外想问一下怎么改变http sever 的端口

  • 这个在源代码里面应该有配置,你可以产看一下。

    谢谢

  • /*!
    \brief Internal function for setting network application configurations

    \return On success, zero is returned. On error, -1 is
    returned

    \param[in] AppId Application id, could be one of the following: \n
    - SL_NET_APP_HTTP_SERVER_ID
    - SL_NET_APP_DHCP_SERVER_ID
    - SL_NET_APP_MDNS_ID
    - SL_NET_APP_DEVICE_CONFIG_ID

    \param[in] SetOptions set option, could be one of the following: \n
    - SL_NET_APP_DHCP_SERVER_ID
    - NETAPP_SET_DHCP_SRV_BASIC_OPT
    - SL_NET_APP_HTTP_SERVER_ID
    - NETAPP_SET_GET_HTTP_OPT_PORT_NUMBER
    - NETAPP_SET_GET_HTTP_OPT_AUTH_CHECK
    - NETAPP_SET_GET_HTTP_OPT_AUTH_NAME
    - NETAPP_SET_GET_HTTP_OPT_AUTH_PASSWORD
    - NETAPP_SET_GET_HTTP_OPT_AUTH_REALM
    - NETAPP_SET_GET_HTTP_OPT_ROM_PAGES_ACCESS
    - SL_NET_APP_MDNS_ID
    - NETAPP_SET_GET_MDNS_CONT_QUERY_OPT
    - NETAPP_SET_GET_MDNS_QEVETN_MASK_OPT
    - NETAPP_SET_GET_MDNS_TIMING_PARAMS_OPT
    - SL_NET_APP_DEVICE_CONFIG_ID
    - NETAPP_SET_GET_DEV_CONF_OPT_DEVICE_URN
    - NETAPP_SET_GET_DEV_CONF_OPT_DOMAIN_NAME


    \param[in] OptionLen option structure length

    \param[in] pOptionValues pointer to the option structure
    \sa
    \note
    \warning
    \par
    \code
    Set DHCP Server (AP mode) parameters example:

    SlNetAppDhcpServerBasicOpt_t dhcpParams;
    _u8 outLen = sizeof(SlNetAppDhcpServerBasicOpt_t);
    dhcpParams.lease_time = 4096; // lease time (in seconds) of the IP Address
    dhcpParams.ipv4_addr_start = SL_IPV4_VAL(192,168,1,10); // first IP Address for allocation. IP Address should be set as Hex number - i.e. 0A0B0C01 for (10.11.12.1)
    dhcpParams.ipv4_addr_last = SL_IPV4_VAL(192,168,1,16); // last IP Address for allocation. IP Address should be set as Hex number - i.e. 0A0B0C01 for (10.11.12.1)
    sl_NetAppStop(SL_NET_APP_DHCP_SERVER_ID); // Stop DHCP server before settings
    sl_NetAppSet(SL_NET_APP_DHCP_SERVER_ID, NETAPP_SET_DHCP_SRV_BASIC_OPT, outLen, (_u8* )&dhcpParams); // set parameters
    sl_NetAppStart(SL_NET_APP_DHCP_SERVER_ID); // Start DHCP server with new settings
    \endcode
    \code
    Set Device URN name example:

    Device name, maximum length of 33 characters
    Device name affects URN name, own SSID name in AP mode, and WPS file "device name" in WPS I.E (STA-WPS / P2P)
    In case no device URN name set, the default name is "mysimplelink"
    Allowed characters in device name are: 'a - z' , 'A - Z' , '0-9' and '-'

    _u8 *my_device = "MY-SIMPLELINK-DEV";
    sl_NetAppSet (SL_NET_APP_DEVICE_CONFIG_ID, NETAPP_SET_GET_DEV_CONF_OPT_DEVICE_URN, strlen(my_device), (_u8 *) my_device);
    \endcode

    */
    #if _SL_INCLUDE_FUNC(sl_NetAppSet)
    _i32 sl_NetAppSet(const _u8 AppId ,const _u8 Option,const _u8 OptionLen,const _u8 *pOptionValue);
    #endif