Show Posts
Pages: [1] 2 3 ... 12
1  Using Arduino / Project Guidance / Re: More interrupts for the Mega 2560 on: September 17, 2014, 05:40:16 am
Can I continue to receive serial data on port 1, whilst at the same time attaching an interrupt to pin 18 (interrupt 5)?
I don't think so - but I could be wrong.

My guess is that as soon as I initialize port 1 with Serial1.begin() then both pins are reserved for communication, and any attempt to attach an interrupt to one of them would cause problems.
I think you're right, but can't you experiment and see what happens?
2  Using Arduino / Programming Questions / Re: GSM module SM5100B-D - meaning of error message 'SIM Failure' on: June 19, 2014, 04:45:06 am
Nice name.
It was that or Incontinentia Buttocks.

So how many times do you get the erorr message when you send from your own phone to your moms? Not from the rig your having trouble with but your day to day phone?
My day-to-day phone is a smartphone. If I use that to send a message to a long-time disconnected phone (or a made-up number) then I don't get an error message just a red blob next to the message and an exclamation mark. The true error message (the low-level CME code) remains hidden.

3  Using Arduino / Programming Questions / Re: GSM module SM5100B-D - meaning of error message 'SIM Failure' on: June 19, 2014, 03:53:16 am
The rx signal strength does not mean you need less power when transmitting!
Doesn't it? I understood that GSM devices would work out how close they were to a base-station by looking at the signal strength, and then adjust their output power appropriately to conserve power - that's why if you take your phone to a remote location the batteries go down more quickly.

And I do think its you not the network!
Could be, I can solder as badly as the next guy! But if it really is a hardware issue, why do I get it with different SIMs and different shields? and why is it only when I attempt to send an SMS? All the other actions/commands that involve the SIM card work perfectly.

I've done some experimentation. If I send a message to my switched-off phone, then I still get the message at about the normal frequency, however if I send it to my moms mobile phone (that has been switched off and left in a draw since I gave it to her) then I get the message almost every time I attempt a send. I also get the message if I send to a random made-up phone number.
4  Using Arduino / Programming Questions / Re: GSM module SM5100B-D - meaning of error message 'SIM Failure' on: June 18, 2014, 08:23:39 am
Thanks for the suggestions.

I don't think it's dodgy hardware - I get the same issues with different SIMs, and with different shields. Also, since I can successfully receive, read and process SMS messages, my guess is that the coms between the SIM card and the GSM module are OK.

I hadn't though about the power issue before, but I do get a high signal strength, which means (I think) that my transmit power doesn't have to be very high to transmit.

I've been thinking that maybe I get the message if the phone I'm sending to is out of range or off the network or switched off?

Does anyone know how GSM networks work? If I attempt to send a message to someone who's phone is switched off, I assume the network will cache the message, and then deliver it as soon as it detects the receiving phone is back on the network? Or does it reject the message when it gets sent and cause the transmitting module to return an error?
5  Using Arduino / Programming Questions / GSM module SM5100B-D - meaning of error message 'SIM Failure' on: June 18, 2014, 02:58:07 am

Does anyone know what is actually behind the 'SIM Failure' error (CME code 013) from the SM5100B GSM module?

I get it occasionally when I try to send an SMS message. I know the obvious answer is "there's something wrong with the SIM card" but there must be more to it than that. I can happily talk to the SM5100B module, I can read the IMSI and IMEI, I can receive and read SMS messages and I know I have plenty of credit and I know I'm registered to the network.

All of this suggests everything is working fine, but when I send a message I get frequent failures (about 1 failure for every 5 attempts), the message is always just a simple 'SIM failure' nothing useful ! I've tried different SIM cards, and I've tried different GSM modules, but there seems to be no observable pattern in the failures.

The fact that I can receive and read SMSs suggest there's no physical problem with the card, (unless there some unique functionality of the card that only comes into play during a send)

Currently my best guess is that this is general purpose error message used for any error that doesn't fit into any of the other 100 or so pre-defined catogories. I've run out of (or ruled out) things I can think of that might be wrong at my end, and bearing in mind that I normally get the error about 12-15 seconds after trying to send the message I'm wondering if it's actually generated as a response to something happening on the GSM network.

Does anyone have an other suggestions? or, even better, does anyone know what the cause is?

6  Using Arduino / Programming Questions / Re: Progmem size limits?..... warning: internal error: out of range error on: June 17, 2014, 04:24:51 am
Thanks Pyro,

this subject is extending well beyond my abilities, a simple low-level FAQ or tutorial would be most welcome!

7  Using Arduino / Installation & Troubleshooting / Re: Master reset for an Arduino Mega. on: June 16, 2014, 12:53:21 pm
SD card needs more 3.3V current than the regulator can supply.
Thanks, I've already learnt this lesson! The SD card is on a shield that supplies the extra current from it's own 3.3v regulator.
8  Using Arduino / Installation & Troubleshooting / Re: Master reset for an Arduino Mega. on: June 16, 2014, 11:08:45 am
Maybe ............... Attached sensors/peripherals are drawing to much current
There may be something in this. The board has an SD card and a GPS module on it, when I remove them the uploads seem (slightly) more reliable.

I believe that the peripherals are all working ok and wired correctly, since the project works fine once the code is finally loaded. So I guess the upload of new code to the arduino takes more current? and if the peripherals are also drawing a lot of current then there's a chance of the USB port being overloaded?
9  Using Arduino / Installation & Troubleshooting / Re: Master reset for an Arduino Mega. on: June 16, 2014, 08:47:32 am
thanks guys,

