Serial console in Raspberry Pi 3 for testing FONA 808 - raspberry-pi

I'm trying to set up a FONA 808 to connect to the internet to a Raspberry Pi 3, but when I run the serial console "sudo screen / dev / serial0 115200" I'm sometimes answered with "OK" and in others the console displays the message as if it were electromagnetic noise, and at other times the console simply crashes Is this normal? How can I solve that?
I am using a Fona 808 Arduino Shield connected to 5V and the TX and RX ports pass through a level logic shifter to convert the logic of 5V of the fona to logic of 3.3V of the raspberry
I am following this tutorial:
https://learn.adafruit.com/fona-tethering-to-raspberry-pi-or-beaglebone-black/setup
Blocked console:
Electric noise display:

Check your /boot/cmdline.txt file.
This is how I solve my pi with the same error.
nano /boot/cmdline.txt or sudo nano /boot/cmdline.txt
copy the script below and paste this in your cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
make sure "console=ttyAMA0,115200" is not on the script.
Make sure you have your original script. Test your pi if it reboot correctly. If it doesn't you can change back the cmdline.txt directly on your sd card and paste your original script.
This command should work with the response back
sudo screen /dev/serial0 115200
AT
ok

This should be a comment but I don't have the reputation to comment so...
Couple of things to try that might help.
1) You shouldn't need the level logic shifter. I don't know exactly what FOAN board you are using but they normally have a Vio pin that sets the voltage of the logic. So in this case you just connect the Vio pin to 3.3V on the Raspberry Pi and the RX and TX will be working at 3.3V.
2) Check your wire connections. Might just be a case of a bad connection.
3) I had better luck with minicom than screen So a command like this should work to connect the bard. sudo minicom -b 115200 -o -D /dev/ttyS0

Related

Raspberry Pi Zero W not interacting with GSM HAT

I have Raspberry Pi Zero W and this hat.
I did the following things:
disabled login shell through serial in rasp-config
enabled serial port hardware in rasp-config
removed console=serial0 in /boot/cmdline.txt
added lines to /boot/config.txt:
enable_uart=1
dtoverlay=pi-miniuart-bt
Then I restart the RPI.
Problem...
But when I do sudo minicom -D /dev/serial0 (serial1, ttyS0, and ttyAMA0 doesnt work either), it says its offline...
Am I missing something?
Here are all the files that might be interesting:
cmdline.txt
config.txt
To switch the bluetooth controller to the mini-UART so you can use the PL011 UART to communicate with your HAT, you should specify
dtoverlay=miniuart-bt
Alternatively you can use
dtoverlay=pi3-miniuart-bt
which was kept around for backwards compatibility.

RPi Zero with RTC DS1307 - Remote I/O Error

EDIT: This problem is solved! the problem was a script running on the pi, which occupied the SCL pin (in my case a script listening for a shutdown button). So it was not able to read the rtc.
I'm currently following this tutorial to connect my Raspberry Pi Zero W running Jessie Lite to the RTC DS1307.
The rtc is being recognized when running sudo i2cdetect -y 1 with "UU", so everything fine until this point.
But when entering sudo hwclock -D -r I'm getting an error:
Does anybody have any experience or hints with this error? I was researching for 1 1/2 day now, but could not find a working solution. Any help is appreciated.
Back then I was not able to answer my own question. I have already edited the main post, but to close this question:
This problem is solved! the problem was a script running on the pi, which occupied the SCL pin (in my case a script listening for a shutdown button). So it was not able to read the rtc.

How to hide all boot text in Raspberry pi

When the raspberry pi booting, how to remove all the boot text we are seeing in the Raspberry pi. Once the raspberry pi booted, it shows nothing but after few time going to the desktop. No terminal booting commands are showing. Can someone has a solutions for this ?
This has worked for me too.
sudo nano /boot/cmdline.txt
change console=tty1 to console=tty3
add these at the end of the line: loglevel=3 quiet logo.nologo
Just need to add loglevel=1 to cmdline.txt in the /boot partition
More detail here

Raspberry pi 2 .start wifi on boot

i have just bought a raspberry pi 2 . i manged to set up a headless setup by setting up an ip in the commandline.txt file and then connect to it via putty.
In the /etc/network/interfaces i set up a static ip for the wifi connection along with the connection name and password. and the wifi works fine...
But the problem is the raspberry pi wont connect to wifi unless i connect the ethernet cable and make one ssh connection using putty..
If i boot using wifi only the green light will not turn up and i am not sure if the raspberry is booting or no...but when the ethernet is connected the gren light starts blinking and i can make an ssh connection.
can anyone help me with this.
I've dealt with a lot of pi wifi issues.
Adding "auto wlan0" to /etc/network/interfaces helped, but there were still instances where it didn't start up. I have the edimax ew-7811un usb wifi adapter. Can't remember where I took this script from to give credit.
I have cron running this script (wifi_check.sh) every five minutes:
keepalive_host='ip to ping here'
ping -q -c1 $keepalive_host >> /dev/null
if [ "$?" -ne "0" ]; then
ifdown wlan0
rmmod 8192cu
modprobe 8192cu
ifup wlan0
fi
You could repurpose the script and have something like this in crontab
#reboot /bin/sleep 30 ; /path/to/wifi_check.sh
Which should wait 30 seconds after boot, try to ping the server you specify, if it can: do nothing, if it can't: bring the wifi connection down and then try to bring it back up. I don't think the lines with 8192cu in them are necessary for your purposes unless that driver is also used by your wifi adapter.

Data Transmission Stop from Raspberry Pi

I am trying to establish a communication b/w raspberrypi(Raspbian) and PC(Microsoft XP) through GPIO PINS 14(Tx) and 15(Rx) for sending/receiving data... , RS-232 level converter is using for connection of GPIO to PC serial COM port and Voltage conversion from 3.3V to 12V...
I install minicom (Echo ON) at raspberry side and install Teraterm(ECHO OFF) at PC side.
Whatever I typed on minicom, it successfully appear on Minicom and Teraterm but when I tried same thing on Teraterm, it only appears on Teraterm not on minicom and also blocked by minicom (/dev/ttyAMA0). After that I am not able to send data from minicom to Teraterm.
But I just check one thing more and very surprise that, when shorting GPIO PIN 14& 15 together and starting typing on minicom... it just show me one character and stop after that...
Again I repeat whole process by closing/opening minicom, again it just show character and then stop.
Can you plz guide me why it happening and how do I resolve it?
I just read from this link that someone was also facing your kind of problem but not exactly what you are facing.
It is happened because Kernel takeover the control on console so It is good and very important to disconnect the connect of console and kernal from the startup.
Now you can follow these step, I am sure you will get rid from this trouble...
Start editing this file by this command
sudo vi /boot/cmdline.txt
Originally it contained:
dwc_otg.lpm_enable=0 rpitestmode=1 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
deleted the two parameters involving the serial port (ttyAMA0) to get the following:
dwc_otg.lpm_enable=0 rpitestmode=1 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
rebooted (sudo reboot) to confirm that kernel output was no longer going to the serial port. But the serial console was still available. So edited /etc/inittab:
sudo vi /etc/inittab
commented out the following line:
2:23:respawn:/sbin/getty -L ttyAMA0 9600 vt100
Finally, rebooted again and confirmed that nothing was touching the serial port anymore. Then, to test it out installed minicom on the Raspberry Pi:
sudo apt-get install minicom
And ran it:
minicom -b 9600 -o -D /dev/ttyAMA0
After, it is able to send data in both directions!