Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

skobyjay

Member Since 11 Jan 2013
Offline Last Active Feb 28 2013 01:40 AM
-----

Topics I've Started

Serial Communication

13 January 2013 - 08:09 PM

Hello,

 

I have communicated with devices in the past via .net and serial port communication, I'm working on communicating with this GRPS shield and trying to follow the instructions at http://www.seeedstud...re_installation I'm not having any luck communicating with the shield over serial. The device is powered, and per the instructions is connecting to the GSM network. I can control the device via pin 9 and power on and off in my application.

 

When I try to use the driver at http://netduino2seed...ew/19515#311098 and when I try to simply communicate to get an "OK" back from the shield i'm not having any luck. Based on the information in the shields WIKI I would expect to get an "OK" back based on my AT Command of "AT+CMGF=1r"

 

My jumpers are like the below here.

 

Posted Image

 

 

To simplify things, I ended up just trying to write it myself below(source code below), does anyone have ideas?

 

 

  public static string output = "";        static SerialPort serialPort;        public static void Main()        {                        // write your code here            string portName = SerialPorts.COM1;            int baudRate = 19200;            Parity parity = Parity.Odd;            int dataBits = 8;            StopBits stopBits = StopBits.One;                        serialPort = new SerialPort(portName, baudRate, parity, dataBits, stopBits);            serialPort.Open();            System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding();            byte[] bytesToSend = encoder.GetBytes("AT+CMGF=1r");            serialPort.Write(bytesToSend, 0, bytesToSend.Length);            serialPort.DataReceived += new SerialDataReceivedEventHandler(serialPort_DataReceived);            while (true)            {                     Thread.Sleep(100); // wait a bit so we get a few bytes at a time...            }        }        static void serialPort_DataReceived(object sender, SerialDataReceivedEventArgs e)        {            byte[] bufferData = new byte[20];            serialPort.Read(bufferData, 0, 20);            char[] charArray = System.Text.UTF8Encoding.UTF8.GetChars(bufferData);            for (int i = 0; i < charArray.Length - 1; i++)            {                if (charArray[i].ToString() == "r")                {                    //output += charArray[i];                    Debug.Print(output);                    output = "";                }                else                {                    output += charArray[i];                }            }        }     

 


AutoPlay Feature - Netduino Plus 2

12 January 2013 - 05:01 PM

Hello,

 

I apologize if this is a newb question.

 

Is it possible to have a Netduino execute an "AutoPlay" (similiar to having an auto.inf on a cd or usb stick) feature when connected to a PC?

 

I'm ultimately wanting to launch an HTML file hosted on the SD card or even launch a windows application hosted on the SD card so the user can make changes to the predefined settings xml file on the SD card. is this possible? I would prefer to have it hosted on the SD card for the Netduino so the user doesn't have to install anything on their PC.

 

Am I asking for too much here?


Setting System Time

11 January 2013 - 05:20 AM

Hello,

 

I just received my netduino, during a debugging session when I stepped into an interrupt port event, I noticed that the DateTime argument in that event was June 11, 2011. Is there a way to set this on the GO? I have found examples of how to do this on the Plus but haven't been able to find how to for the GO.

 

Thanks.


home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.