The current issue has now resolved itself, I will bear some of these tips in mind next time the problems occur.

The thing here is to find out what is causing the recursive rebooting.
This is quite a simple really - cr4p coding on my part. The problem is that once the arduino gets trapped in this loop I can't over-write it with a working sketch.

One of the problems is that the issue is very erratic - sometimes it cause big problems, other times it just sorts itself out, seemingly without any changes from me. So for example I tried swapping the USB lead, and suddenly it worked! - but then 2 minutes later the problem re-occurred, so obviously the USB lead wasn't the problem after all.

10  Using Arduino / Installation & Troubleshooting / Master reset for an Arduino Mega. on: June 16, 2014, 06:41:34 am

I have an occasional (but very annoying) error with arduinos that suddenly refuse to accept a new upload. What seems to happen is this, occasionaly I will produce a dodgy sketch that will run maybe the first couple of lines, and then 'reboot' and start again. The first line is normally something like Serial.println("starting sketch abcd"); so what I see when I monitor the serial port is just the phrase "starting sketch abcd" re-cursing up the screen ad-infinitum. Not a big deal in itself, but the problem is that this recursing code seem to lock the arduino and somehow prevent a working sketch from uploading. If I fix my sketch (or find a sketch known to work) and attempt an upload, then the sketch will compile ok, start uploading and then just hang before eventually producing a time-out error if I leave it long enough. There seems to no cure except for infinite patience, after maybe a couple of dozen attempts, constant unplugging and re-plugging of the arduino, or maybe even a re-boot of the computer then I eventually get lucky and the uploads start to work again. Since this has happened on both my arduinos I guess this is some sort of system error rather than just a faulty unit.

So, my first question is is my diagnosis correct, is the recusive re-booting of the arduin preventing it accepting uploads, and if so, is there a cure for it?

11  Using Arduino / Programming Questions / Progmem size limits?..... warning: internal error: out of range error on: June 16, 2014, 04:00:43 am

I’ve just started getting an error message I’ve never encountered before (and believe me, I’ve encountered a lot!)....

SD\utility\SdFile.cpp.o:(.rodata._ZTV6SdFile+0x6): warning: internal error: out of range error
core.a(HardwareSerial.cpp.o)smiley-sad.rodata._ZTV14HardwareSerial+0x6): warning: internal error: out of range error
I use quite a lot of progmem constants for defining errors and log messages, and I first encountered this error when I added a couple more of them. Experimentation indicates that if I remove some of these constants from anywhere in my project then the error disappears, and if I add them back again the error re-appears.

The project is quite large (over 30 libraries, compiles to 136k), each library has been tested and used on it’s own, and it’s only when the entire project gets compiled that I get the error.
Other details....
  • I’m using a Mega 2560,
  • The error message refers to standard arduino library files NOT stuff I've written myself.
  • All my libraries have worked together in other projects without problems.
  • I have about 20k of progmem constants.
I define my progmem constants like this....
const prog_char ERR_MESS_01[] PROGMEM = "ERROR – Battery voltage dangerously low.";
and use it like this....
      strcpy_P(_messBuff, ERR_MESS_01);
where _messBuff is a predefined array of characters of fixed length, and logging() is my function for echoing to screen and writing to an SD card.

Am I right in thinking there's a limit to the amount of data I can put into PROGMEM? If so, is there a work-around or alternative technique I can use to achieve the same thing? I find it really useful to be able to log error messages to SD card, and I really don't want to have to remove a lot of very useful data just because of some memory limits.

12  Using Arduino / Networking, Protocols, and Devices / Re: Configuring SR-92 GPS module. on: June 16, 2014, 03:40:10 am
Have a look at this datasheet.... (pages 4, 5 & 6)*xJNecJYvcEKZofuHJcZ3wnTMuZL5FeJC535I6DJbBZZE7FpJwnQPxgT9yKLCibZaZj/NMEA_Packet_Userl.pdf

It give details of how configure this GPS module......

Unfortunately, this module is NOT the one currently soldered onto my project - hence my inquiry about the SR-92.

Hope this is useful to you

13  Using Arduino / Networking, Protocols, and Devices / Re: Configuring SR-92 GPS module. on: June 14, 2014, 04:56:14 am
Source is the GPS satellite!!!
No. The sentences are generated by the GPS module, based on timing information from the satellites. Many GPS modules allow you to choose which sentences will be generated. Unfortunately it seems the SR-92 isn't one of them.
14  Using Arduino / Storage / Re: SD card timing questions. on: June 10, 2014, 05:36:14 am
You will lose all data since the last flush() or close().  This  is when the file's directory entry is updated.

Is there a limit to how much data I can write to a file before doing a close() or flush()?. Can I open a file and write (say) 10 Mbytes of data and then do a close(), or do I need to do flush() periodically?

I guess I need to code some automatic flushing to cope with situations where power might fail un-expectedly, otherwise I'm likely to loose data.
15  Using Arduino / Storage / Re: SD card timing questions. on: June 09, 2014, 04:53:04 am
Thanks fat16lib,

One more question please, the documentation says that I need to close() or flush() the file to ensure that data actually gets written to the. If I have failure of some sort (say a power loss) what's the most data I might loose? The most recent 512 byte block? or the data written since the flash controller on the SD card last did some house-keeping?

Pages: [1] 2 3 ... 12