Code Monkey home page Code Monkey logo

consolepi's People

Contributors

ma-ysina avatar mileswdavis avatar pack3tl0ss avatar victorhooi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

consolepi's Issues

Include drivers for Aruba 9000 Series gateway series

It would be great to include the cp210x drivers for the USB serial console of the Aruba 9004 and Aruba 9012. I had to compile these from source to get them installed but they are available.

I am willing Fork and give it a shot if you give me some guidance on how you would like it organized in the installer script.

consolepi-addconsole improper behavior when blank line left at EOF (rules file)

Found that if the ConsolePi udev rules file has a blank line at EOF the script doesn't factor that in when it determines what port # to use next.

Need to fix 2 things:

  1. get the port # from ser2net not the alias in the udev file, may drop the current practice of appending _port to the alias as it's not overly relevant in the menu, also if user has added custom stuff they may not follow that practice.

  2. strip blank lines from the end of the rules file. Same for ser2net.conf, however in ser2net the impact is just a blank line in between entries.

Latest RaspberryPi OS uses incompatible python version

Just imaged a Pi with the latest Raspberry Pi OS and tried to install ConsolePi, it seems to break in Rpi.GPIO, which is a known issue for python 3.9

https://sourceforge.net/p/raspberry-gpio-python/tickets/198/

Apparently it was fixed in 0.7.1a4. I updated my ConsolePi/installer/requirements.txt to pull this new version and it installed with no problems.

No clue when they bumped the python version, but I must be the first to have run into this

ConsolePi should not assume pi user

As part of hardening after installing Raspbian, I create a new user with sudo permissions and remove the pi user created by Raspbian.

Perhaps the ConsolePi installer should use the current user instead of defaulting to pi?

Remote ConsolePI is not recognized with mDNS

Hi
In my Lab, i have two RP's. One acts as gateway with a WAN and LAN facing Interface.
The second RP is placed in the LAN Segemnt - or behind the gateway. Both of the RP's are successful connected to serial connections.

But no one of theese RP's can see each other thru mDNS. Does ConsolePI only listen on one Interface for mDNS messages?
Of course i can ship more printouts of my setup!

Thank you very much for your time!

pi@oob-gateway:/etc/ConsolePi $ consolepi-details
{
.....
            },
            "cpuserial": "10000000315c8ccf",
            "interfaces": {
                "_ip_w_gw": "192.168.10.50",
                "eth0": {
                    "ip": "192.168.10.50",
                    "isgw": true,
                    "mac": "dc:a6:32:81:b0:36"
                },
                "eth0.100": {
                    "ip": "10.11.12.1",
                    "isgw": false,
                    "mac": "dc:a6:32:81:b0:36"
                }
            },
            "rem_ip": "192.168.10.50",
            "user": "pi"
        }
    },
    "outlets": null,
    "remotes": null
}

Installation fails on Pi 1B Buster

Hi,

more like an fyi

installation fails on

Sep 10 17:19:05 [734][INFO][Collect Pi Info] Raspberry Pi Model B hw rev 2.0 512 MB (Mfg Sony)
Sep 10 17:19:05 [734][INFO][Collect Pi Info] Raspbian GNU/Linux 10.13 (buster) running on BCM2835 Revision: 000e
Sep 10 17:19:05 [734][INFO][Collect Pi Info] Linux raspberrypi 5.10.103+ #1529 Tue Mar 8 12:19:18 GMT 2022 armv6l GNU/Linux
Sep 10 17:19:06 [734][INFO][Collect Pi Info] RaspiOS Lite
Sep 10 17:19:06 [734][INFO][Collect Pi Info] Python 3 Version Python 3.7.3

with error:

`Collecting pydantic-core==2.6.3 (from pydantic>=1.10.0->-r /etc/ConsolePi/installer/requirements.txt (line 58))
Downloading pydantic_core-2.6.3.tar.gz (337 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 337.2/337.2 kB 793.8 kB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]

  Cargo, the Rust package manager, is not installed or is not on PATH.
  This package requires Rust and Cargo to compile extensions. Install it through
  the system's package manager or via https://rustup.rs/
  
  Checking for Rust toolchain....
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Sep 10 18:15:06 [734][ERROR][Prepare/Check Python venv] Error - pip install/upgrade ConsolePi requirements
Sep 10 18:15:06 [734][ERROR][Prepare/Check Python venv] Last Error is fatal, script exiting Please review log /tmp/consolepi_install.log

---- Error Detail ----
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Sep 10 18:15:06 [734][ERROR][Prepare/Check Python venv] Error - pip install/upgrade ConsolePi requirements`

I have the same issue with a fresh install of Bullseye but since Buster was specifically mentioned in the hardware requirements i thought i'll give it a shot.

Found some mentions that it's an issue with 32bit python. Would have tried to use these old ones as a remote but if something is fundamentally broken it time to let them go.

consolepi-upgrade fails

I see the following error when trying to upgrade ConsolePi:

