Serial Gateway connect problem ttyAMA0
-
Hi all,
Using Mysensors 2.11, latest version of Domoticz (3.58.77), Arduino pro mini 5V directly connected to RPI2 through Tx/Rx connection (having carefully made a voltage divider for 3.3 V Rx on RPI2), have compiled SerialGateway with following parameters :

No connection to Serial Gateway (even after waiting for hours ) :

So I tried to lock the ttyAMA0 in order to see if Domoticz is really tries to connect to ttyAMA0, so have locked ttyAMA0 :

And Domoticz is happy with this (as after a restart of Dmz service) !

No error seen...I suspect Domoticz doesn't try to connect to ttyAMA0. I already fully disabled the serial boot ability and log on ttyAMA0 in RPI (systemctrl diasble,sudo systemctl stop getty.target, /boot/cmdline.txt does'nt contain any ttyAMA0 reference, disable serial-getty@ttyAMA0.service, ...)
The same hardware is fully functional with my old SD Card (Rasbian/Mysensors installed 1 year ago) !Is anybody knows what's wrong
-
how many different USB devices do you have connected to your RPI2?
Mine using RPI3 is connected to dev/ttyUSB0
what happens when you type in a command prompt dmesg | grep tty?dmesg |grep tty [ 0.000000] Kernel command line: 8250.nr_uarts=0 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa02082 bcm2709.serial=0x206ad9b smsc95xx.macaddr=B8:27:EB:06:AD:9B bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait [ 0.001343] console [tty1] enabled [ 1.893707] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2 [ 21.511692] systemd[1]: Cannot add dependency job for unit getty-static.service, ignoring: Unit getty-static.service failed to load: No such file or directory. [ 21.769044] systemd[1]: Starting system-getty.slice. [ 21.775173] systemd[1]: Created slice system-getty.slice. [ 33.592862] usb 1-1.4: cp210x converter now attached to ttyUSB1 [ 33.603346] usb 1-1.3: ch341-uart converter now attached to ttyUSB0You find something like this:
ch341-uart converter now attached to ttyUSB0 -
Hi all,
Using Mysensors 2.11, latest version of Domoticz (3.58.77), Arduino pro mini 5V directly connected to RPI2 through Tx/Rx connection (having carefully made a voltage divider for 3.3 V Rx on RPI2), have compiled SerialGateway with following parameters :

No connection to Serial Gateway (even after waiting for hours ) :

So I tried to lock the ttyAMA0 in order to see if Domoticz is really tries to connect to ttyAMA0, so have locked ttyAMA0 :

And Domoticz is happy with this (as after a restart of Dmz service) !

No error seen...I suspect Domoticz doesn't try to connect to ttyAMA0. I already fully disabled the serial boot ability and log on ttyAMA0 in RPI (systemctrl diasble,sudo systemctl stop getty.target, /boot/cmdline.txt does'nt contain any ttyAMA0 reference, disable serial-getty@ttyAMA0.service, ...)
The same hardware is fully functional with my old SD Card (Rasbian/Mysensors installed 1 year ago) !Is anybody knows what's wrong
-
This :

But I'm not using USB to serial converter, I'm only using native serial GPIO Tx/Rx pins like I said in my 1st post.
-
This :

But I'm not using USB to serial converter, I'm only using native serial GPIO Tx/Rx pins like I said in my 1st post.
-
Maybe it's a rights problem, can you sudo minicom it? Your domoticz user should be added to the group allowing access to ttys. For me it's group uucp.
@pansen
I Think, that it is "dialout" group.
Or try start Domoticz: sudo ./domoticzBut I found informations, that handle of "tty"s depends on Rapsbian version too.
"Because OS version jessie has changed to using systemd, the file /etc/initab no longer exists. You must use the systemd command systemctl to stop getty.target that is attached to /dev/ttyAMA0
pi@raspberrypi:~ $ sudo systemctl stop getty.target
NOTE: This will release ttyAMA0 until you reboot/restart the raspberry pi. After you reboot you will have to give the command again."
And for the best - on RPI3 ttyAMA0 is connected to Bluetooth and gpio is ttyS0 and is software emulated.
-
Did you try to this?
sudo nano /boot/config.txt
Add to the end:enable_uart=1
sudo nano /boot/cmdline.txt
Remove everything and add this:
dwc_otg.lpm_enable=0 console=tty1 elevator=deadline net.ifnames=0 root=/dev/mmcblk0p2 rootfstyTaken from here:
https://community.openhab.org/t/has-anyone-gotten-razberry-working-with-openhab-2/12539/11
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login

