Well - weewx is working now.  The file I included with weewx log entries 
showing the port being used by weewx was ttyUSAMA0 was extracted from an 
earlier attempt to get weewx going when I had been prompted to enter the 
serial port and did not recall correctly what it was so I guessed and it 
failed.  I had neglected to look at the time tags for the error messages. 
 Duh.

In any case all is working.  Thanks for your time.

On Friday, November 19, 2021 at 11:40:58 PM UTC-7 vince wrote:

> Your weewx.conf could call the device any random string you made up... but 
> if the os doesn't call the /dev/whatever the same thing it won't work end 
> to end.  You need to have the device in weewx.conf match whatever your 
> version of your os uses.  Just match'em up so weewx.conf reflects what your 
> os calls the device.
>
> Generating all locales would take a super-long time, FWIW.   I just do US 
> on mine.
>
> One question though - are you using a USB logger from your Vantage or a 
> serial logger and a serial-to-usb converter ?   Reason I ask is that the 
> device might be different as a result.   I just plugged a usb2serial 
> adaptor into my pi4 and saw a /dev/ttyUSB0 device created when I did so.
>
> You should see dmesg and lsusb and /var/log/messages reflect what you have 
> plugged in.  As always make sure you have any peripherals plugged all the 
> way in and nicely seated.
>
> Some transcripts below.  Hope this helps.
>
> (... from dmesg ...)
>
> [  384.036228] usb 1-1.2: new full-speed USB device number 3 using xhci_hcd
> [  384.181387] usb 1-1.2: New USB device found, idVendor=0403, 
> idProduct=6001, bcdDevice= 4.00
> [  384.181409] usb 1-1.2: New USB device strings: Mfr=1, Product=2, 
> SerialNumber=3
> [  384.181427] usb 1-1.2: Product: usb serial converter
> [  384.181445] usb 1-1.2: Manufacturer: ftdi
> [  384.181462] usb 1-1.2: SerialNumber: ftEG4K86
> [  384.274042] usbcore: registered new interface driver usbserial_generic
> [  384.274107] usbserial: USB Serial support registered for generic
> [  384.281958] usbcore: registered new interface driver ftdi_sio
> [  384.282045] usbserial: USB Serial support registered for FTDI USB 
> Serial Device
> [  384.282243] ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter 
> detected
> [  384.282397] usb 1-1.2: Detected FT232BM
> [  384.286108] usb 1-1.2: FTDI USB Serial Device converter now attached to 
> ttyUSB0
>
> (... from lsusb ...)
>
> pi@pi4jr:~ $ sudo lsusb
> Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 001 Device 003: ID 0403:6001 Future Technology Devices International, 
> Ltd FT232 Serial (UART) IC
> Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>
> (... looking at devices ...)
> pi@pi4jr:~ $ ls -lgd /dev/tty*0
> crw--w---- 1 tty       4,  0 Nov 19 19:17 /dev/tty0
> crw--w---- 1 tty       4, 10 Nov 19 19:17 /dev/tty10
> crw--w---- 1 tty       4, 20 Nov 19 19:17 /dev/tty20
> crw--w---- 1 tty       4, 30 Nov 19 19:17 /dev/tty30
> crw--w---- 1 tty       4, 40 Nov 19 19:17 /dev/tty40
> crw--w---- 1 tty       4, 50 Nov 19 19:17 /dev/tty50
> crw--w---- 1 tty       4, 60 Nov 19 19:17 /dev/tty60
> crw-rw---- 1 dialout 204, 64 Nov 19 19:17 /dev/ttyAMA0
> crw-rw---- 1 dialout 188,  0 Nov 19 22:30 /dev/ttyUSB0    <====== this was 
> added
>
> (... tail on /var/log/messages ...)
> Nov 19 22:30:24 pi4jr kernel: [  384.036228] usb 1-1.2: new full-speed USB 
> device number 3 using xhci_hcd
> Nov 19 22:30:24 pi4jr kernel: [  384.181387] usb 1-1.2: New USB device 
> found, idVendor=0403, idProduct=6001, bcdDevice= 4.00
> Nov 19 22:30:24 pi4jr kernel: [  384.181409] usb 1-1.2: New USB device 
> strings: Mfr=1, Product=2, SerialNumber=3
> Nov 19 22:30:24 pi4jr kernel: [  384.181427] usb 1-1.2: Product: usb 
> serial converter
> Nov 19 22:30:24 pi4jr kernel: [  384.181445] usb 1-1.2: Manufacturer: ftdi
> Nov 19 22:30:24 pi4jr kernel: [  384.181462] usb 1-1.2: SerialNumber: 
> ftEG4K86
> Nov 19 22:30:24 pi4jr mtp-probe: checking bus 1, device 3: 
> "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2"
> Nov 19 22:30:24 pi4jr mtp-probe: bus: 1, device: 3 was not an MTP device
> Nov 19 22:30:24 pi4jr kernel: [  384.274042] usbcore: registered new 
> interface driver usbserial_generic
> Nov 19 22:30:24 pi4jr kernel: [  384.274107] usbserial: USB Serial support 
> registered for generic
> Nov 19 22:30:24 pi4jr kernel: [  384.281958] usbcore: registered new 
> interface driver ftdi_sio
> Nov 19 22:30:24 pi4jr kernel: [  384.282045] usbserial: USB Serial support 
> registered for FTDI USB Serial Device
> Nov 19 22:30:24 pi4jr kernel: [  384.282243] ftdi_sio 1-1.2:1.0: FTDI USB 
> Serial Device converter detected
> Nov 19 22:30:24 pi4jr kernel: [  384.282397] usb 1-1.2: Detected FT232BM
> Nov 19 22:30:24 pi4jr kernel: [  384.286108] usb 1-1.2: FTDI USB Serial 
> Device converter now attached to ttyUSB0
>
> On Friday, November 19, 2021 at 7:56:45 PM UTC-8 [email protected] wrote:
>
>>
>> My weewx.conf does refer to /dev/ttyAMA0 and the file /dev/ttyAMA0 does 
>> exist on my RPi.  The error that results refers to ttyUSAMA0 and I have no 
>> idea how that is happening.  
>> -------
>> When I run "sudo dmesg | grep -i serial" I get the following":
>>   
>> [    0.000000] Kernel command line: coherent_pool=1M 
>> snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 
>> video=HDMI-A-1:1600x900M<at>60 vc_mem.mem_base=0x1ec00000 
>> vc_mem.mem_size=0x20000000  console=ttyAMA0,115200 console=tty1 
>> root=PARTUUID=122a1e02-02 rootfstype=ext4 fsck.repair=yes rootwait quiet 
>> splash plymouth.ignore-serial-consoles
>> [    0.135509] Serial: AMBA PL011 UART driver
>> [    3.354256] usb usb1: New USB device strings: Mfr=3, Product=2, 
>> SerialNumber=1
>> [    3.354317] usb usb1: SerialNumber: 20980000.usb
>> [    3.396427] uart-pl011 20201000.serial: cts_event_workaround enabled
>> [    3.396616] 20201000.serial: ttyAMA0 at MMIO 0x20201000 (irq = 81, 
>> base_baud = 0) is a PL011 rev2
>> [    3.932516] usb 1-1: New USB device strings: Mfr=0, Product=0, 
>> SerialNumber=0
>> [    4.382606] usb 1-1.1: New USB device strings: Mfr=0, Product=0, 
>> SerialNumber=0
>> [    4.830868] usb 1-1.2: New USB device strings: Mfr=1, Product=2, 
>> SerialNumber=3
>> [    4.830929] usb 1-1.2: SerialNumber: 1.0
>> [    5.064101] usb 1-1.3: New USB device strings: Mfr=0, Product=1, 
>> SerialNumber=0
>> [    5.542410] usb 1-1.3.4: New USB device strings: Mfr=1, Product=2, 
>> SerialNumber=0
>> [    6.183704] uart-pl011 20201000.serial: no DMA platform data
>> [    8.178296] systemd[1]: Created slice system-serial\x2dgetty.slice.
>>
>> Obviously nothing in this output even refers to ttyAMAO.
>> -------
>> As far as the locale files I am not certain what you mean by build them 
>> with raspi-config.  When installing the new OS I recall I was asked 
>> information about locale and I answered that I was in the US, used American 
>> English and was in the Mountain time zone.  The configuration GUI 
>> accurately reflected what I input.  
>>
>> When I saw the errors about unknown locale I issued the commands export 
>> LC_CTYPE=en_US.UTF-8, export LC_MESSAGE=en_US.UTF-8, export 
>> LC_ALL=en_US.UTF-8.  Not sure if this is "building" them localization files 
>> or not. Not really I understand why this is showing up at this point.
>>
>> Also after your response I did run raspi-config and it was configured to 
>> populate all locales.  I also recall that the installation process took an 
>> large amount of time during the localization step of the OS installation. 
>>  Not sure if this is relevant or useful.  
>>
>> This is starting to seem like I do not have the serial port properly 
>> configured. I have not needed to do anything with previous OS updates so I 
>> it is not unreasonable to think that I may have forgotten something I did 
>> 10 years ago when I first built the RPi / weewx set up.
>>
>> Unfortunately I am not "fluent" in the RPi and Raspbian. I am tempted to 
>> see if I can create an installation of Buster and see if it works. Assuming 
>> it works I can then wait a couple of months to upgrade to Bullseye.  Of 
>> course if it does not, I guess I am simply right back here.
>>
>> Uggh but thanks,
>> Chip
>> On Friday, November 19, 2021 at 7:59:34 PM UTC-7 vince wrote:
>>
>>> On Friday, November 19, 2021 at 6:37:34 PM UTC-8 [email protected] 
>>> wrote:
>>>
>>>> I am rebuilding my RPi and have copied the weewx.conf and weewx.sdb 
>>>> from my previous implementation.  When I attempt to start weewx it exits 
>>>> beceause it can't find the serial port. The error message in the log file 
>>>> indicates that the port is ttyUSAMA0 while the weewx.conf has ttyAMA0.  
>>>> Not 
>>>> sure what has happened.  
>>>>
>>>>
>>> I see /dev/ttyAMA0 in my clean bullseye-based Raspi.  Just go with it 
>>> and use that.  Worst that happens is it still doesn't work :-)
>>>
>>> Run "sudo dmesg | grep -i serial" and see what it reports.
>>> Mine reports:
>>> [    1.411259] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 38, 
>>> base_baud = 0) is a PL011 rev2
>>>
>>>  
>>>
>>>> FYI the OS version has changed from Buster in my previous implementatio 
>>>> to Bullseye very recently.  
>>>>
>>>> During the OS install I have seen some errors about the locale being 
>>>> unknown. LC_MESSAGE, LC_ALL and LC_CTYPE.  I executed export commands for 
>>>> each setting them to en_US.UTF-8. No idea why this happened or if it is 
>>>> related. 
>>>>
>>>
>>> Did you actually build locale files for en_US.UTF-8 with raspi-config ???
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/30177c5a-d8fd-4eac-bb02-a8cb0626cc78n%40googlegroups.com.

Reply via email to