Showing posts with label raspberry pi. Show all posts
Showing posts with label raspberry pi. Show all posts

Monday, March 25, 2024

Raspberry Pi : Serial Console Server with ser2net

Configuration the console server

1. Update your Pi and install ser2net
#sudo apt update
#sudo apt upgrade -y
#sudo apt install ser2net -y
 

2. Find the serial adapters are listening on what port
#dmesg | grep tty

3. Configuration ser2net


#sudo nano /etc/ser2net.yaml

define: &banner \r\nser2net port \p device \d [\B] (Debian GNU/Linux)\r\n\r\n

connection: &con0096
    accepter: tcp,2000
    enable: on
    options:
      banner: *banner
      kickolduser: true
      telnet-brk-on-sync: true
    connector: serialdev,
              /dev/ttyUSB0,
              9600n81,local


#sudo systemctl start ser2net
#sudo systemctl status ser2net


How to used the console server

1. Make sure the console server USB serial cable is connected to switch or any related device
2. Service ser2net is started. Noted the console server IP address
3. Open the telnet or ssh - Putty to telnet the console server


4. In Host-address : <console server IP> : port : <refer to the port setting in configuration>
5. Console to switch is open and now can do switch configuration

source : https://www.jpaul.me/2019/01/how-to-build-a-raspberry-pi-serial-console-server-with-ser2net/

Friday, March 29, 2013

Monday, March 25, 2013

Issue on Realtek RTL8188CUS chipset - Raspberry Pi

Issue :

#sudo hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
nl80211: 'nl80211' generic netlink not found
Failed to initialize driver 'nl80211'
rmdir[ctrl_interface]: No such file or directory

Solution :

#lsusb

Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter

#sudo apt-get autoremove hostapd

#wget https://github.com/segersjens/RTL8188-hostapd/archive/v1.0.tar.gz

#tar -zxvf v1.0.tar.gz

#cd RTL8188-hostapd-1.0/hostapd

#sudo make

CC main.c
CC config_file.c
CC ../src/ap/hostapd.c
../src/ap/wpa_auth_glue.c: In function 'hostapd_wpa_auth_send_ether':
../src/ap/wpa_auth_glue.c:351:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
CC ../src/ap/wpa_auth_glue.c
....

#sudo make install
mkdir -p /usr/local/bin
for i in hostapd hostapd_cli; do cp -f $i /usr/local/bin/$i; done
cp -f ../scripts/init /etc/init.d/hostapd
chmod +x /etc/init.d/hostapd
mkdir -p /etc/hostapd
cp -f ../scripts/hostapd.conf /etc/hostapd/

#sudo service hostapd restart
[ ok ] Stopping advanced IEEE 802.11 management: hostapd.
[ ok ] Starting advanced IEEE 802.11 management: hostapd.

#iwconfig


wlan0 IEEE 802.11bgn ESSID:"wifi" Nickname:"<WIFI@REALTEK>"
Mode:Master Frequency:2.412 GHz Access Point: A0:F3:C1:2A:7D:BE
Bit Rate:65 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

 

Source : http://www.jenssegers.be/

Thursday, March 7, 2013