Chat freely about anything...

User avatar
By schufti
#80741
I only powered the Wemos using the micro USB port. Do you believe the usb/serial chip is also activated when using charge-only USB cables, or the modified USB cable I made last night ?

I woudn't risk to be hit by this problem until I could rule it out for sure.
Being powerd and seeing signals on the Rx input could trigger some unwanted action on 'not so clever' chips. This is also an energy consumption problem, that's why I prefer boards w/o fixed usb-serial converter.
User avatar
By cpper
#80747 Thanks Shufti.
To rule out the possible issue mentioned above, I tried the following: Power the GPS module via the micro USB port(it has one), from a power bank. Connected the 5V pin from the GPS to the 5V pin on the Wemos, and connected grounds together. Than Rx to Tx, and Tx to Rx.
Now, the USB port on the Wemos is not used at all. It still doesn't work. The microcontroller works ok, but no data comes through the serial pins. Again, if I do SoftwareSerial on two other pins, then it works.
I tried doing SoftwareSerial on the Tx Rx pins, and this doesn't work. Of course, while doing this, I didn't do Serial.begin() or anything else with the Serial object.
This doens't make any sense :roll:
User avatar
By cpper
#80756 I got it to work. What I had to do was to replace the (original) Wemos with an older clone I used on a project three years ago. With the fake clone it works, but only when it's powered trough the 5V pin. I get the GPS output, but it looks like there is a lot of garbage characters too.

I'll get another original Wemos(now called Lolin), maybe the one I have is broken.
User avatar
By cpper
#80805 I can't get rid of the garbage, and the received data is incomplete. I tried different baud rates ranging from 9600 to 15200(both GPS and Wemos), but with the same result.

Here are some photos with the layout: [https://imgur.com/a/HCFq78D](https://imgur.com/a/HCFq78D)
As seen, the module is powered through the USB port, then the 5V pin on the GPS goes to the 5V pin from the microcontroller. Grounds connected together, TX-->RX and RX-->TX. As this is the microcontroller I used in my first project, the solderings look quite bad, but the connection is secure.

This is the code:

Code: Select allNetwork net;
String output ="";

void setup() {
  pinMode(LED_BUILTIN,OUTPUT);
  digitalWrite(LED_BUILTIN,HIGH); //turn led off
   
  net.begin();
  Serial.begin(115200);
}

void loop() { 
  net.handleClient(output); //if client tries to connect, send him the output string
  if (Serial.available() > 0) {
    digitalWrite(LED_BUILTIN,LOW); // led on
    char c = Serial.read();
    output += c;           
    delay(1);
    digitalWrite(LED_BUILTIN,HIGH); //oed off
  } 
}



And here some output:

Code: Select all$GNRMC,,V,,,,,,,,,,N,V*37
$GNVTG,,,,,,,,,N*2õ$GNRMC,,V,,,,,,,,,,N,V*37
$GNGGA,,,,,,0,00,99.99,,,,,,*56
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,1*33
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,2*30
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,3*31
$GPGSV,1,1,00,0*65
$GLGSV,1,1,00,0*79
$GAGSV,1,1,00,0*74
$GNGLL,,,,,,V,N*7A
ÊÊrÊÊb'Rš‚j
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,3*31
$GPGSV,1,1,00,0*65
$GLGSV,1,1,00,0*79
$GAGSV,1,1,00,0*74
$GNGLL,,,,,,V,N*7A
$GNRMC,,V,,,,,,,,,,N,V*37
$GNVTG,,,,,,,,,N*2E
$GNGGA,,,,,,0,00,99.99,,,,,,*56
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,1*33
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,2*30
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,3*31bRª²j
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,1*33
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,2*30
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,3*31
$GPGSV,1,1,00,0*65
$GLGSV,1,1,00,0*79
$GAGSV,1,1,00,0*74
$GNGLL,,,,,,V,N*7A
$GNRMC,,V,,,,,,,,,,N,V*37
$GNVTG,,,,,,,,,N*2E
$GNGGA,,,,,,0,00,99.99,,,,,,*56
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,1*33
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,2*30
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.9¹±,V,,,,,,,,,,N,V*37
$GN
$GNGGA,,,,,,0,00,99.99,,,,,,*56
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,1*33
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,2*30
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,3*31
$GPGSV,1,1,00,0*65
$GLGSV,1,1,00,0*79
$GAGSV,1,1,00,0*74
$GNGLL,,,,,,V,N*7A
ˆ:911±,,,,,V,N*7A
$GNRMC,,V,,,,,,,,,,N,V*37
$GNVTG,,,,,,,,,N*2E
$GNGGA,,,,,,0,00,99.99,,,,,,*56
$GNGSÁ$GNRMC,,V,,,,,,,,,,N,V*3
$GNGGA,,,,,,0,00,99.99,,,,,,*56
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,1*33
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,2*30
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,3*31
$GPGSV,1,1,00,0*65
$GLGSV,1,1,00,0*79
$GAGSV,1,1,00,0*74
$GNGLL,,,,,,V,N*7A
N)ÊbÊÊrÊÊbÊÊrÊÊbšRšŠj
$GPGSV,1,1,00,0*65
$GLGSV,1,1,00,0*79
$GAGSV,1,1,00,0*74
$GNGLL,,,,,,V,N*7A
$GNRMC,,V,,,,,,,,,,N,V*3
$GNGGA,,,,,,0,00,99.99,,,,,,*56
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,1*33
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,2*30
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,3*31
$GPGSV,1,1,00,0*65
$GLGSV,1,1,00,0*79
$GAGSV,1,1,00,0*74
$GNGLL,,,,,,V,N*7A
$GNRMC,,V,,$GNRMC,,V,,,,,,,,,,N,V*G,,,,,,,,,N*2E
$GNGGA,,,,,,0,00,99.99,,,,,,*56
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,1*33
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,2*30
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,3*31
$GPGSV,1,1,00,0*65
$GLGSV,1,1,00,0*79
$GAGSV,1,1,00,0*74
$GNGübŠRššj
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,2*30
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,3*31
$GPGSV,1,1,00,0*65
$GLGSV,1,1,00,0*79
$GAGSV,1,1,00,0*74
$GNGLL,,,,,,V,N*7A
bbbÊÊrÊÊbÊÊrÊÊbÊÊrÊÊbŠRššj
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,2*30
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,3*31



It's a total mess. I don't get the first initial $GNTXT messages, the messages are incomplete, and a lot of garbage is present.
As the NMEA sentences are sent from the GPS each second, it would make sense for the led to blink every second(as seen in the code). However, this is how it blinks:

https://www.dropbox.com/s/j3qpkggh2rdzc ... 1.mp4?dl=0 (You can play the video without downloading)

Any ideas what may cause all this ?