Connection between router and display not working

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
Post Reply
lookat
Posts: 6
Joined: Mon Jun 13, 2011 9:20 am
Contact:

Connection between router and display not working

Post by lookat »

Hi all,

my wifi radio is working fine, but I cannot send any info to LCD. MPD is working fine, I flashed atmega correctly. Display is showing the wifi radio project info.

But the connection between router and display doesn`t work. How can I debug the connection? The cable (GND-TX-RX) is ok.
In router I can see /dev/tts/0.

I tried to add tuning control and start interface.sh, but the connections still not working. In generally there is some problem, but I don`t know where :twisted:

FTDI port is working well.

Can someone help me? I got dead end :cry:

Thanks, lOOk
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Connection between router and display not working

Post by mightyohm »

So you can talk to the router over the serial connector if you use your FTDI cable, but when you connect the microcontroller it doesn't work?

Are you using the shell scripts I provided to talk to the display? The baud rate has to be set up (with stty, which is not provided by the firmware at openwrt.org, but is included in my firmware) and there is a "go" command that the display must receive before it will start displaying artist/title information.
lookat
Posts: 6
Joined: Mon Jun 13, 2011 9:20 am
Contact:

Re: Connection between router and display not working

Post by lookat »

You are right I can manage router through FTDI cable. But whe connect to microconroller, nothing happend.

I am working with your firmware.

I tried manually command to send some string to /dev/tts/0.

stty 9600 < /dev/tts/0
echo "currentsong" | nc localhost 6600 | grep -e "^Title: "-e "^Name: " > /dev/tts/0

On display nothing changed, I can see only Wfi project info.

Thank you for response.
rosbif
Posts: 4
Joined: Fri Apr 08, 2011 5:35 am

Re: Connection between router and display not working

Post by rosbif »

FIrst off, Jeff, this is a superb project. It's just a shame I don't have time to concentrate on it more (I've been doing this on and off for the last three months!)

I'm also facing the same issue at this time.

I'm trying to echo the "Go" command but am not having much success (which I assume is the "AVR Start!" string) using :

stty 9600 < /dev/tts/0
echo "AVR Start!" > /dev/tts/0

I assume that's right?

Then I try to run the display program, but it doesn't push anything to the LCD display.

N
rosbif
Posts: 4
Joined: Fri Apr 08, 2011 5:35 am

Re: Connection between router and display not working

Post by rosbif »

D'Oh.

It appears that I needed to run the "make fuse" command after burning the AT with the latest firmware.
lookat
Posts: 6
Joined: Mon Jun 13, 2011 9:20 am
Contact:

Re: Connection between router and display not working

Post by lookat »

Hi rosbif,

could you more explain what you did?

I flash AT with AVR_wifiradio_interface HEX file and then I tried "make fuse" command. In both cases I got succesfull flashing info.

....
avrdude: verifying ...
avrdude: 3534 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.

Connection between router and display is GND -> GND and TX -> second pin on AT.

Thanks a lot
lookat
Posts: 6
Joined: Mon Jun 13, 2011 9:20 am
Contact:

Re: Connection between router and display not working

Post by lookat »

Finally i found new info for me:

I need to burn fuses
hfuse 0xDF
lfuse 0xC7

I hope this will help:
avrdude -c usbtiny -p atmega168 -U lfuse:w:<0xc7>:m
avrdude -c usbtiny -p atmega168 -U hfuse:w:<0xdf>:m
lookat
Posts: 6
Joined: Mon Jun 13, 2011 9:20 am
Contact:

Re: Connection between router and display not working

Post by lookat »

connection is working with flashing hex file with this command:

avrdude -c usbtiny -p atmega168 -U flash:w:main.hex:i -U hfuse:w:0xDF:m -U lfuse:w:0xC7:m
Post Reply