Go to advanced search

by obabarin
Tue Oct 16, 2018 8:39 pm
Forum: Troubleshooting
Topic: Bash script as Cron job to run at reboot
Replies: 8
Views: 353

Re: Bash script as Cron job to run at reboot

Thanks for the comments. The developer is yet to respond.
But I found a work around here https://www.raspberrypi.org/forums/view ... 6#p485866 . Though this comes with some inconvenience.
by obabarin
Tue Oct 16, 2018 9:59 am
Forum: Troubleshooting
Topic: Bash script as Cron job to run at reboot
Replies: 8
Views: 353

Re: Bash script as Cron job to run at reboot

Redirect stdout an stderr to a file. Something like command >/home/pi/output.txt 2>&1 Also post your systemd service file. All right @DirkS. Here is the journalctl out of the pigrab.service: -- Logs begin at Thu 2016-11-03 18:16:42 CET, end at Tue 2018-10-16 11:50:44 CEST. -- Oct 16 11:46:02 raspbe...
by obabarin
Mon Oct 15, 2018 6:11 pm
Forum: Troubleshooting
Topic: Bash script as Cron job to run at reboot
Replies: 8
Views: 353

Re: Bash script as Cron job to run at reboot

don't use cron use a systemd .service file Thanks for the suggestion. I tried out using the systemd, but it keeps restarting the script. I can't seem to find an option for not restarting. None of the parameters- no, always, no-success, on-failure, on-normal, on-abort seems to work appropiately. Any...
by obabarin
Mon Oct 15, 2018 3:03 pm
Forum: Troubleshooting
Topic: Bash script as Cron job to run at reboot
Replies: 8
Views: 353

Re: Bash script as Cron job to run at reboot

I see your script uses a mounted drive. Is the drive mounted at the time the script is executed? If not it will probably fail. For a quick test I would set the output to a local directory (e.g. /home/pi) Thanks for the tip. I changed the directory to save files to local memory other than external, ...
by obabarin
Mon Oct 15, 2018 11:32 am
Forum: Troubleshooting
Topic: Bash script as Cron job to run at reboot
Replies: 8
Views: 353

Bash script as Cron job to run at reboot

Dear, I created the following bash script for data logging from uart port using Grabserial which works find from the terminal. #!/bin/sh sleep 2 grabserial -v -d /dev/ttyAMA0 -T -b 115200 -e 3600 -Q -o "/media/pi/E27F-7413/PiData/file-%d-%m-%Y-%H.%M.%S.txt" -a I will want this script to run immediat...
by obabarin
Fri Oct 12, 2018 1:14 pm
Forum: Troubleshooting
Topic: Logging data to files (GRABSERIAL)
Replies: 12
Views: 883

Re: Logging data to files (GRABSERIAL)

if opt in ["-o", "--output"]: out_filename = arg if out_filename == "%": out_filename = "%Y-%m-%dT%H:%M:%S" if "%" in out_filename: out_filename = datetime.datetime.now().strftime(out_filename) This is the python code that parses the "-o" option. My interpretation is that you either: - has to use O...
by obabarin
Fri Oct 12, 2018 12:24 pm
Forum: Troubleshooting
Topic: Logging data to files (GRABSERIAL)
Replies: 12
Views: 883

Re: Logging data to files (GRABSERIAL)

Hi, not really, neither I wasn't able to find a solution nor looking for it from the author, my friend made me code written in C that grabs data from the file at specific time (ca 1hour) and formate them to suitable format and makes me a graph, displays me values etc. So I don't care about the file...
by obabarin
Fri Oct 12, 2018 9:21 am
Forum: C/C++
Topic: RPi losing bytes from custom sensor(Atmel microcontroller) over UART
Replies: 8
Views: 1413

Re: RPi losing bytes from custom sensor(Atmel microcontroller) over UART

As you are using a Pi3, I'll add this link, since by default you'll be using the mini-UART. If it is significant or not (see what you don't get with miniUART at the bottom) I don't know. But just for reference https://www.raspberrypi.org/documentation/configuration/uart.md I tried swapping the UART...
by obabarin
Wed Oct 10, 2018 8:31 am
Forum: Troubleshooting
Topic: Logging data to files (GRABSERIAL)
Replies: 12
Views: 883

Re: Logging data to files (GRABSERIAL)

TheZajic wrote:
Mon Jul 09, 2018 9:10 pm
Thank you so much anyway. Ill try to reach the author. I will leave a reply afterwards.
Hi,

did you get any update/solution from the author? Please post it here. We seem to share similar challenge, and I was hoping your thread will be of help to me.
by obabarin
Wed Oct 10, 2018 8:15 am
Forum: C/C++
Topic: RPi losing bytes from custom sensor(Atmel microcontroller) over UART
Replies: 8
Views: 1413

Re: RPi losing bytes from custom sensor(Atmel microcontroller) over UART

A couple of quick things you could try: 1) Better / sorter cables inc a decent ground link 2) Drop the speed Low voltage serial is prone to dropping bits (literally) it seems and with no software flow control (XON / XOFF for example) you may not have time to read data and process it before a buffer...
by obabarin
Wed Oct 10, 2018 8:13 am
Forum: C/C++
Topic: RPi losing bytes from custom sensor(Atmel microcontroller) over UART
Replies: 8
Views: 1413

Re: RPi losing bytes from custom sensor(Atmel microcontroller) over UART

Thanks for the contribution everyone. Since I am relatively new to programming and embedded systems (in fact, my codes are snippets from the internet), I will need more time to understand your proffered solutions and humbly request for simpler approaches and if possible code blocks examples to under...
by obabarin
Tue Oct 09, 2018 11:03 am
Forum: C/C++
Topic: RPi losing bytes from custom sensor(Atmel microcontroller) over UART
Replies: 8
Views: 1413

RPi losing bytes from custom sensor(Atmel microcontroller) over UART

I am looking for help/insight into a situation with my data transfer setup between a custom board and my Raspberry Pi3 setup. The custom board has a ATmel Microcontroller (AT32UC3A1512) which was programmed to configure a PLL/VCO, A/D conversion and transmit samples over UART to the Pi3 which saves ...

Go to advanced search