Hot answers tagged

25

There is a StackOverflow question quite similar to this, Mono on Raspberry Pi. However, through my own research, I haven't been able to find anything specific to .NET, but rather just C#. You can install the runtime using APT on a Debian distro by executing: $ sudo apt-get install mono-runtime You can also (assuming you have some sort of GUI such as LXDE) ...


8

Contrary to popular belief, VB.NET compiled code runs fine on the Raspberry Pi, under Debian at least. apt-get install mono-vbnc and then run your VB exe as an argument to mono e.g. mono yourexe.exe I haven't done any performance benchmarks as I am not writing a performance intensive app but seems fine so far.


7

What you are referring to is called Software Serial, where bytes are bit banged and create the same effect as a serial port. Using a normal Linux distribution the answer is, No. The reason is because bit banging required real time processing of data, otherwise the data will just be junk. This answer at Electronics Stack shows a USB board with 4 hardware ...


7

You are going to have to restart your Raspberry Pi (probably by unplugging it, since you can't run the shutdown or reboot commands). You may have to reflash your SD card if this corrupts your image. Some process is leaking memory, so other programs can't use it. To get an idea of what is causing this, run: ps --sort -rss -eo rss,pid,command | head You ...


6

Create an init.d script to run your application you can run the mono service in linux OS by using the command mono-service [options] program.exe call this from an init.d sript Check this man page for more details about running mono service on linux http://linux.die.net/man/1/mono-service


6

.NET code which is using .NET Framework libraries can't run on Raspberry Pi as it requires an ARM compatible version of NETMF or CLR to run. As of now, Microsoft has yet to release Windows on ARM (WoA). Refer to Experiment 19 for Microsoft Research CLR works on ARM. However, running .NET code (without reference or using .NET Framework Libraries) is ...


5

After long fruitless searching, I still didn't find anything on C#/Mono. So, I had to create my own library. In case someone else is looking for a similar solution, I put it on GitHub: https://github.com/mshmelev/RPi.I2C.Net


5

Mono works absolutely fine on a Pi - we already have a tag and a few dozen questions on the topic. Getting started should be as straightforward as punching in: sudo apt-get update sudo apt-get install mono-complete


4

You need to install the mono-complete package (which includes the mscorlib.dll file); to do this enter the following at the command line. sudo apt-get install mono-complete


4

I've got a command line .NET application to work with Mono. The app is basically doing something akin to port forwarding, taking data received via the serial UART and forwarding it over TCP/IP. It uses the SerialPort, TcpListener, TcpClient and Socket .NET classes, with only minor changes needed to the SerialPort handling code. I'm using the Debian soft ...


4

Threads are within one process, so I guess you mean separate process that runs in the background (like a deamon process)? Anyway, adding '&' at the end of the command will make it detach from the terminal and run as background process. This works for everything, executable and script. Depending on the format you want it stored (the uart data), you ...


4

I would consider this to be pretty significant. It's due to Mono's lack of support for hardfp, and it affects more than just DateTime. Here's the bug as it's being tracked by the Mono project: Bug 7938 - mono doesn't work on hard float abi on ARM. If you look at the bottom of that page, you'll see that there are two other bugs that have been determined to ...


4

Did you try using a SWAP-File? http://jankarres.de/2012/11/raspberry-pi-swap-erweitern/ The Tutorial is in German but the commands should be the same ;)


4

First: create a start.sh file like this: cd /home/pi/Test mono monoApp.exe Second: make this file executable chmod +x start.sh Third: setup crontab on startup crontab -e and add reboot file: @reboot /home/pi/start.sh on bottom, save and exit, reboot


3

If you don't want to write a debian style sysv init script (see /etc/init.d/README), you can just append a line to /etc/rc.local, eg: /full/path/to/myprogram & The full path is necessary as $PATH may not be properly set for rc.local when it is run at boot (but it will be for "myprogram"). The & just backgrounds the process, allowing rc.local to ...


3

There is a project called Raspberry♯ (RaspberrySharp) At the site you find a sub project called raspberry-sharp-io which contians examples on how to use the SPI, I2C, GPIO and some other general purpose things. You can get the GPIO using Nuget Install-Package Raspberry.IO.GeneralPurpose but to use the SPI you will need to compile or add the ...


2

I don't know about .Net libraries but have you looked into overo-blinkm? It was written for controlling an RGB LED. I am sure you can tweak it meet your requirements. It is written for the Gumstix board. I was able to cross compile it for the Raspberry Pi using the native makefile available in the library. I just had to change the I2C address to i2c-dev0


2

There are allot of sound issues with the Raspberry Pi - and I mono on Pi(or any Linux actually) was no exception. There has been an issue with this and it is resolved in the master repo. How to solve the problem? You can try and build mono from the latest source or wait a while until it is pushed into the next update. But it seems mono on "wheezy" does ...


2

Update You need to add the -c option to the argument string for /bin/bash: proc.StartInfo.Arguments = "-c raspistill -o image.jpg"; I get the same cannot execute binary file when I try to run /bin/bash /usr/bin/raspistill -? from the command line. raspberrypi ~ $ /bin/bash /usr/bin/raspistill -? /usr/bin/raspistill: /usr/bin/raspistill: ...


2

You need to use RS485 for connecting instead of RS232. Then you can have single master (RPi) polling multiple slaves (AVRs) one after another in a loop. For this you can use MODBUS or some other similar communication protocol.


2

You can try and use the bash invocation read and execute -c and quoted command line (This is supposed to solve character escaping) Process proc = new Process(); proc.StartInfo.FileName = "/bin/bash"; proc.StartInfo.Arguments = "-c 'echo p1-22=250 > /dev/servoblaster'"; proc.StartInfo.UseShellExecute = true; proc.StartInfo.RedirectStandardOutput = false; ...


2

Since answers that link to other sites are discouraged, I am summarizing the procedure from the link @Senten provided. All credits to these instructions go to the author of the linked site, Jan Karres. 1) All commands should be issued as root: sudo su 1.5) If you have previously uninstalled dphys-swapfile: apt-get install dphys-swapfile 2) Set the swap ...


