Arduino Forum

Forum 2005-2010 (read only) => Hardware => Interfacing => Topic started by: loldrup on Jan 22, 2009, 06:35 pm

Title: simple serial issue
Post by: loldrup on Jan 22, 2009, 06:35 pm
Hi
I'm connecting my GPS to pin 0 and 1 on my arduino, in the hope of receiving any data from it. The GPS outputs EMEA-data as soon as it is turned on. It's led is turned on, so it has poower,  and I'm running  this code on the arduino:

while (true) {
   Serial.println("true-loop:");
   incomingByte = Serial.read();
   Serial.println(incomingByte);
}

the only output i get is:

true-loop:
-1
true-loop:
-1

etc...

I guess the "-1" means that no bytes were read. I've tried switching around the TX and the RX lines to the GPS, it makes no difference. The GPS runs at 4800bps and the arduino is configured to use 9600, but this shouldn't make  a difference. The GPS should still send something, even though the arduino will interpret it weirdly. I get NOTHING - not even something weird. What can be wrong? The same setup worked fine with a BASIC STAMP.
Title: Re: simple serial issue
Post by: Jassper on Jan 22, 2009, 06:59 pm
Quote

The GPS runs at 4800bps and the arduino is configured to use 9600, but this shouldn't make  a difference.


It might matter. A lot of things I have worked with will reject anything that is not the correct baud. If this is the case with the Arduino, then the data will be ignored before ever reaching the serial buffer.