`Apr 11 17:32:56 [INFO][Collect Pi Info] Raspberry Pi 2 Model B hw rev 1.1 1 GB (Mfg by Sony)
Apr 11 17:32:56 [INFO][Collect Pi Info] Raspbian 10.3 (Buster) running on BCM2835 Revision: a01041
Apr 11 17:32:56 [INFO][Collect Pi Info] Linux RPi-02 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l GNU/Linux
Apr 11 17:32:56 [INFO][Collect Pi Info] Raspbian Lite
Apr 11 17:32:56 [INFO][Collect Pi Info] Python 3 Version Python 3.7.3
Apr 11 17:32:56 [INFO][Update/Upgrade ConsolePi (apt)] Update Sources
Apr 11 17:32:57 [INFO][Update/Upgrade ConsolePi (apt)] Skipping Source Update - Already Updated today
Apr 11 17:32:57 [INFO][Update/Upgrade ConsolePi (apt)] Upgrading ConsolePi via apt. This may take a while
Apr 11 17:33:01 [INFO][Update/Upgrade ConsolePi (apt)] Upgrade Successful
Apr 11 17:33:01 [INFO][Update/Upgrade ConsolePi (apt)] Performing dist-upgrade
Apr 11 17:33:05 [INFO][Update/Upgrade ConsolePi (apt)] dist-upgrade Successful
Apr 11 17:33:05 [INFO][Update/Upgrade ConsolePi (apt)] Tidying up (autoremove)
Apr 11 17:33:08 [INFO][Update/Upgrade ConsolePi (apt)] Everything is tidy now
Apr 11 17:33:08 [INFO][Update/Upgrade ConsolePi (apt)] Install/update git (apt)
Apr 11 17:33:11 [INFO][Update/Upgrade ConsolePi (apt)] git install/upgraded Successful
Apr 11 17:33:11 [INFO][Update/Upgrade ConsolePi (apt)] Process Complete

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Apr 11 17:33:26 [INFO][ConsolePi-Upgrade-Prep (install libssl-dev)] Success Installing development files for libssl
Apr 11 17:33:26 [INFO][ConsolePi-Upgrade-Prep (create consolepi group)] consolepi group already exists
Apr 11 17:33:26 [WARNING][ConsolePi-Upgrade-Prep (create consolepi group)] Error adding pi user to consolepi group
Apr 11 17:33:27 [INFO][ConsolePi-Upgrade-Prep (verify permissions)] Success ~ Update Permissions for /etc/ConsolePi/
Apr 11 17:33:27 [INFO][ConsolePi-Upgrade-Prep (verify permissions)] Permissions for /etc/ConsolePi/.git already OK
Apr 11 17:33:27 [INFO][git Clone/Update ConsolePi] Directory exists Updating ConsolePi via git
From https://github.com/Pack3tL0ss/ConsolePi
4fa4fe5..b310f1e master -> origin/master
a48d162..3d8c35a dev -> origin/dev
[new tag] stretch-final -> stretch-final
Apr 11 17:33:33 [INFO][git Clone/Update ConsolePi] ConsolePi update/pull Success
Apr 11 17:33:33 [INFO][Prepare/Check Python venv] Prepare/Check Python venv - Starting
Apr 11 17:33:33 [INFO][Prepare/Check Python venv] /etc/ConsolePi/venv directory already exists
Apr 11 17:33:33 [INFO][Prepare/Check Python venv] Upgrade pip
/etc/ConsolePi/venv/bin/python3: No module named pip
Apr 11 17:33:34 [WARNING][Prepare/Check Python venv] WARNING - pip upgrade returned error
Apr 11 17:33:34 [INFO][Prepare/Check Python venv] pip install/upgrade ConsolePi requirements - This can take some time.
/etc/ConsolePi/venv/bin/python3: No module named pip
Apr 11 17:33:34 [ERROR][Prepare/Check Python venv] Error - pip install/upgrade ConsolePi requirements
`
I can see pip and pip3 in /etc/ConsolePi/venv/bin/.

FTDI missing serial numbers

Per the adapters recommendation, bought a FTDI-based unit, only to find it didn't have serial numbers! :-(

16-port FTDI unit:
https://www.coolgear.com/product/16-port-industrial-rs232-to-usb-2-high-speed-serial-adapter

Internally, it's a USB hub, with 4x Future Technology Devices International, Ltd FT4232H Quad HS USB-UART/FIFO IC
on it.

Each device presents as follows (noticed serial is empty):

Bus 001 Device 005: ID 0403:6011 Future Technology Devices International, Ltd FT4232H Quad HS USB-UART/FIFO IC
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0403 Future Technology Devices International, Ltd
  idProduct          0x6011 FT4232H Quad HS USB-UART/FIFO IC
  bcdDevice            8.00
  iManufacturer           1 FTDI
  iProduct                2 Quad RS232-HS
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0065
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              2 Quad RS232-HS
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              2 Quad RS232-HS
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              2 Quad RS232-HS
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x06  EP 6 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              2 Quad RS232-HS
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x08  EP 8 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

AttributeError when renaming device

