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.

send data to an HTTP server page (using RTOS)

Hi !

I'm working on a SPI comm., and to debug my program a friend advise me to use RTOS to send data to an HTTP server page.

...BUT i don't know how make it : is there a step by step tutorial about it, or other think to help me about please ?

Regards,

Sébastien.

  • Can you give a little info on what Platform you are using?  When you say RTOS do you mean TI-RTOS?

    Judah

  • Hi !

    I'm using F28M35H52C1 on the platform TMDXDOCKH52C1.

    Yes i mean TI-RTOS.

    Regards,

    Sébastien.

  • Hi Sébastien,

    The TI-RTOS Demo for the TMDXDOCKH52C1 uses HTTP, so try importing and running that. Also, there is a wiki page that will walk you through building an HTTP server starting from an empty TI-RTOS project.

    Whitney

  • Hi !

    Thanks for your answer, i'm testing it : the debug console gives me this just above, and the server DHCP doesn't give me the IP address, can you know why ?

     

    Regards,

    Sébastien. 

     

  • Did you change the MAC address in the TMDXDOCKH52C1.c file match the sticker on the board (and thus unique)? Do you have a DHCP Server on the network that will respond to the DHCP Client request?

    Todd

  • Hi !

    Yes i changed the MAC address.

    No, nothing appear on my DHCP server.

    Regards,

    Sébastien.

  • Can you try installing WireShark on your PC and see if you see the DHCPC broadcast go out?

    Todd

  • Hi !

    I saw a request is coming on the DHCP server ; i put just above a picture of what's happening on wireshark :

    Regards,

    Sébastien.

  • Hi !

    No one to help me about my problem ?

    Regards,

    Sébastien.

  • Hi Sebastien,

    Thanks for attaching the Wireshark pic.  From that we can see that there are several DHCP discover messages that are not being answered.  A working DHCP server should reply to those messages.

    Furthermore, I see that another host on your network has been configured with the address "169.254.84.48".  The "169.254/16" subnet is a special address range.  An address in this range is typically assigned when there is a problem communicating with the DHCP server.

    Given these two observations::

        1. the NDK app is correctly sending out DHCP discover messages (but not receiving a response to them and therefor not able to obtain an IP address)

        2. Another host on your network has an address in the 169.254/16 subnet (which indicates this host also could not communicate with the DHCP Server)

    This leads me to believe that the problem is with your DHCP server.

    Fixing this could be easy if you are using a simple home network router as your DHCP server - just try power cycling the router.  Also, you should log into the router and verify that DHCP server is configured for it.

    If this is a server within a corporate network or something like that, you should talk to your network administrator about the issue.

    Steve

  • Hi !

    I tried power cycle (in case of), and i obtained the same things that before on the wireshark pic.

    After i log on my router on 192.168.1.1 and i don't see the ethernet connected ( it has a8:63:f2:00:0f:56, and i don't see it on the "connected equipments" part.

    Maybe i can enter it manually ?

    I'm very confused about why i can't make this communication...

    Regards,

    Sébastien.

  • Maybe i can add static IP without go through DHPC ?

    Well if you can help me it will be very great !

    Regards,

    Sébastien

  • You can try using a static IP. The NDK allows you to configure an IP address statically through the XGCONF configuration file (*.cfg) in your application.  This is done in the "Ip" module in the configuration (see section 1.7 Configuring NDK Modules in the NDK User's Guide for an introduction to the XGCONF configuration.

    Coming back to the router issues ... are you able to connect 2 PCs to the router?

    Do the PCs get IP addresses?

    If so, are you able to ping the router (192.168.1.1)?

    Are you able to ping from one PC to the other?

    If your router is the issue here, I won't be able to help much with that unfortunately.  If none of the above is working, then you may want to try another router.

    Steve

  • Hi !

    More than 2PCs are connected to the router.

    Each PCs has its own IP address.

    How do you ping from one PC to another ? (maybe i don't see the french for "ping", for me it's the fact to send a request, but i don't really see how).

    I just want to add i'm connected to my router by a wifi usb key, so an ethernet communication + a usb communication come for internet, maybe that's a part of the issue ?

    Thanks.

    Regards,

    Sébastien.

     

  • Moreover,

    I just want to add on cmd->ipconfig, the adress of autoconfig IPv4 is 169.254.84.48, and you said me this IP address appears when there's a DHCP server problem, so why i have this adress of autoconfig IPv4 ?

    I put just below the cmd screen :

    Regards,

    Sébastien.

  • Here is the abstract from RFC 3927:

    Abstract
    
       To participate in wide-area IP networking, a host needs to be
       configured with IP addresses for its interfaces, either manually by
       the user or automatically from a source on the network such as a
       Dynamic Host Configuration Protocol (DHCP) server.  Unfortunately,
       such address configuration information may not always be available.
       It is therefore beneficial for a host to be able to depend on a
       useful subset of IP networking functions even when no address
       configuration is available.  This document describes how a host may
       automatically configure an interface with an IPv4 address within the
       169.254/16 prefix that is valid for communication with other devices
       connected to the same physical (or logical) link.
    
       IPv4 Link-Local addresses are not suitable for communication with
       devices not directly connected to the same physical (or logical)
       link, and are only used where stable, routable addresses are not
       available (such as on ad hoc or isolated networks).  This document
       does not recommend that IPv4 Link-Local addresses and routable
       addresses be configured simultaneously on the same interface.

    Since your Windows PC cannot find a DHCP Server it is using a 169.254.xxx.xxx number instead.