Strato Server PI FreeBSD 11.1 Release serial port comunication

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Strato Server PI FreeBSD 11.1 Release serial port comunication

Stefan Parvu
Hi guys,

I have installed FreeBSD 11.1 [1] under Strato Server PI [2], a Raspberry PI2 board plus
goodies. FreeBSD 11.1 STABLE is booting fine. Now my problem is to connect to an
indoor air quality sensor, plugged in to a RS485 connector and Im stuck in discovering whats
the correct serial port for that. I have tried /dev/cuau0 but with no success.

root@k50dev:~ # ls -lrt /dev/cuau0*
crw-rw----  1 uucp  dialer  0x2d Sep  4 12:22 /dev/cuau0.lock
crw-rw----  1 uucp  dialer  0x2c Sep  4 12:22 /dev/cuau0.init
crw-rw----  1 uucp  dialer  0x2b Sep  4 12:22 /dev/cuau0

I know all parameters set on the device level, baudrate, stopbits, parity since I have tried it under
Raspbian and it is working fine there. Im basically using Kronometrix data recording rs485rec [3]
fo that.

Any ideas how can I discover the port, and debug it somehow ?

thanks,
Stefan

[1] http://ftp.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/11.1/FreeBSD-11.1-STABLE-arm-armv6-RPI2-20170822-r322788.img.xz
[2] https://www.sferalabs.cc/strato-pi/ 
[3] https://github.com/kronometrix/recording/blob/master/bin/rs485rec 

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Strato Server PI FreeBSD 11.1 Release serial port comunication

Jukka A. Ukkonen
On 09/04/17 16:50, Stefan Parvu wrote:

> Hi guys,
>
> I have installed FreeBSD 11.1 [1] under Strato Server PI [2], a Raspberry PI2 board plus
> goodies. FreeBSD 11.1 STABLE is booting fine. Now my problem is to connect to an
> indoor air quality sensor, plugged in to a RS485 connector and Im stuck in discovering whats
> the correct serial port for that. I have tried /dev/cuau0 but with no success.
>
> root@k50dev:~ # ls -lrt /dev/cuau0*
> crw-rw----  1 uucp  dialer  0x2d Sep  4 12:22 /dev/cuau0.lock
> crw-rw----  1 uucp  dialer  0x2c Sep  4 12:22 /dev/cuau0.init
> crw-rw----  1 uucp  dialer  0x2b Sep  4 12:22 /dev/cuau0
>
> I know all parameters set on the device level, baudrate, stopbits, parity since I have tried it under
> Raspbian and it is working fine there. Im basically using Kronometrix data recording rs485rec [3]
> fo that.
>
> Any ideas how can I discover the port, and debug it somehow ?
>
> thanks,
> Stefan
>
> [1] http://ftp.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/11.1/FreeBSD-11.1-STABLE-arm-armv6-RPI2-20170822-r322788.img.xz
> [2] https://www.sferalabs.cc/strato-pi/
> [3] https://github.com/kronometrix/recording/blob/master/bin/rs485rec
>
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "[hidden email]"
>


What are the other /dev/cua* devices on your system?
Quite often various USB connected gizmos I have tried
end up under names like /dev/cuaU0 or /dev/cuaU1 etc.

--jau
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Strato Server PI FreeBSD 11.1 Release serial port comunication

Stefan Parvu
>
> What are the other /dev/cua* devices on your system?
> Quite often various USB connected gizmos I have tried
> end up under names like /dev/cuaU0 or /dev/cuaU1 etc.

Nothing else. I do have just that.

I have tried as well to play with a FTDI USB connector (plugs in to the USB port)
and that works fine. So basically I can connect my IAQ sensor on such USB to
Serial RS485 connector and yes, I do get some: /dev/cuaU0 device easily that case.

But my problem is if I want to directly plug the IAQ sensor to the RS485 board
provided by SferaLabs without using such FTDI USB connector. The SferaLabs is basically
another board which connects to the GPIO ports of the RBPI2.

I cant make it run nor detect anything. Wonder if there is something else on the kernel
to make it happen

