Send serial packets from UART.

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
gotnull
 
Posts: 32
Joined: Sun Oct 21, 2012 6:43 pm

Send serial packets from UART.

Post by gotnull »

I purchased the following breakout board from ModMyPi:

https://www.modmypi.com/shop/slice-of-p ... akout-boad

I can't seem to be able to send serial packets to an Arduino using /dev/ttyAMA0 on this breakout (if that's even correct since there's no real documentation on how to actually send the packets. Prior I have used an Xbee module on /dev/ttyUSB0 and am able to send packets to an Arduino with an Xbee shield just fine from my Raspberry Pi) so I thought I'd use the following tutorial to free UART:

I just followed this tutorial to free UART on my Raspberry Pi:

http://learn.adafruit.com/adafruit-nfc- ... -on-the-pi

I made all these changes and after the reboot I'm getting the following
errors:

Code: Select all

VFS: Unable to mount root fs via NFS, trying floppy
VFS: Cannot open root device "(null)" or unknown-block(2,0)
Please append a correct "root=" boot option: here are the available
partitions:
Kernel panic - not syncinc: VFS: Unable to mount root fs on
unknown-block(2,0)
...
It sits there with these errors and doesn't display a login prompt.

These are the only changes I made to free UART:

From the command prompt enter the following command:

Code: Select all

$ sudo nano /boot/cmdline.txt
And changed:

Code: Select all

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200
console=tty1 $
to:

Code: Select all

dwc_otg.lpm_enable=0 console=tty1 $
Step Two: Edit /etc/inittab

From the command prompt enter the following command:

Code: Select all

$ sudo nano /etc/inittab
And changed:

Code: Select all

#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
to:

Code: Select all

#Spawn a getty on Raspberry Pi serial line
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Step Three: Reboot your Pi.

tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: Send serial packets from UART.

Post by tldr »

looks like the pi isn't seeing you sd card. no way that i can think of that disabling the console would cause something like that. is your sd card seated properly?

User avatar
gotnull
 
Posts: 32
Joined: Sun Oct 21, 2012 6:43 pm

Re: Send serial packets from UART.

Post by gotnull »

tldr wrote:looks like the pi isn't seeing you sd card. no way that i can think of that disabling the console would cause something like that. is your sd card seated properly?
Yes, I can confirm that the SD card is seated properly.

This happens with two separate SD cards with the exact same image after I make those changes.

tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: Send serial packets from UART.

Post by tldr »

i don't think the console changes are your problem, but you could always mount the sd card on another system and roll back the changes. easy to do if you've got a linux box around... actually i don't know what file system they're using on the pi. might be a fat system. if you have to edit the files on a windows box, try to find an editor that will write unix line endings.

if you've got that breakout board plugged into the pi, i'd suggest removing it and maybe examining it for shorts. definitely try booting without it.

User avatar
gotnull
 
Posts: 32
Joined: Sun Oct 21, 2012 6:43 pm

Re: Send serial packets from UART.

Post by gotnull »

Thanks for help. It ended up being a $ character at the end of the line!

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”