Edit: Version Info`

pi@consolepi:~ $ consolepi-version
   ______                       __     ____  _
  / ____/___  ____  _________  / /__  / __ \(_)
 / /   / __ \/ __ \/ ___/ __ \/ / _ \/ /_/ / /
/ /___/ /_/ / / / (__  ) /_/ / /  __/ ____/ /
\____/\____/_/ /_/____/\____/_/\___/_/   /_/
  https://github.com/Pack3tL0ss/ConsolePi

ConsolePi Version: 2021-1.1 Installer Version 54
  - Versioning Style is YYYY-major.minor

Your current commit is dated  Wed Mar 17 15:55:59 2021 -0500
Your branch is up to date with 'origin/master'.

use consolepi-help for a list of commands (consolepi-menu being the main one)
refer to the GitHub for additional detail

Available Devices:
3. ttyUSB2 [9600 8N1]
4. ttyUSB3 [9600 8N1]
5. ttyUSB4 [9600 8N1]
6. ttyUSB5 [9600 8N1]

See output below after trying to rename a device 6:

 Press 'enter' to keep the same name and change baud/parity/...
 [rename ttyUSB5]: Provide desired name: xA_pm8xx

 Please Confirm Rename ttyUSB5 --> xA_pm8xx? (y/n): y
 Use default connection values [9600 8N1 Flow: No]? (y/n): y


 This Device Does not present a serial # (LAME!).  So the adapter itself can't be uniquely identified.
 There are 2 options for naming this device:
Traceback (most recent call last):
  File "/etc/ConsolePi/src/consolepi-menu.py", line 1434, in <module>
    cpi_menu.main_menu()
  File "/etc/ConsolePi/src/consolepi-menu.py", line 1092, in main_menu
    cpi.cpiexec.menu_exec(choice_c, menu_actions)
  File "/etc/ConsolePi/src/pypkg/consolepi/exec.py", line 684, in menu_exec
    menu_actions[ch]()
  File "/etc/ConsolePi/src/consolepi-menu.py", line 945, in rename_menu
    cpi.cpiexec.menu_exec(choice_c, menu_actions, calling_menu='rename_menu')
  File "/etc/ConsolePi/src/pypkg/consolepi/exec.py", line 478, in menu_exec
    response = menu_actions[ch]["function"](*args, **kwargs)
  File "/etc/ConsolePi/src/pypkg/consolepi/udevrename.py", line 207, in do_rename_adapter
    self.menu.menu_formatting('body', text=mlines)
AttributeError: 'Menu' object has no attribute 'menu_formatting'

Integration of serial ports ttySC0 + ttySC1 to local serial adapter list?

Hello.
How do I get the serial ports ttySC0 and ttySC1 connected, which are provided by the Waveshare Serial Expansion HAT 15667 module (https://www.waveshare.com/wiki/Serial_Expansion_HAT)?
With USB adapters everything works fine, but the serial ports refuse to be recognized.
I have already tested an adjustment of the file "10-ConsolePi.rules" with port information without success, because there seems to be an entry in another place.

Attached is the information from the "udevadm info -a -n /dev/ttySC0":

 looking at device '/devices/platform/soc/3f804000.i2c/i2c-1/1-0048/tty/ttySC0':
    KERNEL=="ttySC0"
    SUBSYSTEM=="tty"
    DRIVER==""
    ATTR{close_delay}=="50"
    ATTR{closing_wait}=="3000"
    ATTR{console}=="N"
    ATTR{custom_divisor}=="0"
    ATTR{flags}=="0x8002000"
    ATTR{io_type}=="0"
    ATTR{iomem_base}=="0x0"
    ATTR{iomem_reg_shift}=="0"
    ATTR{irq}=="199"
    ATTR{line}=="0"
    ATTR{port}=="0x0"
    ATTR{power/control}=="auto"
    ATTR{power/runtime_active_time}=="0"
    ATTR{power/runtime_status}=="unsupported"
    ATTR{power/runtime_suspended_time}=="0"
    ATTR{type}=="108"
    ATTR{uartclk}=="14745600"
    ATTR{xmit_fifo_size}=="64"

  looking at parent device '/devices/platform/soc/3f804000.i2c/i2c-1/1-0048':
    KERNELS=="1-0048"
    SUBSYSTEMS=="i2c"
    DRIVERS=="sc16is7xx"
    ATTRS{name}=="sc16is752"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/platform/soc/3f804000.i2c/i2c-1':
    KERNELS=="i2c-1"
    SUBSYSTEMS=="i2c"
    DRIVERS==""
    ATTRS{name}=="bcm2835 (i2c@7e804000)"

  looking at parent device '/devices/platform/soc/3f804000.i2c':
    KERNELS=="3f804000.i2c"
    SUBSYSTEMS=="platform"
    DRIVERS=="i2c-bcm2835"
    ATTRS{driver_override}=="(null)"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/platform/soc':
    KERNELS=="soc"
    SUBSYSTEMS=="platform"
    DRIVERS=="simple-pm-bus"
    ATTRS{driver_override}=="(null)"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/platform':
    KERNELS=="platform"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"

Thanks a lot,
Tim

Ser2net Make Fails

Just installed ConsolePi on the latest Raspbian. Got an error during the install script that ser2net make failed. Ran apt-get install ser2net, then re-ran script and was able to successfully complete the install.

zero 2 W Install hung up

Hi via autoinstall or semi-automatic install on a zero 2 w i have the problem that the install prozess hung up at Building wheel for zeroconf :

Building wheels for collected packages: zeroconf
Building wheel for zeroconf (pyproject.toml) ... \

Aliases take over serial port names

Hi,

I'm using /etc/ConsolePi/src/remote_launcher.py in my sshd_config so I can SSH to an IP and open that IPs assigned console-port. As mentioned here.

Today we decided to add names to console-ports, but when we try to SSH to an IP we get the following:

➜  ~ ssh [email protected]
[email protected]'s password:
ttyUSB0 Not found on system... Refreshing local adapters.
ttyUSB0 Not found on system... Exiting.
Connection to 192.168.1.10 closed.

Is there anyway to keep the name ttyUSB0? The device still exists on the system.
Or even better for predictability assign multiple aliases?
An idea would would be on first boot or first connect of a console-cable, assign an alias like cpi0, cpi1, cpi2 to enhance predictability from start. And then users can add an alias of the users choosing.

Thanks! ConsolePi is so well made!

Edit:
Just found I can add udev SYMLINK names like so:
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB81ADGV", SYMLINK+="cpi0 switch-134", GOTO="END"
And both cpi0 and switch-134 would be created. I have to manually create a ser2net-config.

bluetooth issue

Hi,

Am kinda new to this.
Managed to install the consolepi but unable to get the bluetooth working on MacOS.
Everytime I try to pair with the consolepi, it shows connected a while change and remain in a not connected state.
There is an error at the raspbian as follows
gdbus.error:org.bluez.error.failed: protocol not available

Tried one of the suggested way of adding an override rfcomm.service as the following also does not work.

[Unit]
Description=RFCOMM service
After=bluetooth.service
Requires=bluetooth.service

[Service]
ExecStart=/usr/bin/rfcomm watch hci0 1 socat /dev/ttyACM0,raw,echo=0,crnl /dev/r
fcomm0,raw,echo

[Install]
WantedBy=multi-user.target

Ethernet and Hotpsot is working fine without any issue.
Its just I'm not able to get bluetooth to work

Error HASH not match from the requirements file

Hi,

I has been tried to install consolePI but not working.
in below the output error, someone could you help me to solve it?

-- Output of "pip install --upgrade -r /etc/ConsolePi/installer/requirements.txt" --

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: RPi.GPIO in /etc/ConsolePi/venv/lib/python3.9/site-packages (0.7.1)
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting dlipower>=1.0.176 (from -r /etc/ConsolePi/installer/requirements.txt (line 1))
  Using cached https://www.piwheels.org/simple/dlipower/dlipower-1.0.176-py3-none-any.whl (14 kB)
Collecting fastapi>=0.103.2 (from -r /etc/ConsolePi/installer/requirements.txt (line 2))
  Using cached https://www.piwheels.org/simple/fastapi/fastapi-0.110.0-py3-none-any.whl (92 kB)
Collecting google-api-python-client>=2.103.0 (from -r /etc/ConsolePi/installer/requirements.txt (line 3))
  Downloading https://www.piwheels.org/simple/google-api-python-client/google_api_python_client-2.122.0-py2.py3-none-any.whl (12.4 MB)
     ━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/12.4 MB 191.9 kB/s eta 0:00:56
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    google-api-python-client>=2.103.0 from https://www.piwheels.org/simple/google-api-python-client/google_api_python_client-2.122.0-py2.py3-none-any.whl#sha256=2f3c4e75793823d7cd8a8130cec81348acf51adb12937c849c2a0d7e223157a5 (from -r /etc/ConsolePi/installer/requirements.txt (line 3)):
        Expected sha256 2f3c4e75793823d7cd8a8130cec81348acf51adb12937c849c2a0d7e223157a5
             Got        a312a38da64b600c9f5cbe94058dec301a05777175fb8aba087362fe46bdea35

Mar 17 00:24:13 [1493][ERROR][Prepare/Check Python venv] Error - pip install/upgrade ConsolePi requirements
Mar 17 00:24:13 [1493][ERROR][Prepare/Check Python venv] Last Error is fatal, script exiting Please review log /tmp/consolepi_install.log

---- Error Detail ----
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    google-api-python-client>=2.103.0 from https://www.piwheels.org/simple/google-api-python-client/google_api_python_client-2.122.0-py2.py3-none-any.whl#sha256=2f3c4e75793823d7cd8a8130cec81348acf51adb12937c849c2a0d7e223157a5 (from -r /etc/ConsolePi/installer/requirements.txt (line 3)):
        Expected sha256 2f3c4e75793823d7cd8a8130cec81348acf51adb12937c849c2a0d7e223157a5
             Got        a312a38da64b600c9f5cbe94058dec301a05777175fb8aba087362fe46bdea35

Mar 17 00:24:13 [1493][ERROR][Prepare/Check Python venv] Error - pip install/upgrade ConsolePi requirements
--
Mar 17 00:24:13 [1493][INFO][Prepare/Check Python venv] dump vars called.  dumping variables from the environment

TypeError when adding console

=======================================================
 ------------  Select Desired Baud Rate  -------------
=======================================================
 1. 300
 2. 1200
 3. [9600]
 4. 19200
 5. 57600
 6. 115200
 c. custom
Traceback (most recent call last):
  File "/etc/ConsolePi/src/consolepi-menu.py", line 1415, in <module>
    cpi_menu.rename_menu(direct_launch=True)
  File "/etc/ConsolePi/src/consolepi-menu.py", line 945, in rename_menu
    cpi.cpiexec.menu_exec(choice_c, menu_actions, calling_menu='rename_menu')
  File "/etc/ConsolePi/src/pypkg/consolepi/exec.py", line 478, in menu_exec
    response = menu_actions[ch]["function"](*args, **kwargs)
  File "/etc/ConsolePi/src/pypkg/consolepi/udevrename.py", line 108, in do_rename_adapter
    'flow': flow, 'sbits': sbits})
  File "/etc/ConsolePi/src/consolepi-menu.py", line 1203, in con_menu
    menu_actions[ch]()  # could parse and store if decide to use this for something other than rename
  File "/etc/ConsolePi/src/consolepi-menu.py", line 1237, in baud_menu
    legend = menu.format_legend(legend={"opts": 'back'})
  File "/etc/ConsolePi/src/pypkg/consolepi/menu.py", line 1428, in format_legend
    if (("b" in self.actions and self.actions["b"] and self.actions["b"].__name__ == "pager_prev_page") or 'next' in opts):
TypeError: argument of type 'NoneType' is not iterable



It appears an error occurred in the primary menu

The shell based menu acts as a backup menu in the unlikely event
something breaks with the fully functional python based menu.

The shell menu supports connections to locally attached serial adapters only.

Please report the error above @ https://github.com/Pack3tL0ss/ConsolePi

Enter y/yes to launch the backup shell menu, or enter to exit.

I'm trying to use consolepy-addconsole to add a device with a baudrate of 115200. Every time I get to the change-baud-rate window, it explodes with the above.

Fresh install from the install script (well, the weekend of the 20/21th). System info:

130 pi@raspberrypi:/etc/ConsolePi$ uname -a
Linux raspberrypi 5.10.17-v7+ #1403 SMP Mon Feb 22 11:29:51 GMT 2021 armv7l GNU/Linux
pi@raspberrypi:/etc/ConsolePi$ python3 --version
Python 3.7.3
pi@raspberrypi:/etc/ConsolePi$ cat /etc/issue
Raspbian GNU/Linux 10 \n \l


Not changing the baudrate also explodes:

 Press 'enter' to keep the same name and change baud/parity/...
 [rename ttyUSB1]: Provide desired name: pmox-3

 Please Confirm Rename ttyUSB1 --> pmox-3? (y/n): y
 Use default connection values [9600 8N1 Flow: No]? (y/n):
 Use default connection values [9600 8N1 Flow: No]? (y/n): y
Traceback (most recent call last):
  File "/etc/ConsolePi/src/pypkg/consolepi/udevrename.py", line 301, in do_rename_adapter
    self.menu.body_in[0][0] = self.menu.body_in[0][0].replace(from_name, to_name)
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/etc/ConsolePi/src/consolepi-menu.py", line 1415, in <module>
    cpi_menu.rename_menu(direct_launch=True)
  File "/etc/ConsolePi/src/consolepi-menu.py", line 945, in rename_menu
    cpi.cpiexec.menu_exec(choice_c, menu_actions, calling_menu='rename_menu')
  File "/etc/ConsolePi/src/pypkg/consolepi/exec.py", line 478, in menu_exec
    response = menu_actions[ch]["function"](*args, **kwargs)
  File "/etc/ConsolePi/src/pypkg/consolepi/udevrename.py", line 303, in do_rename_adapter
    log.exceptions(f"[DEV NOTE menu_body update after rename caused exception.\n{e}", show=False)
AttributeError: 'ConsolePiLog' object has no attribute 'exceptions'



It appears an error occurred in the primary menu

The shell based menu acts as a backup menu in the unlikely event
something breaks with the fully functional python based menu.

The shell menu supports connections to locally attached serial adapters only.

Please report the error above @ https://github.com/Pack3tL0ss/ConsolePi

Enter y/yes to launch the backup shell menu, or enter to exit.

consolepi-mdnsreg failed

Hi,
I had installed consolepi and it is running perfect. The only issue I have is that one service wont startup up.
This is the output from consolepi-status:

---------------- // STATUS OF consolepi-mdnsreg.service \\ ---------------
● consolepi-mdnsreg.service - Advertise ConsolePi and local serial information via mdns
Loaded: loaded (/etc/systemd/system/consolepi-mdnsreg.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2021-09-23 14:52:57 CEST; 5min ago
Docs: https://github.com/Pack3tL0ss/ConsolePi
Process: 1047 ExecStart=/etc/ConsolePi/venv/bin/python3 /etc/ConsolePi/src/mdns_register.py (code=exited, status=1/FAILURE)
Main PID: 1047 (code=exited, status=1/FAILURE)

---------------------- // Summary \\ ----------------------
.......UNIT....... ENABLED ACTIVE STATUS

consolepi-mdnsbrowse enabled active running
consolepi-mdnsreg enabled failed not-running
consolepi-api enabled active running
ser2net enabled active running
rfcomm enabled active running
bluetooth enabled active running

So at this point I don't know how to troubleshoot the failed service. Can you give me a tip on how to start?
Many thanks

Syncing with gdrive

Hello, i am not sure if i should post my issue here or another place?

I am having trouble to sync to gdrive, i have followed your instructions but i am getting this error.
After i have made the file credentials.json i start the guide and end up with tocken.pickle
When i run the consolepi-menu and hit "r" for refresh i get this error.
What is wrong?

Detecting Locally Attached Serial Adapters
[GET ADAPTERS] Detecting Locally Attached Serial Adapters
Updating to/from gdrive
No files found.
Traceback (most recent call last):
File "/etc/ConsolePi/src/consolepi-menu.py", line 721, in
menu.main_menu()
File "/etc/ConsolePi/src/consolepi-menu.py", line 420, in main_menu
self.exec_menu(choice)
File "/etc/ConsolePi/src/consolepi-menu.py", line 527, in exec_menu
menu_actionsch
File "/etc/ConsolePi/src/consolepi-menu.py", line 151, in refresh
remote_consoles = self.cloud.update_files(self.data['local'])
File "/etc/ConsolePi/venv/lib/python3.7/site-packages/consolepi/gdrive.py", line 120, in update_files
self.auth()
File "/etc/ConsolePi/venv/lib/python3.7/site-packages/consolepi/gdrive.py", line 36, in auth
self.file_id = self.create_sheet()
File "/etc/ConsolePi/venv/lib/python3.7/site-packages/consolepi/gdrive.py", line 101, in create_sheet
spreadsheet = service.spreadsheets().create(body=spreadsheet,
AttributeError: 'NoneType' object has no attribute 'spreadsheets'

Custom baud rates for different serial consoles?

Hi there, I'm very excited about this project - it's perfect for a project I'm working on right now.

I have a question/request: is there a way I can set a default baud rate for the various ports? I have 4 devices to connect to, two of which use 115200 baud, one uses 9600 baud, and one uses 57600 baud. I would love to set up each serial port to default to each of these baud rates on connection instead of having to set the baud each time. I know picocom is pretty limited but it does have a baudrate command line option, I didn't know if there was already support for that in consolepi or if that support would be planned to implement?

ValueError on 'Launching ConsolePi Serial Console Menu'

Hello,
following error occurs permanently after fresh installation, and initial setup, of ConsolePi either after logging in as 'consolepi' user or starting menu manually via consolepi-menu.
No USB device attached, no other packages installed. Plain RPI 4B.

Launching ConsolePi Serial Console Menu
Traceback (most recent call last):
  File "/etc/ConsolePi/src/consolepi-menu.py", line 1413, in <module>
    cpi_menu.main_menu()
  File "/etc/ConsolePi/src/consolepi-menu.py", line 1051, in main_menu
    legend={'opts': foot_opts}, subs=slines, menu_actions=menu_actions)
  File "/etc/ConsolePi/src/pypkg/consolepi/menu.py", line 505, in print_menu
    item = min([item for sublist in items for item in sublist])
ValueError: min() arg is an empty sequence

Cannot change Hotspot SSID

I changed the hotspot SSID in the ConsolePi.yaml but it still has not taken the change after reboot. Am I configuring the wrong file?

Unable to add serial adapters in consolepi-addconsole

  • Raspbian Buster version June 2019
  • Pi 3 B+
  • Coding Novice

First off, great app, thanks for making it available to the community!

After base install of raspbian I enabled ssh/vnc and set the resolution. Afterwards I ran the auto installer script. It seemed to go well but I did notice that after I updated my hostname in the script it prompted with some hostname not found error messages.

During the console add part it discovered the connected device but didn't add since the 'Serial ' section was blank. I tested outer adapters with the same result. I also tried re-imaging with new sdcard and trying different power sources.

#---------------------------------------------#

Insert the first serial adapter - then press enter
Type "end" when complete

This adapter does not have all of the attributes defined that are used to uniquely identify it and can not be added by this script.
The adapter contains the following values. The Blank Value is missing preventing the script from adding this adapter:

idVendor: 1a86
idProduct: 7523
serial:

Serial Port renaming throws error

After entering the name of tty, the following error is shown.

 [rename ttyUSB0]: Provide desired name: right
 Please Confirm Rename ttyUSB0 --> right? (y/n): y
 Use default connection values [9600 8N1 Flow: No]? (y/n): y


 This Device Does not present a serial # (LAME!).  So the adapter itself can't be uniquely identified.
 There are 2 options for naming this device:
Traceback (most recent call last):
  File "/etc/ConsolePi/src/consolepi-menu.py", line 1123, in <module>
    cpi_menu.rename_menu(direct_launch=True)
  File "/etc/ConsolePi/src/consolepi-menu.py", line 727, in rename_menu
    cpi.cpiexec.menu_exec(choice_c, menu_actions, calling_menu='rename_menu')
  File "/etc/ConsolePi/src/pypkg/consolepi/exec.py", line 426, in menu_exec
    response = menu_actions[ch]["function"](*args, **kwargs)
  File "/etc/ConsolePi/src/pypkg/consolepi/udevrename.py", line 164, in do_rename_adapter
    self.menu_formatting('body', text=mlines)
AttributeError: 'ConsolePiMenu' object has no attribute 'menu_formatting'



It appears an error occured in the primary menu

The shell based menu acts as a backup menu in the unlikely event
something breaks with the fully functional python based menu.

The shell menu supports connections to locally attached serial adapters only.

Please report the error above @ https://github.com/Pack3tL0ss/ConsolePi

Thank you very much for your great work!!

Install issues

Hello,

Suddenly we are having problems with installing ConsolePi.
If you check the log in the link you can see where its faults.

https://pastebin.com/StC9erpD

Have you done something new or is it det distro version?

Hardware-Serial via PCI not detected.

Hey, I got a serial pci controller having 2 ports:

01:00.0 Serial controller: Nanjing Qinheng Microelectronics Co., Ltd. Device 3253 (rev 10)

This is the dmesg output:
root@dns:~# dmesg | grep 0:01:00
[ 0.131872] pci 0000:01:00.0: [1c00:3253] type 00 class 0x070005
[ 0.131892] pci 0000:01:00.0: reg 0x10: [io 0xe000-0xe0ff]
[ 0.131903] pci 0000:01:00.0: reg 0x14: [mem 0xd0100000-0xd0107fff pref]
[ 0.131914] pci 0000:01:00.0: reg 0x18: [io 0xe100-0xe103]
[ 0.131953] pci 0000:01:00.0: reg 0x30: [mem 0xfe500000-0xfe507fff pref]
[ 0.132013] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[ 0.696294] 0000:01:00.0: ttyS0 at I/O 0xe0c0 (irq = 16, base_baud = 115200) is a XR16850
[ 0.696389] 0000:01:00.0: ttyS1 at I/O 0xe0c8 (irq = 16, base_baud = 115200) is a XR16850

Its running on a HP MT 3500.
ConsolePi does not see the console at ttyS0 and ttyS1.

Can you add support for these?

Does ConsolePi support Raspbian buster?

Hello,
We are having issues with pie's running buster, is this version supported? Or do we need to run stretch.

When we start consolepi-menu we get this error:

Launching ConsolePi Serial Console Menu
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

Current thread 0x76f6d500 (most recent call first):
/etc/ConsolePi/src/consolepi-commands/consolepi-menu: linje 18: 14718 Avbrutt (SIGABRT)       sudo /etc/ConsolePi/src/consolepi-menu.py "${@}"

When we try to run consolepi-upgrade we get this error:

feb. 12 11:59:18 [INFO][Collect Pi Info] Raspberry Pi 3 Model B+ hw rev 1.3 1 GB (Mfg by Sony)
feb. 12 11:59:18 [INFO][Collect Pi Info] Raspbian 10.3 (Buster) running on BCM2835 Revision: a020d3
feb. 12 11:59:18 [INFO][Collect Pi Info] Linux RASP-lab-cp 4.19.102-v7+ #1295 SMP Thu Feb 6 15:43:59 GMT 2020 armv7l GNU/Linux
feb. 12 11:59:19 [INFO][Collect Pi Info] Raspbian with Desktop
feb. 12 11:59:19 [INFO][Collect Pi Info] Python 3 Version Python 3.7.3
feb. 12 11:59:19 [INFO][Update/Upgrade ConsolePi (apt)] Update Sources
feb. 12 11:59:35 [INFO][Update/Upgrade ConsolePi (apt)] Update Successful
feb. 12 11:59:35 [INFO][Update/Upgrade ConsolePi (apt)] Upgrading ConsolePi via apt. This may take a while
feb. 12 11:59:40 [INFO][Update/Upgrade ConsolePi (apt)] Upgrade Successful
feb. 12 11:59:40 [INFO][Update/Upgrade ConsolePi (apt)] Performing dist-upgrade
feb. 12 11:59:42 [INFO][Update/Upgrade ConsolePi (apt)] dist-upgrade Successful
feb. 12 11:59:42 [INFO][Update/Upgrade ConsolePi (apt)] Tidying up (autoremove)
feb. 12 11:59:45 [INFO][Update/Upgrade ConsolePi (apt)] Everything is tidy now
feb. 12 11:59:45 [INFO][Update/Upgrade ConsolePi (apt)] Installing git via apt
feb. 12 11:59:48 [INFO][Update/Upgrade ConsolePi (apt)] git install/upgraded Successful
feb. 12 11:59:48 [INFO][Update/Upgrade ConsolePi (apt)] Process Complete
feb. 12 11:59:48 [INFO][ConsolePi-Upgrade-Prep (create consolepi group)] all good pi user already belongs to consolepi group
feb. 12 11:59:48 [INFO][ConsolePi-Upgrade-Prep (check cache owned by consolepi group)] Cloud Cache ownership already OK
feb. 12 11:59:48 [INFO][ConsolePi-Upgrade-Prep (check group perms on ConsolePi dir)] ConsolePi dir group already OK
feb. 12 11:59:48 [INFO][git Clone/Update ConsolePi] Directory exists Updating ConsolePi via git
feb. 12 11:59:49 [INFO][git Clone/Update ConsolePi] ConsolePi update/pull Success
feb. 12 11:59:49 [INFO][Prepare/Check Python venv] Prepare/Check Python venv - Starting
feb. 12 11:59:49 [INFO][Prepare/Check Python venv] /etc/ConsolePi/venv directory already exists
feb. 12 11:59:49 [INFO][Prepare/Check Python venv] Upgrade pip
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

Current thread 0x76f8e500 (most recent call first):
feb. 12 11:59:49 [WARNING][Prepare/Check Python venv] WARNING - pip upgrade returned error
feb. 12 11:59:49 [INFO][Prepare/Check Python venv] pip install/upgrade ConsolePi requirements - This can take some time.
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

Current thread 0x76f32500 (most recent call first):
feb. 12 11:59:49 [ERROR][Prepare/Check Python venv] Error - pip install/upgrade ConsolePi requirements

This is another one we try to run console-upgrade with, hw is pi4 here. (console-menu works here)

feb. 12 12:04:26 [INFO][Collect Pi Info] Raspberry Pi 4 Model B hw rev 1.1 4 GB (Mfg by Sony)
feb. 12 12:04:26 [INFO][Collect Pi Info] Raspbian 10.3 (Buster) running on BCM2835 Revision: c03111
feb. 12 12:04:26 [INFO][Collect Pi Info] Linux RASP01-cp 4.19.93-v7l+ #1290 SMP Fri Jan 10 16:45:11 GMT 2020 armv7l GNU/Linux
feb. 12 12:04:26 [INFO][Collect Pi Info] Raspbian with Desktop
feb. 12 12:04:26 [INFO][Collect Pi Info] Python 3 Version Python 3.7.3
feb. 12 12:04:27 [INFO][Update/Upgrade ConsolePi (apt)] Update Sources
feb. 12 12:04:33 [INFO][Update/Upgrade ConsolePi (apt)] Update Successful
feb. 12 12:04:33 [INFO][Update/Upgrade ConsolePi (apt)] Upgrading ConsolePi via apt. This may take a while
feb. 12 12:04:46 [INFO][Update/Upgrade ConsolePi (apt)] Upgrade Successful
feb. 12 12:04:46 [INFO][Update/Upgrade ConsolePi (apt)] Performing dist-upgrade
feb. 12 12:04:48 [INFO][Update/Upgrade ConsolePi (apt)] dist-upgrade Successful
feb. 12 12:04:48 [INFO][Update/Upgrade ConsolePi (apt)] Tidying up (autoremove)
feb. 12 12:04:49 [INFO][Update/Upgrade ConsolePi (apt)] Everything is tidy now
feb. 12 12:04:49 [INFO][Update/Upgrade ConsolePi (apt)] Installing git via apt
feb. 12 12:04:50 [INFO][Update/Upgrade ConsolePi (apt)] git install/upgraded Successful
feb. 12 12:04:50 [INFO][Update/Upgrade ConsolePi (apt)] Process Complete
feb. 12 12:04:50 [INFO][ConsolePi-Upgrade-Prep (create consolepi group)] all good pi user already belongs to consolepi group
feb. 12 12:04:50 [INFO][ConsolePi-Upgrade-Prep (check cache owned by consolepi group)] Cloud Cache ownership already OK
feb. 12 12:04:50 [INFO][ConsolePi-Upgrade-Prep (check group perms on ConsolePi dir)] ConsolePi dir group already OK
feb. 12 12:04:50 [INFO][git Clone/Update ConsolePi] Directory exists Updating ConsolePi via git
feb. 12 12:04:51 [INFO][git Clone/Update ConsolePi] ConsolePi update/pull Success
feb. 12 12:04:51 [INFO][Prepare/Check Python venv] Prepare/Check Python venv - Starting
feb. 12 12:04:51 [INFO][Prepare/Check Python venv] /etc/ConsolePi/venv directory already exists
feb. 12 12:04:51 [INFO][Prepare/Check Python venv] Upgrade pip
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/etc/ConsolePi/venv/lib/python3.7/site-packages/pip/__main__.py", line 19, in <module>
    sys.exit(_main())
  File "/etc/ConsolePi/venv/lib/python3.7/site-packages/pip/_internal/cli/main.py", line 73, in main
    command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
  File "/etc/ConsolePi/venv/lib/python3.7/site-packages/pip/_internal/commands/__init__.py", line 96, in create_command
    module = importlib.import_module(module_path)
  File "/etc/ConsolePi/venv/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/etc/ConsolePi/venv/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 24, in <module>
    from pip._internal.cli.req_command import RequirementCommand
  File "/etc/ConsolePi/venv/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 20, in <module>
    from pip._internal.operations.prepare import RequirementPreparer
  File "/etc/ConsolePi/venv/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 16, in <module>
    from pip._internal.distributions import (
  File "/etc/ConsolePi/venv/lib/python3.7/site-packages/pip/_internal/distributions/__init__.py", line 1, in <module>
    from pip._internal.distributions.source import SourceDistribution
ImportError: cannot import name 'SourceDistribution' from 'pip._internal.distributions.source' (/etc/ConsolePi/venv/lib/python3.7/site-packages/pip/_internal/distributions/source/__init__.py)
feb. 12 12:04:52 [WARNING][Prepare/Check Python venv] WARNING - pip upgrade returned error
feb. 12 12:04:52 [INFO][Prepare/Check Python venv] pip install/upgrade ConsolePi requirements - This can take some time.
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/etc/ConsolePi/venv/lib/python3.7/site-packages/pip/__main__.py", line 19, in <module>
    sys.exit(_main())
  File "/etc/ConsolePi/venv/lib/python3.7/site-packages/pip/_internal/cli/main.py", line 73, in main
    command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
  File "/etc/ConsolePi/venv/lib/python3.7/site-packages/pip/_internal/commands/__init__.py", line 96, in create_command
    module = importlib.import_module(module_path)
  File "/etc/ConsolePi/venv/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/etc/ConsolePi/venv/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 24, in <module>
    from pip._internal.cli.req_command import RequirementCommand
  File "/etc/ConsolePi/venv/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 20, in <module>
    from pip._internal.operations.prepare import RequirementPreparer
  File "/etc/ConsolePi/venv/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 16, in <module>
    from pip._internal.distributions import (
  File "/etc/ConsolePi/venv/lib/python3.7/site-packages/pip/_internal/distributions/__init__.py", line 1, in <module>
    from pip._internal.distributions.source import SourceDistribution
ImportError: cannot import name 'SourceDistribution' from 'pip._internal.distributions.source' (/etc/ConsolePi/venv/lib/python3.7/site-packages/pip/_internal/distributions/source/__init__.py)
feb. 12 12:04:53 [ERROR][Prepare/Check Python venv] Error - pip install/upgrade ConsolePi requirements

ovpn-graceful-shutdown

The ovpn-graceful-shutdown service fails to start at shutdown/reboot. It appears the network may be shutdown prior - which is not the intent. The service should successfully start either way.

Primary purpose of the script was to prevent an errant PB msg during reboot, which was happening when I first built ConsolePi, but doesn't appear to be happening in it's current form. So this is a very minor issue. Other benefit, is I believe if shutdown gracefully it would properly send signal to server so the session doesn't have to timeout on server end. Still a minor issue, as typically ConsolePi is unplugged without a proper shutdown anyway.

This may only happen when no OpenVPN tunnel is established, not sure rarely have a monitor on the system

After Bluetooth connection I see some bash messages, not sure of impact or how to fix.

After BT connection from windows 10 terminal application (securecrt) I see the following after the ConsolePi banner is displayed.

The programs included with the Debian GNU/Linux system are free software;

the exact distribution terms for each program are described in the

individual files in /usr/share/doc/*/copyright.

 

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent

permitted by applicable law.

-bash: cannot set terminal process group (355): Inappropriate ioctl for device

-bash: no job control in this shell

Launching ConsolePi Serial Console Menu

 

We trust you have received the usual lecture from the local System

Administrator. It usually boils down to these three things:

 

    #1) Respect the privacy of others.

    #2) Think before you type.

    #3) With great power comes great responsibility.

 

sudo: no tty present and no askpass program specified

blue@ConsolePi:~$

pi-hole and ConsolePi don't coexist

Hi,

I had a Pihole setup on raspbian stretch that I decide to also use as a console-server.

The consolepi setup overwrites /etc/dnsmasq.conf that messes up the pihole configuration in /etc/dnsmasq.d/01-pihole.

Would it be possible:

  1. For consolepi dhcp service on hotspot co-exist with pihole?
  2. In any case, the installer should probably check /etc/dnsmasq.d for existing files and /etc/dnsmasq.conf pointing there and ask if the user wants to override existing configuration
  3. It probably is good practice to move consolepi configuration to /etc/dnsmasq.d in any case.

Menu will not load

Tried with RP2 and RPzeroW and neither will boot the menu. Also tried different setup settings. Re-ran consolepi-upgrade and same issue. Tried running Bullseye and Buster as well.

I receive the following error:


Launching ConsolePi Serial Console Menu
Traceback (most recent call last):
File "/etc/ConsolePi/src/consolepi-menu.py", line 18, in
from consolepi.consolepi import ConsolePi # type: ignore # NoQA
File "/etc/ConsolePi/src/pypkg/consolepi/consolepi.py", line 8, in
from consolepi.power import Outlets
File "/etc/ConsolePi/src/pypkg/consolepi/power/init.py", line 2, in
from consolepi.power.outlets import Outlets # NoQA
File "/etc/ConsolePi/src/pypkg/consolepi/power/outlets.py", line 9, in
import RPi.GPIO as GPIO
ModuleNotFoundError: No module named 'RPi'

It appears an error occurred in the primary menu

The shell based menu acts as a backup menu in the unlikely event
something breaks with the fully functional python based menu.

The shell menu supports connections to locally attached serial adapters only.

Please report the error above @ https://github.com/Pack3tL0ss/ConsolePi

Enter y/yes to launch the backup shell menu, or enter to exit.

Feature request: ports & devices encoded in SSH username

OpenGear console servers have a nice feature that lets you encode where you want to connect as part of the SSH username,

<username>:<portXX> - numbered port
<username>:<port label> - labeled port
<username>:<ttySX> - explicit device
<username>:<serial> - jumps straight to the device menu

(if omitted, you get a normal SSH login to the embedded linux device).

This would be handy as it permits direct SSH access to specific devices, while keeping it secure and containing everything to a single port. It may require some magic in sshd to split out the user however.

I don't know if OpenGear ever published the patches they used to do that, but I suspect similar could be accomplished today with the AuthorizedKeysCommand

Single Command Install Script Failing Install

Just tried to use the single cmd line install script on a fresh install of Debian Buster and it's failing due to recent rust changes.
Known working on 2/7/21 on same Debian image.

=======================
error: Can not find Rust compiler

ERROR: Failed building wheel for cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
Feb 09 17:24:24 [1158][ERROR][Prepare/Check Python venv] Error - pip install/upgrade ConsolePi requirements
Feb 09 17:24:24 [1158][ERROR][Prepare/Check Python venv] Last Error is fatal, script exiting Please review log /tmp/consolepi_install.log

---- Error Detail ----
Cloning into 'ConsolePi'...
ERROR: Command errored out with exit status 1:

  3) Check our frequently asked questions for more information:
     https://cryptography.io/en/latest/faq.html
  4) Ensure you have a recent Rust toolchain installed:
     https://cryptography.io/en/latest/installation.html#rust
  5) If you are experiencing issues with Rust for *this release only* you may
     set the environment variable `CRYPTOGRAPHY_DONT_BUILD_RUST=1`.
  =============================DEBUG ASSISTANCE=============================

error: Can not find Rust compiler

ERROR: Failed building wheel for cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
Feb 09 17:24:24 [1158][ERROR][Prepare/Check Python venv] Error - pip install/upgrade ConsolePi requirements

Install errors out

Installing using the automated way errors out after selecting extras (I selected all extras if that makes a difference).

cat: /tmp/ansible_ver: No such file or directory
cat: /tmp/ansible_ver: No such file or directory
/etc/ConsolePi/installer/utilities.sh: line 207: hash: pipx: not found
Error: Unsupported flag passed to process_cmds --apt-install

As a workaround I installed pipx, manually via apt and ran the extra commands from that if-sequence below line 207.
There were some issues installing ansible and the ansible collections, but re-running the install worked.

ipv4.ip_forward not persisting

I need to set this sysctl value but something is overriding it at reboot. Ive tried several different ways to set this value on bootup but nothing sticks. I would need to manually ssh into my pi and run sudo sysctl -p /etc/sysctl.d/99-tailscale.conf everytime my pi is restarted. Please advise me how to make these sysctl values persistant. Thank you.

net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 1

Headless Installation with Ansible

Hi
I'm absolute happy with console pi, and your fixes! For a "mass rollout" it would be great, if a headless installation with ansible can be done. As far as i can see, with your 3 possible ways a headless installation is not possible. I have to enter parameters in any case. Rigth? or did i miss something?

In the 3rd installation method https://github.com/Pack3tL0ss/ConsolePi/blob/master/README.md#3-automated-flash-card-imaging-with-auto-install-on-boot is user interaction needed as well - i think after my setup.

Is a headless installation, run by ansible only with one config file possible?
Thank you very much!
BR Adrian

[Feature request] Auto-connect in raw mode

When connection by Bluetooth connect to the first available serial port in raw mode without passing trough console-pi-menu.

I'm trying to use consolepi to remotely connect to arduinos trough usb port, but I need to transfer binary data, so maybe raw mode its needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.