Also, I'm not 100% sure about this, but I believe you need to send Carriage Return AND Line Feed (vbCrLf) over the serial connection.
- Netduino Forums
- → Nighthawk's Content
There have been 19 items by Nighthawk (Search limited from 11-December 18)
Please note that after powering on the SIM900 (using pin D9), you need to WAIT till you get a "CALL READY" message before using any commands that use the SIM card. It is written in the IComSat manual.
This usually happens around 7-10 seconds after powering up the SIM900.
Bit of a newbie question again.
I'm outputting the result of Debug.GC occasionally.
I'm running a plain Netduino 2 (which allegedly has 60K of RAM according to the tech specs on the site) but Debug.GC reports around 71000 bytes with my current (medium sized) application running
Is there something blatantly obvious that I'm missing?
Well, just as I suspected, the problem with writing to the SD card was totally caused by me . It all works perfectly now. Just need to treat it with care. I implemented a Queue which everything writes to, then a dedicated SD card thread simply processes that queue at its leisure at regular intervals.
Having everything try to write to the SD card (even in different files) just like it always worked on desktop hard disks just didn't give the sort of reliable results that I could feel comfortable with.
Quite a few times I mistakenly connected RX pin to RX of USB-TTL cable (and TX to TX)... even when there was stuff that was supposed to be sent/received over the cable (until I figured out why it was not working!). Never had an issue.
Welll I set everything up and it all worked just like you said. I didn't even have to switch SPI configs as all I have is one SPI device (shift register) attached to the bus other than the SD card.
I did feel the SD card implementation is a bit... shaky, though I've seen other users with some issues with the SD card... such as not writing the file to the card unless Unmount is called and stuff like that, so I know I'm probably not alone. Mine did write without calling Unmount..... sometimes. Other times not but it might have been user error. I didn't spend much time looking at this though (it got late for my bedtime ) so I am still blaming myself for now!
Yes I am aware of the .NET MF Toolbox. I'm using many bits of it already!
Just wasn't sure of how I would swap the SPI config in and out for the SD card.
I will try out your example in my project and will report back.
Thanks again for taking the time to help
Bit of a newbie question on SD cards and SPI.
I have an SD Card shield which works brilliantly.
Mount the SD, read/write, unmount. All good.
But how would I go about attaching other devices to the SPI bus?
In theory the netmf toolbox MultiSPI would suit me well but the SD card is not a normal SPI configuration from what i can see (you pass slave select pin and spi device in mountSD not through a normal SPI config). So how would I switch SPI configs?
Anyone ever dealt with this?
I managed to work around this issue by downloading the source code, updating the references in Toolbox.NETMF.Hardware.Netduino to use the 22.214.171.124 assemblies which I have on my machine, recompiling the toolbox and using the newly recompiled DLLs in my project
Not entirely sure why this happened, maybe the assemblies in the actual 4.2 SDK are different to the v4.2 assemblies in the v4.3 SDK? I only have v4.3 SDK installed. Maybe Stefan could look into this.
I'm using VS2012 on Win8 Pro. I'm developing on a Netduino 2 with 4.2 firmware.
Hence I'm targetting .NET Micro Framework 4.2 in Visual Studio and using assemblies from the v4.2 of Netduino SDK and similarly for the NETMF toolbox.
If I add references to Toolbox.NETMF.Hardware.Netduino, when I try to debug I'm getting the following error:
Thank you very much. Very insightful
Yes I did pretty much get to grips with the SIM900 now. I'm getting round the power-up problem using a relay as mentionedd before. It is very cumbersome, and wastes a GPIO pin, but it will do for now.
I also managed to hit the USB power limit finally. Determined to find the limit, I dropped in a shift register with LEDs attached ... once I got to 8 LEDs on the SIM900 wouldn't power on any more
Thanks for your reply.
I did try USB power without debugger. It still fails. Which confuses me even more
I also saw the power requirements (2A) and also said to myself "No way will a netduino supply that power". However I have encountered zero issues running directly off the USB cable. It powers up, sends and receives SMSes and phone calls seamlessly. I also have a relay shield which is operating off the same Netduino (trip relays depending on the SMS received) which I'm sure zaps some power too when energizing the relay coil. Everything works perfectly together.
I haven't tried GPRS though... maybe that's where I might encounter power issues
I'm not very experienced in the schematic design etc. I'm a programmer by trade. Electrical engineering isn't my strong point so I won't really delve into cutting traces etc
As a workaround it is very easy to feed a 5V line through a relay and into PIN9 on the shield. And simply use the netduino to trip the relay for 2 seconds. Not clean, but it will do for now...
I've been in contact with IComSat regarding this issue. I still don't have a 100% definite answer but it is most likely related to the netduino's 3.3V GPIO.
If I power the netduino independently without a debugger attached (hence reproducing the problem described), and I then MANUALLY feed a 5V feed to PIN 9 on the shield, the SIM900 powers up without issue. So basically, setting PIN 9 on the netduino to HIGH doesn't work, while jumpering a 5V feed to PIN 9 works.
What baffles me is why the thing works totally without issue (and without fail!) with the Visual Studio debugger attached. Does the Netduino somehow use 5V GPIO when a debugger is attached?
I understand the IComSat shield was designed for the Arduino (hence 5V GPIO), so I'm not too worried as I was aware of the "risk" before buying, though I'd really love to know the definite reason why this happens. At least I have a workaround to get the thing powered up via software
Really stumped on this one. Ran out of ideas.
I'm using an IComSat v1.1 GSM shield on a plain vanilla Netduino 1 and all is working fine. The only problem is powering up the SIM900 module. This version of the shield allows software powering up, by writing pin 9 HIGH for a short interval.
If I use visual studio, press F5 to start debugging (without any breakpoints whatsoever), it all works fantastic. Turn on and turn off both work flawlessly.
If I then stop the debugger, remove the USB cable, and power the Netduino independently, power up doesn't happen. I tried flashing the netduino LED to make sure I'm passing through that bit of code and sure enough it flashes while sending the power up pulse to pin 9, but the shield doesn't turn on. Pressing the actual physical power button on the shield instantly turns the shield on.
Connect the USB cable and run via F5 again and everything works perfectly via software.
I tried everything from waiting 10 seconds after powerup before turning on the shield, to implementing a retry mechanism every 10 seconds. I sent 10 power up pulses 10 seconds apart... a total of almost 2 minutes. Shield still didn't power up.
What does running through Visual Studio debugger do differently to running on a 12V 2A power supply?
Really giving up on this
Anyone has any ideas before I whip out the soldering iron and use a relay in parallel with the shield's physical power button controlled via the netduino?
Thanks and Regards,
Thanks guys. Guess that clears most of the development questions.
Regarding updating the firmware. This is a new PC (old one lost an encounter with coffee ) and my Netduino only has firmware version 4.1. I would like to update this to the latest stable firmware 4.2.
I only have VS2012 installed so I can only install NETMF 4.3 (which I have done successfully). Attempting to install NETMF 4.2 gives an error that VS2010 is required.
Can I flash the firmware 4.2 on to my Netduino using MFDeploy from NETMF 4.3? The instructions here (http://forums.netdui...-v420-update-1/) specify NETMF 4.2 and Netduino SDK 4.2.
I could install VS2010 if really necessary but I was trying to avoid it.
I have a plain vanilla original Netduino. I used to program my netduino using an old WinXP machine with NETMF 4.1 and VS2010. It has never had the firmware updated.
Well, time has come to use the Netduino for something else. Thing is now I have a Win8 Pro 64-bit machine with VS2012 Ultimate. I still don't have NETMF or Netduino SDK installed.
While we're at it I would like to upgrade the firmware too.
So what's the best way to go about it? Should I use NETMF 4.2 to flash the firmware to v4.2 and use Netduino SDK 4.2?
Or could I use NETMF 4.3 straight away?
I've read the guide about upgrading to 4.2 but not sure if Win8 and NETMF 4.3 will do the job correctly too.
Thanks and Best Regards,