• 0
Sandokan

Zedboard WiFi usage

Question

Hi, I have equipped my ZedBoard with WiFi connectivity and pressure sensors. Now I would need to transmit the sensor data via WiFi to the PC. Any suggestions?
How can I make the most of Zed's WiFi?

Thanks.

 

Share this post


Link to post
Share on other sites

20 answers to this question

Recommended Posts

  • 0

Hi @Sandokan,

I have split this comment off of your old thread onto a new thread for easier viewing.

Have you already gotten the WiFi working successfully on the Zedboard?

In terms of transmitting the data, my recommendation would be to actually send the data over serial/ethernet/other wired connection rather than WiFi since my understanding is that most streaming of data over WiFi is actually downloading data from a server/website that is storing the data (which the Zedboard would need to host/upload to) rather than a direct transfer.

Thanks,
JColvin

Share this post


Link to post
Share on other sites
  • 0

The Zedboard connects correctly to the network.
By necessity I have to send the data collected by my sensors in real time on cloud. How should I proceed.
Also as a first test I tried to save data on an SD card mounted on the pmod SD. But on the SDK does not even work the basic function suggested by the example in the driver folder that creates a .txt file and writes "it works". Where am I wrong?
To configure the Pmod SD I used the tutorial https://reference.digilentinc.com/learn/programmable-logic/tutorials/pmod-ips/start

Thanks!

Share this post


Link to post
Share on other sites
  • 0

Hi @Sandokan,

What do you mean by the SDK example not working for the Pmod SD? Do you get an error associated with it? What Pmod port are you using and which version of Vivado do you have?

Thanks,
JColvin

Share this post


Link to post
Share on other sites
  • 0
  • I'm using Vivado 2017.4
  • The program I load in SDK (it is present in the example folder, it does not perform any function) is:

#include "PmodSD.h"
#include "xil_cache.h"

DXSPISDVOL disk(XPAR_PMODSD_0_AXI_LITE_SPI_BASEADDR, XPAR_PMODSD_0_AXI_LITE_SDCS_BASEADDR);
DFILE file;

// the drive to mount the SD volume to.
// options are: "0:", "1:", "2:", "3:", "4:"
static const char szDriveNbr[] = "0:";

void DemoInitialize();
void DemoRun();


int main(void)
{
    Xil_ICacheEnable();
    Xil_DCacheEnable();

    DemoInitialize();
    DemoRun();
    return 0;
}

void DemoInitialize()
{

}


void DemoRun()
{
    FRESULT fr;
    u32 bytesWritten=0;

    //Mount the disk
    DFATFS::fsmount(disk, szDriveNbr, 1);

    if ((fr = file.fsopen("newfile.txt", FA_WRITE | FA_CREATE_ALWAYS)) == FR_OK){
        file.fswrite("It works!\r\n", 11, &bytesWritten);
        xil_printf("OK!");
        file.fsclose();
    }
    else {
        xil_printf("NO!");
    }


    while(1){
    }
}

  • The Pmod port i'm using is JC

 

Thanks.

Share this post


Link to post
Share on other sites
  • 0

Hi @Sandokan,

One of my co-workers was able to verify the Pmod SD IP core with the Zedboard. That project is available for download here.

Let me know how that project goes for you.

Thanks,
JColvin

Share this post


Link to post
Share on other sites
  • 0

Hi @Sandokan,

It doesn't look like this is explicitly called out in the tutorial, but did you put the needed materials onto the SD card itself? It looks like in the Pmod WiFi IP, there is a set of materials that you will need on the SD card under PmodWIFI_v1_0>drivers>PmodWIFI_v1_0>examples>HTTPServer>CopyTheseToYourSDCard?

Thanks,
JColvin

Share this post


Link to post
Share on other sites
  • 0

Hello @Sandokan,

I just ran through the project myself and everything ran smoothly (bitstream generated, hardware exported, etc), until I got to the point when I tried to go to the hosted IP address to find the page which did not load for me either. I'll need a little more time to look through this to see what needs to be done differently. One potential issue that I can forsee is that because the Zynq boards already have an SD card reader, there may some confusion internally in the design there as to which SD port it's working off of, but we'll see.

Thanks,
JColvin

 

Share this post


Link to post
Share on other sites
  • 0

Hi @Sandokan,

I was able to get the HTTP Server example working with the Zedboard. The one major difference from the video is I use the SD card reader on the Zedboard. Here is the complete project. I have attached a screen shot of the block design. With the zynq core you run block automation without changing anything and then click into the zynq core. You select interrupts->fabric interrupts-> PL-PS interrupt ports->IRQ-F2P[15:0] . Connect the WF_interrupt on the Pmod WIFI IP core to the IRQ-F2P[15:0] on the ZYNQ core. Then I dragged the LED from the board tab on to the block design. Next I then added the switches to the same GPIO IP block. You need to then run connection automation and create a wrapper. Next you generate a bitstream. Export the hardware including the bitstream and launch SDk from Vivado. In SDk you create an application making sure to select c++. Copy the files as directed in the video. You can look at the deWebIOServerSrc.cpp in my project to see how I added the leds and switches. All that you should need to do then is add your modem login and password to the HTTPServerConfig.h.

cheers,

Jon 

ZED_WIFI_SD_BD.jpg

ZED_WIFI_SD_BD_2.jpg

Share this post


Link to post
Share on other sites
  • 0

I had done everything in exactly the same way, enabling the interrupt and fixing the file for adding the pins, but I used the external pmodSD and it did not work. Following your instructions everything works very well.
Thank you so much.
A question: in the example I can turn on and off the LEDs of the zedboard thanks to an interface in html. Is it possible to create a similar interface to command a pmod?
In my case, I would just like to display the values of some pressure sensors.

Share this post


Link to post
Share on other sites
  • 0

Hi @Sandokan,

We have not implemented this type of project but I do not see any reason why you would not be able to post values from a sensor on a dynamic web page. Here is a link to a stackoverflow forum thread that discusses this. Turning off and on a pmod might be a different story. What are you trying to do specifically?

thank you,

Jon

Share this post


Link to post
Share on other sites
  • 0

Hi @harika,

Welcome to the forums. If you are using the Digilent Board files and are only using the digilent Pmod IP Cores and assigning them to a Pmod port through the board tab such as JA or JB then you do not need to use an XDC file. The board files/Vivado library handles the XDC. Please Attach a screen shot of your Block Design and wrapper file.

thank you,

Jon

Share this post


Link to post
Share on other sites
  • 0

Hi @harika,

From your screen shot you have 2 design sources(block designs). Please delete the WIFI_wrapper and select the box having it permanently remove files from the project. Next right click on PMOD and select create a wrapper. Then generate a bitstream.

thank you,

Jon

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now