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.
Photo

Netduino Plus with arduino gps gsm with SIM548C module?

c#

  • Please log in to reply
11 replies to this topic

#1 salim3

salim3

    New Member

  • Members
  • Pip
  • 7 posts

Posted 04 February 2013 - 04:45 AM

i would like to use the Netduino Plus microcontroller as interface betweeen the GPS/GSM modem. Netduino Plus will first receive the GPS signal from GPS receiver and send the related information to GSM modem. i totally got no idea how to start. Please give me some guide. Thx............



#2 nhale

nhale

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationHeidelberg, Germany

Posted 05 February 2013 - 11:26 AM

Hi,

 

I have done something similar, where I just create two Threads. One for the class with the GPS functionality and one for the class with the GPRS functionality.

The GPS class has an event which is called when there are new valid data available.

In the Main the event is registered to a method which is executed.

In this method I fill up a queue.

Then there is the GPRS thread which repeatingly checks if there are data in the queue, these will then be taken and send via GPRS.

The queue and its write and read acces  is protected with a lock and once data are queued by the GPS an AutoResetEvent is raised.

 

This is the basic idea behind it.

 

For the GPS you can find some sample code to start and modify to your needs here:

http://blog.bobcrave...g-the-netduino/

 

For the threading a simple example here:

http://forums.netdui...=+gps +receiver



#3 salim3

salim3

    New Member

  • Members
  • Pip
  • 7 posts

Posted 15 February 2013 - 04:20 AM

hai nhale,

 

thx for the information that u provide.

 

i gt few question wan to ask:

1) at the properties, under .Net micro Framework, the trasport we need to put serial or USB?

2) why when i type the "SerialPort serialPort = new SerialPort("COM1", 4800, Parity.None, 8, StopBits.One);",

there are red line under the SerialPort.

3) can u giving me your email address? if i gt any problem, may i seek help from u?

  my email address is sy_ai@hotmail.com.

 

thx



#4 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 15 February 2013 - 09:59 AM

2) why when i type the "SerialPort serialPort = new SerialPort("COM1", 4800, Parity.None, 8, StopBits.One);",

there are red line under the SerialPort.

 

 

you have to add a reference: Microsoft.SPOT.Hardware.SerialPort

maybe also system.io

 

and than using System.IO.Ports;

 

 

than your serialports will work.



#5 jasperbagyenyi

jasperbagyenyi

    New Member

  • Members
  • Pip
  • 2 posts

Posted 15 February 2013 - 10:28 AM

you actually have to HARD CODE the system.io.ports .  don't expect it to be imported automatically...



#6 salim3

salim3

    New Member

  • Members
  • Pip
  • 7 posts

Posted 15 February 2013 - 01:05 PM

Noom: i add the using using Microsoft.SPOT.Hardware.SerialPort; but there is still have red line under the SerialPort. Whatelse i can do? thx lot.........

 

jasperbagyenli: how to hard code it? thx.........



#7 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 15 February 2013 - 05:24 PM

Microsoft.SPOT.Hardware.SerialPort

.. not using.. add this toi references at the right side...

properties.. references ...

 

than add using System.IO.Ports; where your class is



#8 salim3

salim3

    New Member

  • Members
  • Pip
  • 7 posts

Posted 18 February 2013 - 01:45 AM

NooM, take a lot....there is no red line under the serialport.

 

however, we have to control the netduino Plus through serial port or usb?



#9 nhale

nhale

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationHeidelberg, Germany

Posted 18 February 2013 - 12:44 PM

Hi salim,

 

there is a difference of the ports/pins and the Micro-USB connector on the board.

 

- Pins + Ethernet ==> You can use in your application and write code to use them e.g. SerialPort...

- Micro-USB ==> Only usable for deploying and debugging your app. This is what you have to select in the project properties in the drop down.

 

In the project properties the "serial" menuitem is because the .NET Micro Framework can be used for different types of devices and some only have a RS-232 connector instead of USB.

 

 

Regarding the problem with the references, I think you are new to Visual Studio, you should maybe start to write a simple Windows console application, to get familiar with Visual Studios features and funtions and debugging. With Google you should find some basic tutorials. Then programming for the Netduino is easier and makes more fun.



#10 salim3

salim3

    New Member

  • Members
  • Pip
  • 7 posts

Posted 23 February 2013 - 01:29 AM

hai,

 

is it possible to send the AT command to the GSM modem through Netduino Plus without serial port?



#11 nhale

nhale

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationHeidelberg, Germany

Posted 26 February 2013 - 09:46 AM

why do you need that...what would be your preferred way to connect to it?



#12 salim3

salim3

    New Member

  • Members
  • Pip
  • 7 posts

Posted 03 March 2013 - 07:18 AM

hai nhale,

 

since i using arduino GPS/GSM modem with sim548c, i use a usb to TTL coverter to create a serail port for my modem. the light indication of GSM was ON (which means it ready to receive the signal).

 

now my problem is when i try to send the AT command to my GSM, i never receive the response of "ok". i try to change the baund rate. the result still the same,

 

what else i can do?







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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.