Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

Raspberry Pi Executable

We have a small application which converts UPD Multicast data packets into normal UDP messages and passes them on to another system.

The code works fine in the LabVIEW environment, but when built into an executable and set to run on Rpi startup, it doesn't see the Multicast data packets.

We think it's probably a permissions thing on the Rpi, not allowing the Multicast when running as a different user.

Anyone else had a similar problem ?

thanks

Adrian

SSDC Ltd

0 Kudos
Message 1 of 8
(4,633 Views)

Adrian,

 

What do you mean by "works fine in the LabVIEW environment"?  Do you mean your program runs on your PC without a Raspberry Pi involved at all?

 

Assuming that is what you mean then the next step would be to run the VI on the Raspberry Pi in debug mode.  You can debug VIs on the Raspberry Pi with the same techniques that you can debug VIs in LabVIEW RT, https://www.ni.com/documentation/en/labview-comms/latest/rt-targets/debugging-rt-application/.  Depending on your project you may just need to press the run arrow on your VI and it will deploy down to the Raspberry Pi so that you can debug it.

 

When debugging your program like this what do you see?  Are there any errors?  Note that only a subset of functionality from LabVIEW is compatible with the Raspberry Pi so it is completely possible that your code may error out when running on the Pi.

 

I know UDP in general works with the Raspberry Pi as others are using it but I don't have any personal experience with this on the Pi.

David Wilt
The New Standard LLC
0 Kudos
Message 2 of 8
(4,542 Views)

Thanks for your reply David.

Yes, when I say 'works in LabVIEW environment' then this is in debug mode.

So, the UDP Multicast is still going through the Rpi and is picked up fine in debug mode........it just doesn't work as an executable.

I know the executable is running OK because it still pushes out normal UDP packets as a 'watchdog'.

I'm sure it must be something to do with permissions on the Rpi (Raspbian)

 

0 Kudos
Message 3 of 8
(4,493 Views)

OK that is tricky then.  I am not sure about the RPi permissions so maybe someone else can comment on that.  My only suggestion would be at add some logged to see if you can get more information on what is happening.

David Wilt
The New Standard LLC
0 Kudos
Message 4 of 8
(4,489 Views)

Hi, 

Is it possible that your start-up application is running before the Raspberry Pi has started the network device and obtained an IP address?

There is an option in raspi-config to wait for network at boot.

 

 

Message 5 of 8
(4,478 Views)

Hi Adrian,
I ran a test on a PI 4.

A ping test vi fails on start-up if I do not select the "Wait for network" option. 

 

0 Kudos
Message 6 of 8
(4,405 Views)

I had the same problem. My VI translates some Modbus TCP stuff and worked without a problem for about one year as a startup executable on the pi. Then I changed a little thing not network related and it did only run when in debug mode. "Wait for network" option in raspi-config solved the problem.

It should be mentioned in the linx tutorial.

Thank you!

0 Kudos
Message 7 of 8
(3,443 Views)

Thanks, AndyLB! Your post saved my day!

0 Kudos
Message 8 of 8
(2,092 Views)