Try matching the baud and make sure your voltage levels are correct. on the TX/RX pin, you may need a TTL to RS232 (Logic level (http://www.sparkfun.com/commerce/product_info.php?products_id=8745)) converter.
Title: Re: simple serial issue
Post by: pwillard on Jan 22, 2009, 07:39 pm
don't assume that baud rate mismatch will do something... very often a mismatch will result in nothing being displayed.
Title: Re: simple serial issue
Post by: mem on Jan 22, 2009, 08:14 pm
You can avoid those -1 outputs by checking if data is available before trying to read it.


while (true) {
  if(Serial.available() ){
    incomingByte = Serial.read();
    Serial.printlincomingByte);
 }
}

But you will not get anything useful if you don't have the baud rate set correctly.
Title: Re: simple serial issue
Post by: anachrocomputer on Jan 23, 2009, 01:07 am
Yes, first thing to do is to set the baud rate to 4800 for the NMEA data.
Title: Re: simple serial issue
Post by: loldrup on Jan 23, 2009, 01:41 am
Now the baud rate is correct:
[font=Courier]
while(true) {
 int serialInput;
 Serial.begin(4800);
 serialInput = Serial.read();
 Serial.begin(9600);
 Serial.println("Seria input was:");
 Serial.println(serialInput);
}[/font]

But the output is still always -1

I measured the voltage the GPS receives: its 4,75
Next step will be to hook it up to the Basic Stamp and make it work there, and then transition the RX and TX line to the Arduino, but leave it power fed from the Basic Stamp, to rule out power supply being an issue. But that'll be tomorrow.. I have to go to sleep now.
Title: Re: simple serial issue
Post by: Jassper on Jan 23, 2009, 02:00 am
You are still setting it to 9600
Take out the second Serial.begin()

Also, that should be in the void setup()
Title: Re: simple serial issue
Post by: loldrup on Jan 23, 2009, 08:43 am
I set it to 9600 when the communication is intended for my PC. I put it back to 4800 when I take data in from the GPS. The GPS can't receive data, and therefore shouldn't care about the bits floating to it from the 9600baud sentences sent to the PC.
The code is in the [font=Courier]void loop()[/font] method (I'm not sure whether this method will loop all by itself, so I built my own loop ("[font=Courier]while (true)[/font]")
Title: Re: simple serial issue
Post by: loldrup on Jan 23, 2009, 09:13 am
And now it got a proper 5.02v power supply. It still doesn't work though. I can't get my Basic Stamp Editor to recognize my BS2pe, so I can't test whether it would work with the basic stamp. It did make it work with the basic stamp this summer though..
crap.
Title: Re: simple serial issue
Post by: macegr on Jan 23, 2009, 09:55 am
"Should" and reality are often very different. RS232 is not a multi-drop interface. Pins 0 and 1 are TTL level, not PC standard RS232...is your GPS TTL-serial? If the PC is talking to the Arduino via the USB port, then those pins are under full control of the internal FTDI chip. With the GPS connected to those pins, you would be seeing the data, garbled or not, come into the PC before the Arduino even had a chance to see it. Your while-true loop may be interfering with the Arduino's ability to check the serial buffers (I don't know if that's true, I have little knowledge of how the Arduino handles this).

Just a few of the possible problems here.
Title: Re: simple serial issue
Post by: loldrup on Jan 23, 2009, 11:07 am
The GPS can run of both 12v and 5v. This I found out by experiment. Also, it can communicate with my basic stamp, which is purely TTL. So yes, my GPS is TTL-serial.

I will check your suggestion about Arduino not seeing the signals because of the FTDI "taking over" by listening to the FTDI using windows Hyperterminal (can't do it right now though, as I'm at work..).
It seems implausible though, as that would render the hardware-serial-port of the arduino useless for anything else than PC-communication, and I know other projects has used the serial interface of the arduino to talk with other devices than the PC.

I'll also try to remove the while loop.
Title: Re: simple serial issue
Post by: darudude on Jan 23, 2009, 02:14 pm
have you tried the Software Serial library for the GPS? This would keep the normal serial for communicating with the PC, so theres no problems on that end and you don't have to kee changing the baud rate.
Title: Re: simple serial issue
Post by: westfw on Jan 23, 2009, 03:07 pm
Simple thing to try: are you sure you have the right gps wires connected to the right pins?  "tx" and "rx" are ambiguous after all; one devices TX MUST talk to the other devices RX.
Title: Re: simple serial issue
Post by: loldrup on Jan 24, 2009, 01:07 am
to macegr:
I tried listening to the COM-port using hyperterminal, but of course the result is the same as when listening to the line via the arduino serial monitor. IE. no extra (garbled) stuff from the GPS were to be found. No matter whether it was the arduino or the FTDI chip that handled the incomming data from the GPS, it would be the PC that received it. And it doesn't.

I also removed my own "while (true)" loop in case it caused problems. It didn't change anything. I also found out that "void loop()" function loops by itself, so no use for my own while loop.

to westfw:
I always try both options, just in case.

I tried the SoftwareSerial. No luck. Then I tried connecting the GPS to the PC. No luck either. I'm starting to suspect that my GPS is somehow defective. Tomorrow I'll try with its original cable, just for a good measurement, but I'm too tired to search for that now.
Sleep well!
Title: Re: simple serial issue
Post by: macegr on Jan 24, 2009, 01:39 am
So, not to beat a dead horse, but it sounds really fishy for the GPS to be "both 12V and 5V". Normally a TTL-serial interface won't work at all with equipment expecting 12V RS232 levels. And the fact that you used the Basic Stamp isn't proof you were using TTL...it's not purely TTL. The Basic Stamp has RS232 level-conversion hardware if you're using it with the pins that are also used for downloading the program, which happens if you choose pin 16 in the SERIN and SEROUT commands.
Title: Re: simple serial issue
Post by: loldrup on Jan 24, 2009, 10:24 am
to macegr:
Are you sure on that one? I have a RS232 converter myself, and judging by the size of the RS232 conversion chip itself, I don't think this functionality can possibly be embedded on the Basic Stamp. Also, on my Basic Stamp development board, there's a separate RS232-conversion chip right behind the 9-pin RS232-port. This would be redundant if the BS could do the conversion itself.

Will be up and looking for my original GPS cable in just a minute :)
Title: Re: simple serial issue
Post by: loldrup on Jan 24, 2009, 01:19 pm
My GPS actually WORKS. Now I'm using its original cable, attached to a PC and then using hyperterminal for communication. Loads of NMEA-sentences are comming in.
The original cable is a USB to PS/2-jack converter. The GPS is a little black box with a cable with a PS/2-jack. That is, I don't believe the GPS is using the true PS/2-protocol - it's just using the same jack. If it were using the PS/2-protocol, my Basic Stamp wouldn't have been able to communicate with it using its standard Serial library. Also, In windows XP, the adapter is listed as a "USB-to-serial bridge".

All this doesn't solve my problem though - just puzzles me even more. This really sucks. I hadn't expected serial communication using an arduino to be so impossible.
Title: Re: simple serial issue
Post by: loldrup on Jan 24, 2009, 05:17 pm
This really keeps puzzling me. This is the code I'm using now:

[font=Courier]#include <SoftwareSerial.h>

#define rxPin 2
#define txPin 3

SoftwareSerial softSerial =  SoftwareSerial(rxPin, txPin);

void setup()  {
 pinMode(rxPin, INPUT);
 pinMode(txPin, OUTPUT);
 softSerial.begin(4800);
 Serial.begin(4800);
}

void loop() {
 char someChar = softSerial.read();
 char oneMoreChar = Serial.read();
 // print out the character:
 Serial.println("Output: ");
 Serial.println(someChar, DEC);
 Serial.println(oneMoreChar, DEC);
 delay(1000);
}[/font]

As you see I check for input on both the hardware- and the software-serial. I attach the TX line from the GPS to the pins 0,1,2,3  ten seconds at a time. I always get this output:

[font=Courier]Output:
0
-1[/font]

That is, I get "0" from the hardwareserial and "-1" from the softwareserial.

My PC is listening using 4800 baud, so no need for baud-changing all the time.
Title: Re: simple serial issue
Post by: Jassper on Jan 24, 2009, 06:04 pm
This has already been mentioned but, Sounds to me like your GPS is RS-232 12v, and I believe the Stamps are as well, depending on how old it is.

I just got my Arduino talking to my PC, the Arduino is TTL logic level or 3.3v. The PC expects 12volt levels. I used the ST232 to convert the TTL to RS-232, with out it, my PC shows the same thing you are getting -1 or 0, over and over, or sometimes nothing at all.

Disconnect your com cable and leave the GPS powered. Measure the voltage on the TX pin of the GPS to ground. It's best with a analog meter because depending on how often the GPS sends data the meter will jump around so you might need to put your meter on high hold. Analog meters you can see bounce as data is sent.

Anyways, if you see levels > 5 volts, then you will need to convert TTL/CMOS to RS-232
Title: Re: simple serial issue
Post by: Fjornir on Jan 24, 2009, 06:05 pm
What GPS are you using? Which pin numbers from the GPS are you connecting to which pins on the arduino? Looking at the code I can see you're a bit confused - the -1 is coming from the hardware serial (connected to your PC) not the software serial. If you used more meaningful variable names you'd probably avoid some confusion.

That said, the -1 is -expected- in this case and mem explained why earlier in the thread. Serial.read() will return -1 unless there is data available on the port. You're not testing to see if there's data before you do your read and since your PC isn't actively sending data you're always going to get a -1 out of it.

Post a photo of the wiring going from your GPS to your arduino - it might offer some clue as to what's going on here. Serial IO is really really easy on the Arduino so you've probably just made a dumb mistake. Happens to all of us.
Title: Model of GPS?
Post by: mrmeval on Jan 25, 2009, 01:31 am
If the unit needs 232 level data instead of TTL you can find the old schematic of the serial version of the arduino. It works with most modern serial ports.

Since the Arduino has tied up the hardware serial pins consider using the software serial library and picking arbitrary pins.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1196667255

http://www.libelium.com/squidbee/index.php?title=Main_Page
Title: Re: simple serial issue
Post by: loldrup on Jan 25, 2009, 01:45 am
to fjornir:
The GPS is a little black box with a cable with a ps/2 jack with four active wires. Two for power and two for communication. I connect the tx and the rx to the pins 0 and 1 on the arduino (in both possible constellations, just to be sure).

I will try to borrow a camera from one of my hallmates and post a picture.

to jassper:
Now I tried putting my rs232 to TTL converter in between. It has a female DB9 port on the 12v side. I put the TX pin from the GPS into pin3 on this DB9 port. TX and RX on the TTL-side went to pin0 and 1 on the arduino. Still no result other than "-1" and "0". Then I tried connecting my arduino to my PC through the rs232 to TTL converter (removing the USB cable going to the arduino and powering arduino through 9v adapter):
With both constellations of TX/RX on the converter to TX/RX on the arduino, I got this message:

[font=Courier]avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51[/font]

Maybe the pins o and 1 on the arduino have been fried?
Title: Re: simple serial issue
Post by: Fjornir on Jan 25, 2009, 01:49 am
Who is the manufacturer of the GPS unit and what is the part number?
Title: Re: simple serial issue
Post by: loldrup on Jan 25, 2009, 01:58 am
The GPS has the name "GPS-601" (which doesn't really say much) and uses the Cirfstar III chip. It looks very much like this:
http://en.wikipedia.org/wiki/File:GPS_receiver_(mouse).jpg


I found something interesting on the site Marcos linked to ( http://www.libelium.com/squidbee/index.php?title=GPS_module ) :

[font=Courier]This example shows how to connect the GPS module to an Arduino board and watch the NMEA sentences.

Connect the GPS shield as shown in the picture and then connect two short cables to +5V and GND from the GPS shield to the Arduino board. Finally, plug the USB cable to your computer.

Open a terminal program to listen the serial port. Use the following serial port configuration: 4800 baud, 8 data bits, no parity, 1 stop bit, no flow control. [/font]

This text seems to be saying that you can read that libelium GPS unit without having any code running on the Arduino. That is, when the GPS unit is attached to the arduino, it will all by itself, forward its serial data to the PC. Fancy..
Title: Re: simple serial issue
Post by: loldrup on Jan 25, 2009, 02:00 am
For a good measurement: Heres my code in a slightly more polished edition:

[font=Courier]#include <SoftwareSerial.h>

#define rxPin 2
#define txPin 3

SoftwareSerial softSerial =  SoftwareSerial(rxPin, txPin);

void setup()  {
 pinMode(rxPin, INPUT);
 pinMode(txPin, OUTPUT);
 softSerial.begin(4800);
 Serial.begin(4800);
}

void loop() {
 Serial.println("Just about to receive data:");
 char softSerialChar = softSerial.read();
 char hardSerialChar = Serial.read();
 // print out the character:
 Serial.println("Received from software serial: ");
 Serial.println(softSerialChar, DEC);
 Serial.println("Received from hardware serial: ");
 Serial.println(hardSerialChar, DEC);
 Serial.println("");  //just to make some space
 delay(1000);
}[/font]
Title: Re: simple serial issue
Post by: Fjornir on Jan 25, 2009, 02:11 am
Eh. I give up. You answer part of the questions posed to you but not all of them. You assert things which experienced members of the forum question but are unwilling to back up those assertions with measurements to support your assertions. You ignore suggestions and corrections from people trying to help you or, worse, argue with them even when the evidence (ie: your project isn't working) shows you to be wrong.

Good luck. You're going to need it.
Title: Re: simple serial issue
Post by: loldrup on Jan 25, 2009, 10:45 am
I didn't implement the use of Serial.available() but thats because I prefer to see -1 than to see nothing. I perfectly well know that receiving -1 means nothing were there - it doesn't mean that I actually received "-1".
I didn't check the voltage of the TX line because I don't have an analog voltmeter. Other times where I have tried this with my voltmeter, it hasn't been able to measure the full voltage of the line. My voltmeter is way too slow to catch the changing voltage. Also, it's not really necessary, as I have already accepted the proposition that my GPS might be 12v. That's why I started experimenting using my RS232 to TTL converter in between the GPS and the arduino. Theres no reason to make experiments to convince me when I'm already accepting the idea (and my recent use of the RS232 to TTL converter shows this).

Is the above behavior unacceptable, or do you have other reasons to discard my case?
Title: Re: simple serial issue
Post by: loldrup on Jan 25, 2009, 10:50 am
The only text on the GPS is this:
"[font=Courier]Model no.:
GPS-601
Made in Taiwan
Tested to comply with FCC standards[/font]"

Thats why I can't tell you either manufacturer name or part number. I've tried googling "GPS-601" but it doesn't reveal much.
Title: Re: simple serial issue
Post by: Jassper on Jan 25, 2009, 04:08 pm
Your adaptor need to be powered. simply connecting the TX/RX line won't do it. Adaptors like that are useually port powered threw pin 7 (RTS) of the DB9 connector. You might be able to use the +5v from the Arduino to power the adator. If you don't have the specs for the adaptor, open the case and see if you can I dentify where to power it from.
Title: Re: simple serial issue
Post by: loldrup on Jan 25, 2009, 05:11 pm
This is the adapter that I am using:
http://awce.com/rs1.htm
That website says: "Pin 1 and 2 require +5V (regulated) and ground." I think they mean pin1 has to have 5v and pin2 has to go to ground - both on the 5v side. Also, thats the names on the pins 1 and 2 on the TTL side, so thats how I have wired it up. The voltage is there and its 5.00 volt.
Referring to this image:
http://www.circuitdb.com/show.php?cid=172
I'm connecting the TX line from the GPS to either pin2 or pin3 on the 12v side. So Im trying all four combinations (pin2 or 3 on the 12v side and crossing or not crossing the two com lines from pin "T" and "R" on the converter to pin0 and 1 on the arduino). I also tried the pin4, just in case I am doing a "mirroring" mistake. The GPS is powered from the power from the power pins from its original cable (a usb to serial converter). This power source works fine, as I managed to get data from the GPS to my PC using them.
All while I'm running this code on the arduino:

[font=Courier]void setup()  {
 Serial.begin(4800);
}

void loop() {
 char hardSerialChar = Serial.read();
 Serial.print(hardSerialChar, DEC);
}[/font]

I simplified the code a bit. I don't know what baud rate the arduino PC-side software uses for uploading code to the arduino, but I have set the Serial monitor to listen using baud 4800.

As always, the result is a series of "-1" :(

I haven't got hold of a camera yet, but I'm working on it.

Thank you all for your help and patience. I really appreciate it!
Title: Re: simple serial issue
Post by: loldrup on Jan 25, 2009, 11:12 pm
Finally got some pictures up:
http://appliedusers.dk/jon/Arduino-GPS/4.JPG
http://appliedusers.dk/jon/Arduino-GPS/5.JPG
http://appliedusers.dk/jon/Arduino-GPS/1.JPG
http://appliedusers.dk/jon/Arduino-GPS/2.JPG
http://appliedusers.dk/jon/Arduino-GPS/3.JPG
http://appliedusers.dk/jon/Arduino-GPS/6.JPG
http://appliedusers.dk/jon/Arduino-GPS/7.JPG
http://appliedusers.dk/jon/Arduino-GPS/8.JPG

Any questions? Just ask. It all makes sense :)
The white cable is the USB from the PC to the Arduino. The black is the USB to Serial converter that came with the GPS. Its plugged into the PC as well.
The little black box with round edges on the laptop is the GPS. In between the GPS and the USB to Serial converter is a little homemade breakout device. Two wires goes to get some power from the USB to Serial converter, while the third (TX) is plugged into pin3 on the DB9-jack on the RS232 to TTL converter (sorry, the pin had fallen out on some of the pictures). This breakout-setup has been tested with the PC as the recipient, and it worked 100% - I received loads of NMEA-data.
From the TTL-side of the RS232 to Serial converter goes 4 pins: two to get power from the breadboard (measured at the pins: 5.00volt). The two other ("T" and "R") goes to pin 0 and 1 on the Arduino. My testing involved switching these pins, and trying to insert the TX-pin from the GPS in different holes in the female DB9-jack.
All I got was alot of "-1".. :/
Title: Re: simple serial issue
Post by: Jassper on Jan 25, 2009, 11:24 pm
Haven't looked them over real hard, but one thing I don't see is a common ground between the Arduino and the GPS. I see that you are powering the Arduino from the USB port of the PC, but does everything share a ground?

Easy thing to try is connect a wire from the Arduino ground to the all the oter grounds. 2 devices being powered from seperate supplies need to share a ground for data. I have done that to my self a few times.

It don't look like your problem is that simple, but you never know.
Title: Re: simple serial issue
Post by: macegr on Jan 25, 2009, 11:36 pm
Okay.

Two main problems.

1. Already mentioned, there is no common ground. RS232 requires a common ground between all devices. That explains why you got nothing when using SoftwareSerial, and why you wouldn't have gotten anything with hardware serial, if you had been aware of the next point:

2. Look over to the other side of the Arduino board. See those two other pins labeled 0 and 1, and also RX and TX? I think you know where I'm going with this.
Title: Re: simple serial issue
Post by: Jassper on Jan 25, 2009, 11:54 pm
I see someone already caught it, was just looking over the pics again. You aren't connected to the TX and RX pins on the Arduino.
Title: Re: simple serial issue
Post by: loldrup on Jan 26, 2009, 10:19 am
:-[
This is slightly embarrasing..
Now it apparently works. At least I see loads of digits - all of which is something else than "-1". Only issue now is that the Arduino IDE has started freezing 100% when I try to upload new code to my board. It just writes "Uploading to I/O board..." and then its dead. Afte 5 mins I kill it from Windows task manager. That means I cant change:

[font=Courier]Serial.print(hardSerialChar, DEC);[/font]

into:

[font=Courier]Serial.print(hardSerialChar, BYTE);[/font]

So I can have a final confirmation that what I see is the NMEA-data (but what could it else be).


But anyway, thank you all for your help. It really was a simple serial issue ;)
Title: Re: simple serial issue
Post by: macegr on Jan 26, 2009, 06:05 pm
Just add the common ground and go back to the software serial code, you can't upload because pins 0 and 1 are also used for the bootloader. If you attach something to them, it can easily interfere with the upload, that's why we were all skeptical of that method at the beginning. Plus, you would see all the data twice, once when it was sent to the Arduino and PC from the GPS, and then again when the Arduino sent it to the PC.
Title: Re: simple serial issue
Post by: loldrup on Jan 26, 2009, 08:41 pm
to macegr:
I guess your comment apply generally to all projects that use the hardware serial port of the arduino? Or is there something in my setup that makes it extra delicate/complicated/unfortunate/risky?
I can't see how use of the hardware serial on the arduino can awoid having the effects you mention.
Title: Re: simple serial issue
Post by: macegr on Jan 26, 2009, 08:49 pm
Most successful hardware serial projects are connecting to only one device at a time. That means disconnecting other devices while downloading code to the Arduino.

It's why the software serial library exists.
Title: Re: simple serial issue
Post by: loldrup on Jan 26, 2009, 10:18 pm
I've now added common ground.

I guess one can actually brick a Arduino by writing a program that constantly sends some trivial data (like "A") to the PC

void setup()  {
Serial.begin(4800);
}

void loop() {
Serial.print("A");
}

That would make it impossible to ever write programs to it again, as it will hang, just as mine is doing now, when I upload while my GPS is connected.
Title: Re: simple serial issue
Post by: loldrup on Jan 26, 2009, 10:24 pm
WAUW, now it works perfectly :D

I'm using this code:

[font=Courier]void setup()  {
Serial.begin(4800);
}

void loop() {
if (Serial.available()) {
char hardSerialChar = Serial.read();
Serial.print(hardSerialChar, BYTE);
 }
}[/font]

The code without the if Serial.available inserted alot of "-1" in the NMEA-sentenses (hmm, one could actually figure out the cycle-speed of the 'void loop' function by looking at how many "-1" are for each NMEA-letter, and knowing that the baud rate of the GPS is 4800)

I had some issues right up till now. Using the power supply from the breadboard to support my GPS made it not turn on (which I didn't notice). Using the ground from the breadboard and the power line from the original GPS-cable also didn't work - the GPS turned on but couldn't communicate anything. Finally I added a wire from the ground on the breadboard to the ground-jack on the original GPS cable going to the computer. THEN it worked. PHEW!! I was getting really frustrated.

And yes: DON'T let data go into RX when uploading new code to the Arduino.
Title: Re: simple serial issue
Post by: mem on Jan 26, 2009, 10:29 pm
Good to hear you have it going and nice to see that Serial.available() has finally made it into your code.  ;)

Have fun!
Title: Re: simple serial issue
Post by: riz on Jan 26, 2009, 11:14 pm
i am not sure if this is where i ask anyway i am new to using arduino.
i am building a miniture dynamometer and i want to send four types of information(voltage,speed,load pressure) to my program (vb) over a serial link. please if anyone can help i would be gratefull
thanks
Title: Re: simple serial issue
Post by: mikalhart on Jan 27, 2009, 07:11 am
Quote
I guess one can actually brick a Arduino by writing a program that constantly sends some trivial data (like "A") to the PC


Hmmm.... that didn't brick my Arduino.
Title: Re: simple serial issue
Post by: loldrup on Jan 27, 2009, 09:39 am
to mikalhart:
no I figured that myself too. The problem only occurs with stuff going into the RX pin on the Arduino. And that you can aways mitigate by removing the source of that stuff. So no bricking option here :)