Main Site Documentation

RS232 module: "RS232_42.cs does not exist"


Just starting to use the RS232 module from GHI. Following the developer guide, I get the following error messages:
Locating source for ‘C:\NetMF Gadgeteer\Modules\GHIElectronics\RS232\Software\RS232\RS232_42\RS232_42.cs’. Checksum: MD5 {fb e5 62 7b af 2f 5c 7f 50 6e f9 1e eb df 6d 32}
The file ‘C:\NetMF Gadgeteer\Modules\GHIElectronics\RS232\Software\RS232\RS232_42\RS232_42.cs’ does not exist.
Looking in script documents for ‘C:\NetMF Gadgeteer\Modules\GHIElectronics\RS232\Software\RS232\RS232_42\RS232_42.cs’…
Looking in the projects for ‘C:\NetMF Gadgeteer\Modules\GHIElectronics\RS232\Software\RS232\RS232_42\RS232_42.cs’.
The file was not found in a project.
Looking in directory ‘C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\crt\src’…
Looking in directory ‘C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\crt\src\vccorlib’…
Looking in directory ‘C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\src\mfc’…
Looking in directory ‘C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\src\atl’…
Looking in directory ‘C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include’…
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: C:\NetMF Gadgeteer\Modules\GHIElectronics\RS232\Software\RS232\RS232_42\RS232_42.cs.
The debugger could not locate the source file ‘C:\NetMF Gadgeteer\Modules\GHIElectronics\RS232\Software\RS232\RS232_42\RS232_42.cs’.

I looked for RS232_42.cs on hard drive and no where to be found.

Any help is greatly appreciated.



OK, so added that to my project and then get missing

The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: c:\TFS\gadgeteer\NETMF_43\GadgeteerCore\Libraries\Core\Serial42\Serial.cs.
The debugger could not locate the source file ‘c:\TFS\gadgeteer\NETMF_43\GadgeteerCore\Libraries\Core\Serial42\Serial.cs’.

So went to get that from CodePlex…

Now have conflicts with namespace… gadgeteer does not seem very user friendly for someone getting started.


Gadgeteer is very user friendly.
Generally speaking you wont need the source files, my guess your project is throwing an error and looking for the source code for debugging.

Can you show your project code?


Source code following…

using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Presentation.Shapes;
using Microsoft.SPOT.Touch;

using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;

namespace RS232test
    public partial class Program
        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
            Debug.Print("Program Started"); 
            rs232.Initialize(9600, GT.Interfaces.Serial.SerialParity.None, GT.Interfaces.Serial.SerialStopBits.One, 8, GT.Interfaces.Serial.HardwareFlowControl.NotRequired);

            rs232.serialPort.DataReceived += serialPort_DataReceived;
   //         rs232.serialPort.LineReceived += serialPort_LineReceived                ;


        void serialPort_DataReceived(GT.Interfaces.Serial sender, System.IO.Ports.SerialData data)
            // Create a buffer that is the length of the data that is available
            // the BytesToRead variable tells us how many bytes are waiting in a buffer.
            byte[] readData = new byte[rs232.serialPort.BytesToRead];

            // Now we read the data into the buffer we just created, starting at the 
            //  first byte.
            rs232.serialPort.Read(readData, 0, readData.Length);

            String strDataRead = new string(System.Text.Encoding.UTF8.GetChars(readData));
            // Use the data that you just read however you need to



When you step thru the code what line does it error on.

Also edit your post to add code tags around your code to make to easier to read.


Thank you for helping. My problem resides in that I don’t know Visual Studio all that well. I get tripped up easily. I was going the wrong direction by breaking my code and getting lost in the source code.

I needed to open the port and also use a null modem connector.

Not sure how to use source tags but will try to figure out prior to posting code again. I agree that it helps.