LinuxIP Communication using CASP

This example project demonstrates how to establish communication between the target board that supports LinuxIP block such as Raspberry Pi-4 or any Linux platform target supported by CASP and the host (native) PC. We try to generate a sine wave source and transfer it from the target board to the host PC through WiFi and plot the signal on the host PC. UDP protocol is used for communicating between the target board and the host PC.

Hardware Required

Raspberry Pi-4 is used in this project. However, any similar platform supported by CASP can be used.

Description

Connect the target and host through WiFi as shown in below figure

Following are the steps to properly program Raspberry Pi-4 Target.

· Setup the target board as shown in our video tutorial ‘Single Board Computers’. Link: https://youtu.be/IlJL3tXhdeA

· Run CASP and load the ‘target_model’ project.

· Open Home->Simulation->Setup Simulation Parameters menu item. Under TargetHW->General tabs set ‘Remote Build/Deploy IP Address’ parameter to the IP address of the target and set ‘Target Hardware ID’ as explained in our video tutorial.

· Click Run button to build and run on the target board. Screen shot of the target after successful execution is shown below

Following are the steps to run the native model on the native PC

· Load the ‘native_model’ project and open the ‘native.wsp’ workspace file. Double click on the ‘SimPanel IP’ block and set Remote IP address shown in below figure.

· Run the model by clicking on the Run button. A simulation panel window should open and communicate with the board.

· Screen shot of the target and native simulation panel windows is shown in below figure.

References

Please go through our video tutorials, tutorial projects and CASP main documentation for getting started with CASP.