2

This works for me on my Pi. I'm using a version of Mono that I compiled back in December before the patch for hard-float and Mono was released. Here's the output I get. I suspect that the issue has to do with the internationalization of the decimal point character. Here is the output of mono --version: Mono Runtime Engine version 3.2.7 (master/e42840f ...


2

You could use Mono with Xamarin studio. I did some basic application in wheezy, the GUI update speed is quite low.


2

What am I doing wrong? Using /etc/profile to run a boot service. But that's not the cause of this particular problem. The Pi does not have a real time clock like standard computers. The system has no way of knowing the actual time when booted. Raspbian uses an NTP client to get the correct current time from the network, but obviously this requires a ...


2

Yep, @Aurora0001 you're right, thanks! So, I did only sudo apt-get install mono-complete which installed the Mono 3.2.8 instead the latest version. I forgot add the Mono repository to my system: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb http://download.mono-project.com/repo/...


2

It turns out I the problem was with the C# app. It was listening on the local address: IPAddress.Loopback When apparently to be accessible on the network it needs to listen on: IPAddress.Any


1

I see in the datasheet you linked to that the levels are CMOS level not true RS232 level. Have you checked that the serial hardware you use on the Raspberry Pi accepts these non-RS232 levels ? See also https://raspberrypi.stackexchange.com/questions/12850/raspberry-pi-serial-communication .


1

As always, when something goes wrong first try so simplify it: remove layers until you find two similar situations, one that works one that does not work. In this case, you should probably try things like stty </dev/ttyAMA0 # to show current port settings stty </dev/ttyAMA0 9600 # or whatever baud rate, so stty --help or man stty for other options ...


1

There is only 1 usb root hub on the pi. There is little difference if you put everything on the hub or if you use 2 hubs or whatever, except for power usage: some wifi dongle can operate directly, some require a powered hub. The Pi ports can only provide 350mA IIRC, which is about half the USB standard maximum. I can't tell you for the mice, but the wifi ...


Only top voted, non community-wiki answers of a minimum length are eligible