Page 1 of 1

Receiving unreadable text from serial connection

Posted: Mon Mar 17, 2014 5:04 am
by tobarix
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?

Re: Receiving unreadable text from serial connection

Posted: Mon Mar 17, 2014 6:20 am
by gerben
Sound to me like a different baud-rate. Make sure the sending and receiving end are using the same baudrate.

Re: Receiving unreadable text from serial connection

Posted: Mon Mar 17, 2014 7:16 am
by tobarix
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.

Re: Receiving unreadable text from serial connection

Posted: Mon Mar 17, 2014 10:53 am
by gerben
Could you post the output you are getting, and the output of mpc (i.e. what you should get)?

Re: Receiving unreadable text from serial connection

Posted: Tue Mar 18, 2014 2:42 am
by tobarix
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.

Re: Receiving unreadable text from serial connection

Posted: Tue Mar 18, 2014 8:49 am
by gerben
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.

Re: Receiving unreadable text from serial connection

Posted: Wed Mar 19, 2014 4:43 am
by tobarix
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.

Re: Receiving unreadable text from serial connection

Posted: Wed Mar 19, 2014 8:01 am
by tobarix
Problem solved. I just changed atmega168 into atmega328p in the flash command.