Post Go back to editing

Matlab to phaser kit communication error

Thread Summary

The user encountered issues running MATLAB code to communicate with a phaser board, which were resolved by addressing an Ethernet address conflict and ensuring the correct 5V/USB-C power adapter was used. The phaser board now responds to pings and MATLAB can communicate with the beamforming chips directly. The user bypassed an error by assigning specific addresses and successfully generated a plot, though it was not accurate.
AI Generated Content
Category: Hardware
I am trying to run the following codes in matlab
After bf(), I get 
Trying my best to resolve it but cannot seem to figure out. 
Parents Reply Children
  • Ok, I will clear it up. I tried isolating the problem. I have figured out a bit that pc to pi communication is an issue while pluto responded to pings. I believe once the pi responds to pings, I can move to matlab for communication, which could be failing due to this. I also want to confirm one thing, If I ping pi, I need to turn off wifi on my system to let the ethernet work right? I am not so proficient in python. I would like to stick to matlab.

    I also noticed something, every time I try to address one problem regarding the pings, it gets resolved and another arises. Due to this toggling, I lost the response to former ping for iio which DID in fact respond with both ADAR. I am trying to replicate it again. 

    Here is the response to the ping to pi, this is a repetitive problem that I am facing.

    UPDATE: I was successfully able to solve the issue. I found out that the pc was talking to itself from the ip address and changed the address of the ethernet port. There was an issue with two ports having the same ip address cauing this confusion. Later, pinging the pi worked. I have also made suitable changes to the matlab code provided to use pi to talk to the beamforming chips directly instead of pluto. I apologize for any confusion.

    Also, I did get this error  several times, but I bypassed it byy assigning the specific addressed like (below)

       

    Please let me know if this is valid. I was able to generate the plot on matlab (although not accurate)

  • Great! Sounds like you are up and running. An Ethernet address conflict is certainly a logical explanation.

    And I'd have to defer to the MATLAB experts, but your appending of the Pluto's port number looks valid. The way this works is the phaser Raspberry Pi runs two instances of iiod, one for the onboard ADAR1000s, PLL, monitor chip, and GPIOs, and a second instance to forward the Pluto's USB backend over the network connection, using port 50901.

    Re: wifi - an anecdote from my own experience - during development, I would often connect my phaser to my personal WiFi for downloading various Linux and Python packages, since my company laptop does not allow me to forward its internet connection. At one point I noticed that a certain script running on my laptop that plotted out beam patterns either took 4 seconds or 8 seconds, nothing in between. Turns out - the phaser had both wired and wireless connections, and phaser.local would resolve to one or the other, arbitrarily! And it was not so much that the Ethernet connection was slow, rather, each and every iio attribute read / write was a new transaction, with all of its overhead.

    So indeed, you can use either, but it's best to explicitly use one or the other.