Nope. It doesn't work with ttyS1 either. This is really weird.
Posts made by Radek
-
RE: Enable UART2. Or use UART0
-
RE: Enable UART2. Or use UART0
@György-Farkas said in Enable UART2. Or use UART0:
picocom -b 9600 /dev/ttyS2
Ok, I followed your advice and it seems to be working. At least between my Mac and Omega.
I am not getting why I cannot communicate with the A9G from Omega when it works from my Mac.It's weird
Regards,
Radek -
RE: Enable UART2. Or use UART0
Connected A9G modem to it and tried to communicate with it. As it didn't worked connected it to a USB/TTL adapter and tried to establish connection between my Mac and Omega2
-
RE: How can I pass one GPIO pin to an other?
@György-Farkas said in How can I pass one GPIO pin to an other?:
Please...
Sorry about that
What is your Omega2 device?
Omega2+
What firmware are you using?
Device Firmware Version: 0.3.2 b232
Are you using an genuine Onion Dock?
How do you connect your A9Gboard to your Omega2? Some circuit diagram / schematic would be nice.
I'm not quite how does actually matters for my question but here you go
UART1 is connected to UART_GPS
Pin 16 and 17 (UART2) is connected AT_RX and AT_TX respectively. The UART2 doesn't work by the way.Regards,
Radek -
RE: Enable UART2. Or use UART0
I executed this command:
@György-Farkas said in enable uart2 is posiible on Omega2+??:
After this command
omega2-ctrl gpiomux set spi_s pwm01_uart2
Omega2(+)'s UART2 (ttyS2) works well using GPIO16 as TX2 and GPIO17 as RX2 (8N1 default BAUD rate 9600 bps).# Omega2+ FW v0.2.2 b201 root@Omega-5BE1:~# omega2-ctrl gpiomux set spi_s pwm01_uart2 set gpiomux spi_s -> pwm01_uart2 root@Omega-5BE1:~# omega2-ctrl gpiomux get Group i2c - [i2c] gpio Group uart0 - [uart] gpio Group uart1 - [uart] gpio pwm01 Group uart2 - [uart] gpio pwm23 Group pwm0 - pwm [gpio] Group pwm1 - pwm [gpio] Group refclk - refclk [gpio] Group spi_s - spi_s gpio [pwm01_uart2] Group spi_cs1 - [spi_cs1] gpio refclk Group i2s - i2s [gpio] pcm Group ephy - [ephy] gpio Group wled - wled [gpio]
Regards,
Radek -
Enable UART2. Or use UART0
As the UART0 seems to be occupied by the operating system I tried to enable UART2 and followed this post but it just doesn't works for me.
Is there anything I might be missing?
Regards,
Radek -
RE: How can I pass one GPIO pin to an other?
Hi guys,
Thanks for your answers. Yes, this is what I actually tried to ask: how can i programmatically pass GND to those two pins.
I don't think connecting pins from Omega would do the trick as I need to pass GND.
For the moment the only idea I have is to buy relays but I would rather try to avoid it of possibleRegards,
Radek -
RE: How can I pass one GPIO pin to an other?
Ha, ok
The one I use is a A9G. Sadly there is basically no documentation for this board.
Thanks in advance
-
How can I pass one GPIO pin to an other?
Hi,
I'm probably thinking too much around so I will rather explain what I need.
I have a GPS tracker which has two pins, one for reset one for power on. Both needs a GND connected to these pins respectively for about three seconds.
Is it Possible to pass GND to those pins programmatically or do I need a relay for itRegards,
Radek -
RE: Is it possible to use ogps for a generic GPS tracker
@crispyoz I got it. Thanks a lot. I was just too excited
-
RE: Install Docker on openwrt
I am fairly new to Omega but I doubt you would be able to install docker with the limited space
-
RE: Is it possible to use ogps for a generic GPS tracker
OMG. I am such an idiot. One typo and I am wasting your precious time. But
It is XXXXX works right now
Thank you sooooo much. It works perfectly now. I am sooooo happy.
Regards,
Radek -
RE: Is it possible to use ogps for a generic GPS tracker
Ok guys, I discovered another thing. When I start the demon with the file I modified it will return the signal=false. But if I start ugps manually with
ugps -b 9600 /dev/ttyS1 &
theubus call gps info
will returnroot@Omega-9A9F:~# ubus call gps info { "age": 1, "latitude": "49.928703", "longitude": "9.003965", "elevation": "147.6", "course": "", "speed": "" }
So I am pretty sure the ogps itself works perfectly ok now.
-
RE: Is it possible to use ogps for a generic GPS tracker
Wow, we are definitely a step further. When I start the version @Marko-Lukat provided with
ugps -b 9600 -S -d 7 /dev/ttyS1
this is what I am getting:root@Omega-9A9F:~# ugps -b 9600 -S -d 7 /dev/ttyS1 Failed to add object: Invalid argument ugps: date: 2020-06-30T19:51:08 UTC ugps: position: 49.928734 9.003940 ugps: height: 149.8 ugps: date: 2020-06-30T19:51:09 UTC ugps: position: 49.928734 9.003942 ugps: height: 149.5 ugps: date: 2020-06-30T19:51:10 UTC ugps: position: 49.928734 9.003942 ugps: height: 149.1 ugps: date: 2020-06-30T19:51:11 UTC ugps: position: 49.928734 9.003945 ugps: height: 148.8 ugps: date: 2020-06-30T19:51:12 UTC ugps: position: 49.928726 9.003947 ugps: height: 148.5
I modified the
/etc/init.d/ugps
like this:#!/bin/sh /etc/rc.common # Copyright (c) 2014 OpenWrt.org START=80 USE_PROCD=1 PROG=/usr/sbin/ugps service_triggers() { procd_add_reload_trigger gps } start_service() { local tty="$(uci get gps.@gps[-1].tty)" [ -d "/sys/class/tty/$tty/" ] || return procd_open_instance procd_set_param command "$PROG" "-d 9600" "/dev/$tty" procd_set_param respawn procd_close_instance }
But
ubus call gps info
still returns:root@Omega-9A9F:~# ubus call gps info { "signal": false }
I am probably missing some small thing. But thanks a lot for your help. It's already a huge successes.
Regards,
Radek -
RE: Is it possible to use ogps for a generic GPS tracker
wow, wait, it looks like the coordinates in the file are multiplied about 100 times
-
RE: Is it possible to use ogps for a generic GPS tracker
Guys, as first I would just like to say, I'm involved in an Open Source project and participate in few others and I really don't remember to ever encounter such a friendly and helpful community. I really thank you so much.
@Marko-Lukat : sadly it still doesn't work for me and the log file (nice name) is being actually filled with correct data. I'm pretty sure I'm screwing something.
Attaching the log file.
Sorry, wasn't able to upload for some reason. Here it is: https://cloud.sigsiu.net/f/d3d210f48188414581e0/
-
RE: Is it possible to use ogps for a generic GPS tracker
ok, so I decided to start from scratch. I reseted my Omega2+ to factory settings. Then installed stty, and screen.
Now the default baud rate for ttyS0 is set to 115200 which kinda make sense as it is the baud rate you can see in docs should be the default.
I checked the ttyS1 and the baud rate is by default set to 9600 so I connected the tracker to the ttyS1
After this:- I can read it with
cat
and it gives me correct data. - I can read it with
screen
and it gives me correct data as well.
As next I installed ogps, configured it to use ttyS1. Then run
ubus call gps info
but still no signal.
Then I replaced the/usr/sbin/ugps
with the version provided by @crispyoz (a huge, huge thanks for it) runubus call gps info
and not getting signal as well.Following it I installed
gpsd
andgpsd-clients
, configured it. After runninggpsmon
and can see followingSo that seems to be working fine. Also
cgps -s
seems to be working fine:I could of course try to use gpsd but I would really prefer to get ogps working.
Another question is: can I change the baud rate of ttyS0? Because I need also to connect the GSM module which also requires baud rate of 9600.
If I understand it correctly the baud rate of 115200 is set by the operating system because Omega2 is sending login data during boot process. If I am not wrong in regular Linux I could change the kernel boot option but I don't know how to do this in Omega.
Oh yes, and I can't change the baud rate using
stty
. When I try to executestty -F /dev/ttyS0 9600
it just hang until I kill it with ctrl+cSo here I am right now. Thanks a lot for your help guys
- I can read it with
-
RE: Is it possible to use ogps for a generic GPS tracker
ok, I am really despaired.
When I have ogps installed:
- When I ask baud rate with stty it gives me 4800
- I'm trying to change the baud rate to 9600 (with stty) it won't let me
- When I'm reading the ttyS0 with cat it gives me junk
- When I'm reading the ttyS0 with screen with 9600 baud rate it gives me junk
When I remove ogps :
- When I ask baud rate with stty it gives me 9600
- When I'm reading the ttyS0 with cat it gives me proper informations
- When I'm reading the ttyS0 with screen with 9600 baud rate it gives me proper informations
I enabled also debug but it won't return anything.
Any clues?
Regards,
Radek -
RE: Is it possible to use ogps for a generic GPS tracker
Ok, installed it again and it won't work.
I haven't use the omega for anything else before. I basically initialised it, installed mc and ogps and it's all.When I install ogps and then use screen to read it I'm getting junk but as I wrote before, I assume it's normal.
The log file doesn't contains anything about "gps" whatsoever.
@Lazar-Demin @Marko-Lukat is there a way to change the baudrate?
Regards,
Radek