a simple program for car tracking but wierd

Hello i wrote a code to track my vehicle . the problem is that when i plug my arduino nano to my laptop it works fine and send me my location and when i unplug the nano from my laptop it works fine too but when i turn off my tracker for example to charge the batteries when i turn it on again it doesn’t work until i plug my arduino nano to my laptop.
what is the problem ?
appreciate for help

#include <TinyGPS++.h>
#include <SoftwareSerial.h>
SoftwareSerial gsm(9, 10);
SoftwareSerial ss(4, 3);




TinyGPSPlus gps;

unsigned long lastsampletime = 0;


double latitude;
double longitude;


void setup() {

  Serial.begin(9600);
  ss.begin(9600);
  gsm.begin(9600);
  gsm.println("AT+CMGF=1");
  delay(1000);
  gsm.println("AT+CNMI=2,2,0,0,0");


}

void loop() { 
  ss.listen();  
   while (ss.available() > 0)
     (gps.encode(ss.read()));    
if (millis() - lastsampletime >= 2000){
    
  latitude = (gps.location.lat());  
  longitude = (gps.location.lng());  
  
   
   gsm.listen();
  while (gsm.available() > 0) {  
      gsm.read();
  }       
      if (gsm.find("@Track#")) {
             
        gsm.print("AT+CMGF=1\r\n");
        delay(1000);
        gsm.print("AT+CSMP=17,167,0,0\r\n");
        delay(1000);
        gsm.print("AT+CMGS=\"+989037465361\"\r\n");   // use your 10 digit cell no. here
        delay(1000);
        gsm.println(latitude , 6);
        gsm.println(longitude, 6);
        gsm.write(0x1A);
        delay(1000);
      }
    }
}

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you're using the Arduino Web Editor you will not have access to this useful tool but it's still unacceptable to post poorly formatted code. I recommend you to use the standard IDE instead.

Please remove unnecessary blank lines from your code before posting to the forum. One or two to separate code into logical sections is fine but large spaces for no reason or random blank lines just make for more scrolling when we're trying to read your code.

Sounds like maybe a power problem. There might be a high draw from those modules on startup that is beyond the capacity of the battery power system. You should explain how you have things wired up, preferably with a schematic. You should attach and embed any images following these instructions:

pert:
Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you're using the Arduino Web Editor you will not have access to this useful tool but it's still unacceptable to post poorly formatted code. I recommend you to use the standard IDE instead.

Please remove unnecessary blank lines from your code before posting to the forum. One or two to separate code into logical sections is fine but large spaces for no reason or random blank lines just make for more scrolling when we're trying to read your code.

Sounds like maybe a power problem. There might be a high draw from those modules on startup that is beyond the capacity of the battery power system. You should explain how you have things wired up, preferably with a schematic. You should attach and embed any images following these instructions:
http://forum.arduino.cc/index.php?topic=364156

What an illogical post.

First you pester the OP to format the code and then speculate about the power problem.

Why?
I YOU have a problem reading white spaces just do yourself a favor and simply DO NOT READ it.
Perhaps you and others like you should get together and write "sticky" on how to format the code so challenged people likes you have a easy time to read it - even if they do not need it as in this case.

Back to power speculation.

If there is a start-up current surge any decent processor will not IMMEDIATELY boot.

Technically it will hold the "RESET" internally low until the power source is where it should be as far as voltage level goes.
.
That has been a norm since computers came to be.

:slight_smile: :slight_smile: :slight_smile:
now you blame me or him ?
so my code is ok ?
what should i do ?
schematic attached.

232:
I YOU have a problem reading white spaces just do yourself a favor and simply DO NOT READ it.
Perhaps you and others like you should get together and write "sticky" on how to format the code so challenged people likes you have a easy time to read it - even if they do not need it as in this case.

Yet another poster who likes to fertilize a grievance rather than help with a solution.

People post questions looking for help. Any time I ask a favour of someone I make it my business to minimize the effort they need to make to help me. I certainly don't tell them to f*** off if they say they don't understand what I want.

And advice about the presentation of code usually makes it easier for the OP to see a solution as well as making it easier ti help her/him.

...R

Images embedded for our convenience, as pert suggested:

Technique described here.