Stefan
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Strato Server PI FreeBSD 11.1 Release serial port comunication

Ian Lepore-3
In reply to this post by Stefan Parvu
On Mon, 2017-09-04 at 16:50 +0300, Stefan Parvu wrote:

> Hi guys,
>
> I have installed FreeBSD 11.1 [1] under Strato Server PI [2], a
> Raspberry PI2 board plus
> goodies. FreeBSD 11.1 STABLE is booting fine. Now my problem is to
> connect to an
> indoor air quality sensor, plugged in to a RS485 connector and Im
> stuck in discovering whats 
> the correct serial port for that. I have tried /dev/cuau0 but with no
> success. 
>
> root@k50dev:~ # ls -lrt /dev/cuau0*
> crw-rw----  1 uucp  dialer  0x2d Sep  4 12:22 /dev/cuau0.lock
> crw-rw----  1 uucp  dialer  0x2c Sep  4 12:22 /dev/cuau0.init
> crw-rw----  1 uucp  dialer  0x2b Sep  4 12:22 /dev/cuau0
>
> I know all parameters set on the device level, baudrate, stopbits,
> parity since I have tried it under
> Raspbian and it is working fine there. Im basically using Kronometrix
> data recording rs485rec [3]
> fo that.
>
> Any ideas how can I discover the port, and debug it somehow ?
>
> thanks,
> Stefan
>
> [1] http://ftp.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/11.1/Free
> BSD-11.1-STABLE-arm-armv6-RPI2-20170822-r322788.img.xz
> [2] https://www.sferalabs.cc/strato-pi/ 
> [3] https://github.com/kronometrix/recording/blob/master/bin/rs485rec
>  

I think /dev/cuau0 is the right device, but maybe the system is using
it as a console and has a getty active on the port.  Try editing
/etc/ttys and in this line:

ttyu0   "/usr/libexec/getty 3wire"      vt100   onifconsole  secure

Change "onifconsole" to "off".  That should leave the device free for
other software to access.

-- Ian
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Strato Server PI FreeBSD 11.1 Release serial port comunication

Bernd Walter-4
In reply to this post by Stefan Parvu
On Mon, Sep 04, 2017 at 05:41:46PM +0300, Stefan Parvu wrote:

> >
> > What are the other /dev/cua* devices on your system?
> > Quite often various USB connected gizmos I have tried
> > end up under names like /dev/cuaU0 or /dev/cuaU1 etc.
>
> Nothing else. I do have just that.
>
> I have tried as well to play with a FTDI USB connector (plugs in to the USB port)
> and that works fine. So basically I can connect my IAQ sensor on such USB to
> Serial RS485 connector and yes, I do get some: /dev/cuaU0 device easily that case.
>
> But my problem is if I want to directly plug the IAQ sensor to the RS485 board
> provided by SferaLabs without using such FTDI USB connector. The SferaLabs is basically
> another board which connects to the GPIO ports of the RBPI2.
>
> I cant make it run nor detect anything. Wonder if there is something else on the kernel
> to make it happen

The schematic (looked at the BASE/UPS) is quite clear.
It uses the one and only onboard UART, so cuau0 is correct, but under FreeBSD
that uart is already in use as the console.
You can use conscontrol to temporarily relocate the console, which should
allow you to use the uart.
The TXenable line seems to be autogenerated by the PIC microcontroller, so
I assume you don't need to care about it.

--
B.Walter <[hidden email]> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Strato Server PI FreeBSD 11.1 Release serial port comunication

Stefan Parvu
Done. Indeed the device was in fact the default, /dev/cuau0 but the
console would not allow me to use it. After changing ttys file everything started to work.

krmx@k50dev:~ % /opt/kronometrix/bin/rs485rec 10 2
1504561878:msd1618_1:27.31:31.89:9.10:443.00:0.10:0.60:0.60
1504561888:msd1618_1:27.31:31.89:9.10:443.00:0.10:0.60:0.60

Thanks Ian, Bernd.

Stefan
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"