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............
#1
Posted 04 February 2013 - 04:45 AM
#2
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
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
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.
- jasperbagyenyi likes this
#5
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
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
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
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
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.
- NooM likes this
#10
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
Posted 26 February 2013 - 09:46 AM
why do you need that...what would be your preferred way to connect to it?
#12
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?
Also tagged with one or more of these keywords: c#
Programming Languages and Tools →
Visual Studio →
Deploy with custom software (without VS)Started by orenduino, 27 Dec 2015 deploy, c#, custom deploy |
|
|||
Hardware →
Netduino Plus 2 (and Netduino Plus 1) →
POST request to Twitter with Netduino Plus 2Started by ioexception, 20 Dec 2014 sockets, c#, twitter-api |
|
|||
General →
Project Showcase →
Neduino object oriented motor control in C#Started by NameOfTheDragon, 05 Jun 2014 netduino, netduino plus and 8 more... |
|
|||
General →
General Discussion →
Is it possible use any ssh library in a Netduino project?Started by arrudeboy, 24 Apr 2014 c#, visual studio, netduino plus |
|
|||
Programming Languages and Tools →
Visual Studio →
Renci.Ssh library does not work in NetduinoPlus Application (VS2010)Started by arrudeboy, 18 Apr 2014 visual studio, netduinoplus, c# and 3 more... |
|
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users