I don't claim to be an expert. I just try to help people here to the best of my ability. Sometimes that means I take a chance and make a guess. I'm not always right. It would be safer for me to not say anything at all and let the experts do their thing but there are more questions here than the experts can answer. Despite my lack of expertise, I've managed to help hundreds of people on this forum. 9.5 hours after this was posted I'm the first person to offer any sort of hypothesis as to the cause of the problem. After being criticized for my attempt to help I'm hesitant to say anything further but I'll take a risk and simply make some observations:

The VIN on your Nano is connected to a voltage regulator. You are meant to connect a power supply of 6 V - 12 V (actually the product page says 20 V but I think anything above 12 V will get the regulator way too hot). The voltage regulator has a dropout voltage. So when you connect the 5 V from your buck converter to VIN your board doesn't get 5 V, it gets something like 4.15 V. The ATmega328P on your Nano should be fine running at that voltage but the +5V pin on your Nano is also going to be putting out ~4.15 V. You have the UBLOX NEO-6M connected to the +5V pin so that module is being powered at 4.15 V. The 6M's datasheet says minimum VCC is 2.7 V and likely after the voltage regulator's dropout of the 4.15 V you are still getting more than that. So I don't see an obvious problem but you should be aware that you're not getting the 5 V you might expect.

When you have your Nano connected to the laptop it's being powered at 5 V, the +5V pin is putting out 5 V, and the UBLOX NEO-6M is being powered at 5 V. I can see only one thing that's different between the working and the non-working configurations: The power source on startup.

It's actually quite common for us to see reports of "it works when connected to USB but not when powered via VIN/barrel jack". Every time I've seen that the problem ended up being power related.

If @232 has anything productive to contribute they're welcome to do so.

Robin2:
People post questions looking for help. Any time I ask a favour of someone I make it my business to minimize the effort they need to make to help me. I certainly don't tell them to f*** off if they say they don't understand what I want.

My feelings exactly. When I'm asking for help (especially free help), I go to significant effort to express the issue as clearly and concisely as possible. I write it out in MS Word first before pasting it into a forum post -- just to look for misspelled words. I read it and re-read it, checking for clarity, sentence structure, and grammar.

