Pulling data from 4.2.4 via GPIO?


 

Daniel Harris

New member
I have a small project I am working on, with getting my HM 4.2.4 to send out data via a digital amatuer radio interface. But because I can't get the drivers for the protocols needed to build on openwrt (along with the kernel models), I am having to look into a solution of pulling the data from the ATMega on the 4.2.4 board via gpio (or any other method) on a rPi running debian.

Basically I am trying to pull the pin data from the ATmega chip from gpio (like with python). I can talk to the AT chip already, but I dont know how to pull down its info. Any help (even with other utils) would be fine as I am just looking for the raw values of the thermsister ports.

Thanks

Daniel
 
You want to pull down its info, like the status updates of temperature?
Code:
stty -F /dev/ttyAMA0 -echo raw 38400
cat /dev/ttyAMA0
You might also need to turn off the kernel or init taking over the serial port for logging too in cmdline.txt and /etc/inittab

Also you can send commands if you want actual raw data like ADC count or resistance using the `echo -e \\n/set?sp=0A > /dev/ttyAMA0` (or 0R for resist). It's just a mini serial port, you can access it with any Python tools at 38400 baud.
 
Thanks. I'll try this when I get home.

I know I already have the console stuff disabled. I didn't think it was just a serial port.
 
Yup! Actually linkmeterd just opens /dev/ttyAMA0 and starts reading lines from it acting like a buffer between the serial interface and the web (well technically it goes through a unix socket to the web but the point is it is all just serial data).
 
Thanks that did it.

Getting output like this from my 4 probes connected:

$HMSU,225,72.7,70.4,69.5,69.8,100,99,0,100*26

Now to just get it updating the radio without spamming updates. But this is EXACTLY what I needed. Thanks again.
 
I'm excited to see your project when it is done! I try to document everything as much as possible so people can build things I never even imagined.
 

 

Back
Top