Receiving unreadable text from serial connection

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
Post Reply
tobarix
Posts: 9
Joined: Mon Mar 17, 2014 4:42 am

Receiving unreadable text from serial connection

Post by tobarix » Mon Mar 17, 2014 5:04 am

Hallo there, I am new in this field but I made it so far. It plays. While waiting for my stuff to flash the AVR (I want the tuning thing)
I connected my Imac/Zterm via a Sitecom CN104 serial adapter to the router to read the stations and songs playing. All I got is unreadable coded text which refreshes about every second. It responses to a station change initiated from my Ipad MPoD App.
Installed are display2.sh and interface.sh both executable.
How do I get readable text?

User avatar
gerben
Posts: 164
Joined: Sat Oct 16, 2010 8:41 am
Location: Netherlands

Re: Receiving unreadable text from serial connection

Post by gerben » Mon Mar 17, 2014 6:20 am

Sound to me like a different baud-rate. Make sure the sending and receiving end are using the same baudrate.

tobarix
Posts: 9
Joined: Mon Mar 17, 2014 4:42 am

Re: Receiving unreadable text from serial connection

Post by tobarix » Mon Mar 17, 2014 7:16 am

Thanks, baud rates are OK. It is not garbage. It repeats the same code and after a station change it repeats a new code. I guess it needs translation. Maybe the Sitecom adapter meshes things up.

User avatar
gerben
Posts: 164
Joined: Sat Oct 16, 2010 8:41 am
Location: Netherlands

Re: Receiving unreadable text from serial connection

Post by gerben » Mon Mar 17, 2014 10:53 am

Could you post the output you are getting, and the output of mpc (i.e. what you should get)?

tobarix
Posts: 9
Joined: Mon Mar 17, 2014 4:42 am

Re: Receiving unreadable text from serial connection

Post by tobarix » Tue Mar 18, 2014 2:42 am

Thanks

This is what I got:
Station: Radio Swiss Jazz
Title: Is n't Romantic
Read from my Ipad App MPaD

Zterm reads this:


ekUit*Z?}W=%?%?m#1?m?[!%=#-9ek,**Z?[
=7-!?Y-?k=

ekUit*Z?}W=%?%?m#1?m?[!%=#-9ek,**Z?[=7-!?Y-?k=

ekUit*Z?}W=%?%?m#1?m?[!%
=#-9ek,**Z?[=7-!?Y-?k=

ekUit*Z?}W=%?%?m#1?m?[!%=#-9ek,**Z?[=7-!?Y-?k=

ekUit*Z?}W=%
?%?m#1?m?[!%=#-9ek,**Z?[=7-!?Y-?k=

ekUit*Z?}W=%?%?m#1?m?[!%=#-9ek,**Z?[=7-!?Y-?k=


ekUit*Z?}W=%?%?m#1?m?[!%=#-9ek,**Z?[=7-!?Y-?k=

ekUit*Z?}W=%?%?m#1?m?[!%=#-9ek,**Z
?[=7-!?Y-?k=

ekUit*Z?}W=%?%?m#1?m?[!%=#-9ek,**Z?[=7-!?Y-?k=

I ordered a FTDI cable to rule the serial adapter mismatch out.

User avatar
gerben
Posts: 164
Joined: Sat Oct 16, 2010 8:41 am
Location: Netherlands

Re: Receiving unreadable text from serial connection

Post by gerben » Tue Mar 18, 2014 8:49 am

Doesn't seem like a baudrate problem. Try using screen instead of zterm.

Also try some of the options, like cs8|cs7,ixon|-ixon,ixoff|-ixoff,istrip|-istrip (see http://www.cyberciti.biz/faq/unix-linux ... baud-rate/). Also try -parity. And there is an option to change the stop bits in serial.

tobarix
Posts: 9
Joined: Mon Mar 17, 2014 4:42 am

Re: Receiving unreadable text from serial connection

Post by tobarix » Wed Mar 19, 2014 4:43 am

Now I am really lost. I Tried to flash my ATmega328P with this result:
iMac-van-Fred:temp FRED$ make flash
avrdude -c usbtiny -p atmega168 -U flash:w:main.hex:i

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATmega168 is 1E 94 06
Double check chip, or use -F to override this check.

avrdude done. Thank you.


Can I override this check and how do I do that?
I am not a programmer, I just follow the Mightyohm instructions.

tobarix
Posts: 9
Joined: Mon Mar 17, 2014 4:42 am

Re: Receiving unreadable text from serial connection

Post by tobarix » Wed Mar 19, 2014 8:01 am

Problem solved. I just changed atmega168 into atmega328p in the flash command.

Post Reply