If code is involved, I post an MCVE that actually compiles and demonstrates my problem (or at least demonstrates the complier errors that I can't figure out). I post that code in Code Tags so people can easily copy and paste it into the IDE.

Like I've said here before, if any of the engineers who work for me wrote problem statements like too many of the forum posters here, then they might not be working for me for very long.

EDIT:
I'm not ranting against this particular post or OP. Just responding to and agreeing with @Robin2's reply to @232.

Like pert said, you are losing the dropout voltage to the 5V Arduino. Just connect the Arduino 5V pin to your buck 5V output, which will bypass the Arduino regulator. The GPS module (probably) has a 3.3V regulator, so you can continue to feed the buck 5V output to the GPS module and the SIM800.

I would suggest disconnecting the GPS RX pin. The NEO-6M is a 3.3V device, so the 5V Arduino output voltage can damage the GPS RX pin. This also causes extra current drain that reduces your battery lifetime (read this). You never send configuration commands to the GPS anyway.

I suspect the real problem is a combination of

* marginal power on startup (prevents receiving 1st GPS location),

* not waiting long enough to read the GPS device (subsequent locations), and

* trying to use 2 SoftwareSerial ports

Your use of 2 SoftwareSerial ports is almost OK, but trying it is STRONGLY discouraged. Not only that, SoftwareSerial is very inefficient, because it disables interrupts for long periods of time. It cannot send and receive at the same time, so it may have trouble working with a device that does both (i.e., the GSM). SoftwareSerial can interfere with other parts of your sketch or with other libraries.

This sketch will probably work:

#include <NMEAGPS.h>
#include <NeoSWSerial.h>

NeoSWSerial gsm(9, 10);
NeoSWSerial gpsPort(4, 3);

NMEAGPS gps;


void setup() {

  Serial.begin(9600);

  gpsPort.begin(9600);

  gsm.begin(9600);
  gsm.println("AT+CMGF=1");
  delay(1000);
  gsm.println("AT+CNMI=2,2,0,0,0");

}


void loop() {

  if (gsm.find("@Track#")) {

    // Location requested, listen to the GPS port until we get one
    gpsPort.listen();
    gps_fix fix; // a structure which contains all GPS fields, including lat/lon
    do {
      if (gps.available( gpsPort )) {
        fix = gps.read();
      }
    } while (not fix.valid.location);

    //  GPS location received, send it
    gsmPort.listen();
    gsm.print("AT+CMGF=1\r\n");
    delay(1000);
    gsm.print("AT+CSMP=17,167,0,0\r\n");
    delay(1000);
    gsm.print("AT+CMGS=\"+989037465361\"\r\n");   // use your 10 digit cell no. here

    gsm.println( fix.latitude(), 6 );
    gsm.println( fix.longitude(), 6 );
    gsm.write(0x1A);
  }

}

The major difference is that it watches for the request message, then it waits until the GPS device (1) sends a complete set of sentences (could be 200ms) and (2) the GPS device knows the current location (could be minutes after power-up).

Your original sketch simply looked to see if the Arduino receive buffer contained a complete sentence. It probably does not. After power-up, the GPS probably does not have a location fix to send, even if the Arduino were listening for 2 seconds. :frowning:

That version uses my NeoGPS library. It is smaller, faster, more accurate and more reliable than all other GPS libraries. There are many examples to show the correct program structure, and it supports many data fields. Even if you don’t use it, be sure the read the tips on the Installation and Troubleshooting pages.

Also notice that my version uses NeoSWSerial for the “2 software serial port” approach. NeoSWSerial is much more efficient than SoftwareSerial, and it can transmit and receive at the same time.

There are better connection choices, though (read this).

Putting the GPS device on pin 0 (to GPS TX pin, using Serial) and the GSM on pins 8 (to SIM TX) and 9 (to SIM RX), using AltSoftSerial, would be the best combination. You could still use the Serial Monitor window for debug prints, but you would have to disconnect pin 0 every time you want to upload a new sketch over USB. Some people put a switch on that wire so it’s easy to upload.

Then the above sketch would start like this:

#include <NMEAGPS.h>
#include <AltSoftSerial.h>

AltSoftSerial gsm; // 8 is RX (to GSM TX pin), 9 is TX (to GSM RX pin)
#define gpsPort Serial  // an "alias" for Serial

NMEAGPS gps;


void setup() {

  Serial.begin(9600);

  //gpsPort.begin(9600);  // gpsPort *is* Serial, so don't start it twice

   ...

AltSoftSerial, NeoSWSerial and NeoGPS are available from the Arduino Library Manager, under the IDE menu Sketch → Include Library → Manage Libraries.

Thank you dev you are a kind man thank you for time you spent for me . you are NeoGps writer ? really ?
so you know arduino :slight_smile: :slight_smile: :slight_smile: .

thank you pert for your time spent for me too.

Dear dev i loaded your code, every thing is fine i mean sim800 received “Track” and Ublox neo 6m encoded data successfully (i addad Serial.print() to see response in Serial monitor) but sim800 doesn’t send me message to my phone i think this project is cursed :confused: :confused: this is code

#include <NMEAGPS.h>
#include <NeoSWSerial.h>

NeoSWSerial gsm(9, 10);
NeoSWSerial gpsPort(4, 3);

NMEAGPS gps;


void setup() {

  Serial.begin(9600);

  gpsPort.begin(9600);

  gsm.begin(9600);
  gsm.println("AT+CMGF=1");
  delay(1000);
  gsm.println("AT+CNMI=2,2,0,0,0");

}


void loop() {
  // Location requested, listen to the GPS port until we get one
    if (gsm.find("Track")) {
    Serial.print("ok"); // to see response in serial monitor
    gpsPort.listen();
    gps_fix fix; // a structure which contains all GPS fields, including lat/lon
    do {
      if (gps.available( gpsPort )) {
        fix = gps.read();
           }
   Serial.print(fix.latitude(), 6);  // to see gps module response in serial monitor
   Serial.print(fix.longitude(), 6);  // to see gps module response in serial monitor
    } while (not fix.valid.location);

    //  GPS location received, send it
    gsm.listen();
    gsm.print("AT+CMGF=1\r\n");
    delay(1000);
    gsm.print("AT+CSMP=17,167,0,0\r\n");
    delay(1000);
    gsm.print("AT+CMGS=\"+989037465361\"\r\n");   // use your 10 digit cell no. here

    gsm.println( fix.latitude(), 6 );
    gsm.println( fix.longitude(), 6 );
    gsm.write(0x1A);
  }
}

you think what is the problem ? i am sure about wiring because i see response in serial monitor

Sooo… you didn’t take pert’s advice:

pert:
Please always do a Tools > Auto Format on your code before posting it.

Readability is essential when you are trying to debug a program. That’s why indentation is so important: it helps you to see the nesting of loops and if statements. Your new sketch is not properly indented:

void loop() {
  // Location requested, listen to the GPS port until we get one
    if (gsm.find("Track")) {
    Serial.print("ok"); // to see response in serial monitor
    gpsPort.listen();
    gps_fix fix; // a structure which contains all GPS fields, including lat/lon
    do {
      if (gps.available( gpsPort )) {
        fix = gps.read();
           }

That makes me waste time searching for the various blocks. Just press control-T in the IDE to autoformat:

void loop() {
  // Location requested, listen to the GPS port until we get one
  if (gsm.find("Track")) {
    Serial.print("ok"); // to see response in serial monitor
    gpsPort.listen();
    gps_fix fix; // a structure which contains all GPS fields, including lat/lon
    do {
      if (gps.available( gpsPort )) {
        fix = gps.read();
      }

There we go!

but sim800 doesn’t send me message to my phone

It could be because you are still using two software serial ports, or because there is some problem with the SIM800 commands. I can’t help with the SIM800 commads, but you could try a simple program first:

#include <NeoSWSerial.h>

NeoSWSerial gsm(9, 10);

void setup()
{
  Serial.begin( 9600 );
  Serial.println( F("Enter AT commands:") );

  gsm.begin( 9600 );
}

void loop()
{
  if (Serial.available()) {
    char c = Serial.read();
    if (c == '~')
      c = 0x1A; // substitute
    gsm.write( c );
  }
  if (gsm.available())
    Serial.write( gsm.read() );
}

Make sure the Serial Monitor is configured to send “Both NL and CR” (lower right corner of window).

Then type the AT commands from your sketch:

    AT+CMGF=1
      --> you should see OK

    AT+CNMI=2,2,0,0,0
      --> you should see OK

    AT+CMGF=1
      --> you should see OK

    AT+CSMP=17,167,0,0
      --> you should see OK

    AT+CMGS="+989037465361"
    12.3456
    78.9012
    ~      <-- substitutes for ^Z

      --> you should see CMGS: xxx and OK if the SMS is sent ok

I see that you asked how to send a control-Z to end the sequence over here, and sterretje helpfully suggested using a different terminal program or substituting a special character in your simple sketch. I don’t know what you decided to do, but the above sketch will send a control-Z when you enter a tilde.

If you can’t send an SMS by typing the commands, your tracking program won’t work. Then I would re-wire to the better connections I suggested above (GPS on Serial and GSM on AltSoftSerial).

Hello my dear friend dev,
i did what you said and i am 100% sure that my sim800l is ok(i did AT commands and received ok),i think the problem is an electrical problem like voltage or something else,that make me crazy exactly when i plug my nano to laptop everything works fine even when i unplug it but when i press the power switch off and then on nothing work, you think what happen when i plug it to laptop i think that is related with rx and tx of mini usb.
another problem is that as you said i tried to use rx and tx pin of arduino nano for gps module but nothing happen, actually rx and tx of nano don’t work,i tried that with sim800l too to being sure and waiting for ok response of AT commands but nothing happened.
i searched web and understand that people usually don’t use those pins.so i decided to use sim800l only and getting location of nearest antenna of network but there is another problem too.i wanna knock my head to wall.the problem is that it send me all of AT commands as string from first to end like :

AT +CMGF = 1

ok

AT + …

to end.

#include <SoftwareSerial.h>
SoftwareSerial gsm(9, 10);
String inchar = "";

void setup() {
  Serial.begin(9600);
  gsm.begin(9600);
  gsm.println("AT+CMGF=1");
  delay(1000);
  gsm.println("AT+CNMI=1,2,0,0,0");
  gsm.print("AT+SAPBR=3,1,\"Contype\",\"GPRS\"\r\n");
  delay(1000);
  gsm.print("AT+SAPBR=3,1,\"APN\",\"CMNET\"\r\n");
  delay(1000);
  gsm.print("AT+SAPBR=1,1\r\n");
  delay(1000);
  gsm.print("AT+SAPBR=2,1\r\n");
  delay(1000);
  gsm.print("AT+CIPGSMLOC=1,1\r\n");
  delay(3000);
  inchar = gsm.readString();
}

void loop() {
  while (gsm.available() > 0) {
    gsm.read();
  }
  if (gsm.find("Track")) {
    gsm.print("AT+CSMP=17,167,0,0\r\n");
    delay(1000);
    gsm.print("AT+CMGS=\"+989037465361\"\r\n");   // use your 10 digit cell no. here
    delay(1000);
    gsm.println(inchar);
    gsm.write(0x1A);
    delay(1000);
  }
}

i want inchar only be the response of AT + CIPGSMLOC = 1,1 but i can’t like always
thank you dev for your patience.

Rezapazoki777:
Hello my dear friend dev,
i did what you said and i am 100% sure that my sim800l is ok(i did AT commands and received ok),i think the problem is....

D̵̢̪͓͇͕̮̩̜͕̦͌̈́̈́̄̐̂̒̕̚͠h̶͈̱̤͚̦̖̗͙͂̇̅͂̏̂d̸͎̟̜̒̏͑̿u̸̧͍̣͑̊͛̐̏̕u̶͖̟̗̐̈́̈͜͠ẅ̸̲͍̭́̏̿̊̌͂̽̚̕̚͝n̵̦͖̝̋̎͝d̶̡͉̲͇͔̰̣͓̂͛͗͝h̵̠̜̘̖͈͓̭̳̖̑̀̑̔̚̕͝c̸͕̟̻͍̼͚̤̠͉̞̆͒̈́̀̓̌͌͌͛͝ͅb̵͇̘̪̳̾̉̓̓̿͆̾̚d̵̘͌̄͗̇͗͋̂̑̃̆̚u̷̬̫̎̑͂̏̊̑̕h̵̲̳̤̦̦̲̃̿͋̓̇͝a̴̱͍̞̱̺̟̐͌̑̌b̶̛̟̳͓̙̫̖̻͍́͊̔̋̑s̸̼̖̈́̀̉̇̍ ̸͚͙̫͚̂͒̾h̴̜̖͇͇̽͌ȋ̸͈̞̖̼̺̿͌̇͑̏̈̅̐ͅc̵̞̬̻̚͘͜ ̶̲̯͇͋̌͋̽̏s̴̡̧͖̘̻͙̰̿͌͌̇̏̿͘͝c̸̛̱͙͎͈͕̣̺̹̖͆̋͌̉̿̄͊̀i̸̗͈̽̅̈́̒̉͝ ̸̣̩̜̈́̇̓͋̇̅͠š̵͇̩̿́̇̀̈́̈ ̶͔͆͌͐͂̄̔̊̀͠͠ḑ̶̧̭͖̤̰̳̭̠͆̐̈́͛̉̐̉̚͝i̶̧̛̳̦̱̠̟̟̼̔d̴̮̰͚̿͜ ̷͔͙̓̌͒̂̈s̸̯̣͖̯̭̮̯̰̳̄̊͜͝ͅc̴̱̮̫̥̱̺̬̱͎̀̒̉̇͌̀̍̾́́i̴̡̢̟̩͖̙̙̹͉͇̾̎ ̸͖̝̳̪͙͉͒̓̏̒̽͂̍̇͝d̸̬͖̳͙̘̝̯̮̎̑͘ḏ̴̡͎̗͔̲͛̈́̈́̾̽ͅj̴̢̻͎̟̤̘̳́̈́̇s̶̭͓̬͇̘͙͐̏̐̽̄͝ͅj̶̢͓̝͇̻͙͕͈̿͛̄̓͒̾͐̽͊̕s̴̻̺̗̮̤̭̠̋̑̌̇̔͌̓̇͝j̸̡̛͖̣̟̪͎̪̓̋̌̈́̒̍̂͘͠͝d̵̫̻̻̙̱̻͇̒ḃ̷̬̠͓͕̙̝̬̫̿̉̔͋̀̅͠s̷̡̛̜͚̳͖͕̪̤̠͔̾̋͗́́̌̽̅͜͠ ̴̛͓͍͉͓̲͕̜͓̪͛͂̍̋͜͝d̷͈͎̈́͐̉̍͌̏̓͂̅̒̕c̶̢̨͈̬͖̣̑

but i can't like always
thank you dev for your patience.

Uh...

Try using shorter sentences.

And paragraphs.

And show a sketch that works, with its output (in code tags).

Show the output when it works (plugged in) and when it doesn't work (switched off and on using batteries, not usb power).

Don't show me a sketch that uses SoftwareSerial, because I've already told you it can cause problems.

That kind of babble post is useless. :-/

Hello dev.
i loaded your code with little changes but the problem is like the same,how can i show you the output ?
do you want that i send you a video to check the problem ? can code tags show the output ? this is your code with changes :

#include <NMEAGPS.h>
#include <NeoSWSerial.h>
NeoSWSerial gsm(9, 10);
NeoSWSerial gpsPort(4, 3);
NMEAGPS gps;
unsigned long lastsampletime = 0;
double latitude;
double longitude;

void setup() {
  Serial.begin(9600);
  gpsPort.begin(9600);
  gsm.begin(9600);
  gsm.println("AT+CMGF=1");
  delay(1000);
  gsm.println("AT+CNMI=2,2,0,0,0");
}

void loop() {
  gsm.listen();
  while (gsm.available() > 0) {
    gsm.read();
  }
  if (gsm.find("Track")) {
    gpsPort.listen();
    gps_fix fix;
    if (gps.available( gpsPort )) {
      fix = gps.read();
    }
    latitude = ( fix.latitude());
    longitude = (fix.longitude());
    gsm.listen();
    gsm.print("AT+CMGF=1\r\n");
    delay(1000);
    gsm.print("AT+CSMP=17,167,0,0\r\n");
    delay(1000);
    gsm.print("AT+CMGS=\"+989037465361\"\r\n");   // use your 10 digit cell no. here
    delay(1000);
    gsm.println(latitude , 6);
    gsm.println(longitude, 6);
    gsm.write(0x1A);
    delay(1000);
  }
}

i wanna cry

i loaded your code with little changes

Those are BIG changes to the loop structure. That program would never work. Go back to the sketch in my reply #8. However…

It looks like I left a delay out of my sketch in reply #8 (and your reply #9).

Add a delay after the AT+CMGS command:

    delay(1000);
    gsm.print("AT+CMGS=\"+989037465361\"\r\n");   // use your 10 digit cell no. here
    delay(1000);          <-- add this line

    gsm.println( fix.latitude(), 6 );
    gsm.println( fix.longitude(), 6 );
    gsm.write(0x1A);
  }

You had that in your original sketch. Sorry about that!

how can i show you the output ? can code tags show the output ?

SELECT the text in the Serial Monitor window with your mouse:

Either press the left mouse button at the beginning of the output (NOT the Send field), drag to select all the output text (highlights blue), then release the left mouse button.

    *OR*

Click the left mouse button (press then release) anywhere inside the Serial Monitor window output field (NOT the Send field), type control-A to select all the text (highlights blue).

Then type control-C to COPY all the highlighted text.

Click in the post editor here and press control-V to PASTE all the text into your post. Then put the code tags around that text,

 so it looks
    like this.

You may have to turn off Autoscroll in the Serial Monitor window, to make it easier to select the text (uncheck that box in the lower left corner).

You may also want to display the SIM800 response to each command. Add this new routine to the end of your INO file:

void showResponse()
{
  while (gsm.available()) {
    Serial.write( gsm.read() );
  }
}

Then call this routine after the delays that come after each command. For example,

  gsm.println("AT+CMGF=1");
  delay(1000);
  showResponse();   <--- add this after each delay

I would also add a delay+showResponse at the end of setup:

void setup() {

  Serial.begin(9600);

  gpsPort.begin(9600);

  gsm.begin(9600);

  gsm.println("AT+CMGF=1");
  delay(1000);
  showResponse();

  gsm.println("AT+CNMI=2,2,0,0,0");
  delay(1000);
  showResponse();
}

This will let you know if the SIM800 did not like a command.

Hello dev , i have the same problem till now
there is something in my mind ,do you know what happen when i plug my nano to laptop ? i mean electrically ? you know, when i plug the nano to my laptop there is no need to open anything just plug and my car tracker works,what can i do that my tracker thinks that i did plug it to laptop virtually ?
do you have any idea ?

Rezapazoki777:
do you know what happen when i plug my nano to laptop ? i mean electrically ?

It has really good power.

I don't know how your system is connected now. We have given you some advice. Did you change the connections?

Maybe those 2 AA batteries can't provide enough current, or maybe they won't take a full charge anymore.

Power is the only difference.