LinkMeter v2 Homebrew BBQ Controller - Part 2


 
stty -F /dev/ttyS1 -a

speed 115200 baud;stty: /dev/ttyS1
line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
 
Originally posted by RJ Riememsnider:
Also If I cat /dev/ttyS0 with HM connected to S0, nothing
If I cat /dev/ttyS1 with HM connected to S1, I get output.
Your /etc/inittab does look like this right? (With the # in front of the last two lines)
<pre class="ip-ubbcode-code-pre">
::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K shutdown
#ttyS0::askfirst:/bin/ash --login
#tty1::askfirst:/bin/ash --login
</pre>

It is odd that when you try to write to /dev/ttyS0 it hangs. It is like the output buffer is full and it is waiting for space to write.

What if you set the ports to raw mode? `stty -F /dev/ttyS1 raw ispeed 115200 ospeed 115200`
 
Originally posted by Bryan Mayland:
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by RJ Riememsnider:
Also If I cat /dev/ttyS0 with HM connected to S0, nothing
If I cat /dev/ttyS1 with HM connected to S1, I get output.
Your /etc/inittab does look like this right? (With the # in front of the last two lines)
<pre class="ip-ubbcode-code-pre">
::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K shutdown
#ttyS0::askfirst:/bin/ash --login
#tty1::askfirst:/bin/ash --login
</pre>

It is odd that when you try to write to /dev/ttyS0 it hangs. It is like the output buffer is full and it is waiting for space to write.

What if you set the ports to raw mode? `stty -F /dev/ttyS1 raw ispeed 115200 ospeed 115200` </div></BLOCKQUOTE>

YES!
Thit is what my inittab looks like
Now some things work. Now I get:
S1tx-S1rx nothing
S0tx-S1rx works perfect
S0tx-S0rx output over and over again, see below
S1tx-S0rx nothing

Looks like S1TX is shot

Output:
hello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^Jhello^J^
 
Aha! Well that is good news. I think the key parameter might be "ixon" which means that for some reason if the serial port gets a ASCII 19 byte, the serial port stops transmitting. For some reason your routers that don't work might be starting with this bit set or maybe some garbage during the boot process ends up setting it?

In any case you can try changing /usr/lib/lua/lucid/linkmeterd.lua at line 259:
<pre class="ip-ubbcode-code-pre">
if os.execute("/bin/stty -F " .. SERIAL_DEVICE .. " " .. SERIAL_BAUD)
//change to
if os.execute("/bin/stty -F " .. SERIAL_DEVICE .. " raw " .. SERIAL_BAUD)
</pre>
and if that works on every reboot, I think I can safely add that as the default. It works fine with my system.
 
No real change after changing that Bryan other than loopback works for me on S0tx to S1RX.

More detail on S0tx-S0rx:
When I echo to S0, I no longer get the repeated text, The screen just clears with no visible text. I assume it all CRs or spaces or something. This continues until I disconnect the loopback then the buffer will clear and I can get back to a prompt.
 
Yeah I dunno what else it could be. Maybe try setting the port to sane `stty -F /dev/ttyS1 sane 115200`? I don't really much more about how this works than you do. Maybe you can find something in the stty man page that would help.
 
Originally posted by Bryan Mayland:
Yeah I dunno what else it could be. Maybe try setting the port to sane `stty -F /dev/ttyS1 sane 115200`? I don't really much more about how this works than you do. Maybe you can find something in the stty man page that would help.

Thanks Bryan for all your help. I'll let you know what /if I find as an answer.
 
I got lazy and just bought a premade bracket.
icon_smile.gif
 
Ok, another question. Has anyone figured out a notification system? I was thinking what would really be great would be the router sending out an email or SMS message to my cell phone notifying me the meat has hit proper temp or even if there was an error, etc.? I'm going to miss the beep sound my maverick makes when food is to temp...
 
Notifications are going to be handled by the alarm subsystem, which isn't in yet. The idea being that the linkmeterd will kick off an action when HeaterMeter alarm goes off. From there, some standard actions would be:
- Email message
- Web request (e.g. post to twitter)
- Change pit setpoint

SMS is difficult because there's no SMS server so there's nowhere to send a message to. You can fake it if your cell provider has an email address you can send to that forwards to your phone like 8135552121@mobile.att.net. Big companies use commercial SMS gateways to send text messages which cost money.
 
Awesome, I was thinking there might be some API possibilities with Google voice or something like that, but any notification of email, twitter, etc, would be great. Or even a way of activating a sound command on a local computer.

Originally posted by Bryan Mayland:
Notifications are going to be handled by the alarm subsystem, which isn't in yet. The idea being that the linkmeterd will kick off an action when HeaterMeter alarm goes off. From there, some standard actions would be:
- Email message
- Web request (e.g. post to twitter)
- Change pit setpoint

SMS is difficult because there's no SMS server so there's nowhere to send a message to. You can fake it if your cell provider has an email address you can send to that forwards to your phone like 8135552121@mobile.att.net. Big companies use commercial SMS gateways to send text messages which cost money.
 
Originally posted by Bryan Mayland:
Notifications are going to be handled by the alarm subsystem, which isn't in yet. The idea being that the linkmeterd will kick off an action when HeaterMeter alarm goes off. From there, some standard actions would be:
- Email message
- Web request (e.g. post to twitter)
- Change pit setpoint

SMS is difficult because there's no SMS server so there's nowhere to send a message to. You can fake it if your cell provider has an email address you can send to that forwards to your phone like 8135552121@mobile.att.net. Big companies use commercial SMS gateways to send text messages which cost money.

It would be really nice to also have a hard output line, like to close activate a buzzer or flash a light. Usually when I'm cooking, my router has no internet access to send something.
 
Originally posted by Bryan Mayland:
Notifications are going to be handled by the alarm subsystem, which isn't in yet. The idea being that the linkmeterd will kick off an action when HeaterMeter alarm goes off. From there, some standard actions would be:
- Email message
- Web request (e.g. post to twitter)
- Change pit setpoint

SMS is difficult because there's no SMS server so there's nowhere to send a message to. You can fake it if your cell provider has an email address you can send to that forwards to your phone like 8135552121@mobile.att.net. Big companies use commercial SMS gateways to send text messages which cost money.

This is going to be so great! After reading more recently about what causes butts to stall (apparently it's mostly evaporation and not collagen breakdown like was previously thought), I've decided to stop spraying my meat, so having the ability to just set an "Oh ****" alarm and being able to just go to bed on overnight smokes would be awesome.
 

 

Back
Top