Let's visualize how this wave will look like:

Now that I know how it's looks like, I can modify it to my liking. First of all, I do not want it to send out a signal when the line is idle (or else my front door would be open all the time!). This is accomplished by adding a diode to the TD wire. This means that I can only use the positive signal to send to my front door switch. Next, whenever I send a byte out the serial port, I'd like it to be as continuous as possible. Therefore I send out only 0 bits, this is called a null character.
Serial ports cannot give a lot of amps, and I actually don't know how much amps my front door system will ask of my serial port (or even if it will ask any at all) once the current starts flowing. As it turns out, anything below 500 mA should be safe, so that's the rated current for my fuse (if it breaks I'll know my front door system sucks out to much juice and I'll have to come up with something else).
Finally, I know how the entire picture looks like, here's how it looks like schematically:

(click for larger image)
It's all in place, it's time to test for the first time if all my research that I've done so far will suffice! I plugged in the connector, fired up a prompt, and elegantly typed:
$ echo 0 > /dev/ttyS0Side note: I'm actually sending out the bits 0110000 (= ASCII code 48 = 0). I was anxious to try it out and I couldn't be bothered at the time on finding out how to send a null character to my serial port from command line :-) (which is "echo -en \\0000 > /dev/ttyS0" on Linux, btw.)
Side note #2: /dev/ttyS0 is the serial port under Linux, doing a “echo 0 > COM1” in Windows will have the same effect.
W000000000000000T! My doors opened! I couldn't believe it! So naturally I tried it again, hmm, that's odd, the doors didn't open...
My first assumption was that the fuse had blown, so I checked that, but it wasn't. Next, I tried to echo data to the serial port again, and again, and again, but this time with more bytes:
$ echo 0000000000000000 > /dev/ttyS0That worked! Apparently the front door black box system has to receive the signal at a given moment for a given amount of time, or else the door will not open. I just was VERY lucky that it opened on the first time, with just sending 1 byte (or else I might have assumed something wasn't working and I'd be stuck for a long time figuring this out). Maybe that adjusting the baud rate of the port would solve this problem, but I'll settle for sending more bytes (so I can send “I AM 1337! 101100111001!” to my front door, and it opens in fear of me :-))
So far so good, this was the easy part! I'll be posting about my Java Bluetooth application for my server and phone in a short while.
ugg sale
ReplyDeletemichael kors handbags
pandora
ugg outlet
timberland boots
christian louboutin outlet
fitflops sale clearance
ralph lauren outlet
coach outlet
coach outlet store online clearances
20161224caiyan
Coach Outlet Store Online Kate Spade Outlet Cheap Jordans Coach Purses Coach Outlet Kate Spade Outlet Nike Air Max Shoes Red Bottom Shoes Adidas Yeezy Boost 350 Adidas Original
ReplyDelete3、
ReplyDeletechristian louboutin
birkenstock outlet
ferragamo outlet
fitflops sale clearance
reebok shoes
adidas outlet online
cheap jordans
coach outlet
ferragamo shoes
mowang05-27
stone island outlet
ReplyDeletelebron 17 shoes
kevin durant shoes
curry 8 shoes
pandora jewelry
jordan shoes
bape clothing
stephen curry shoes
moncler
longchamp