the messages dmesg command shown belowand the information displayed by the lsusb command, as shown below.When you run the lsusb command, the output shows that the modem mode isconnected.In the picture above you can see the 3G modem ID andthe status is on, meaning that the modem has been correctly identified by theRPi. 2.1. Install the necessary softwareTo install the packages needed for this project,execute the following command. Note that the most used commandsrequire login root or sudopi@raspberrypi~ $apt-get install ppp wvdial hospapd udhcpdOnce installed thepackages, run the command: pi@raspberrypi ~ $wvdialconf/etc/wvdial.confThe tool will do a check on your 3G modem, running aserie of AT commands and in the end will generate the file /etc/wvdial.confwith a default setting that you can edit and replace or add desired values inthe configuration or add a new configuration, using the one as a defaulttemplate. Follow is the setting of my wvdial.conf file. [Dialer 3gcon]Init1 = ATZInit2 = AT & C1 & D2 & FE0V1X1 S0 = 0Init3 = AT + CGDCONT = 1, "IP", "zap.vivo.com.br"Password = <Your Password>Username = <Your Login Name>Modem = /dev/ttyUSB0Check Def Route = onAbort on No Dialtone = offModem Type = Analog ModemStupid Mode = 1Baud = 460800Dial Command = ATDTISDN = 0#Phome * 99 # =Phone = * 99 *** 1 # [Dialer Defaults]Init2 = ATQ0 V1 E1 S0 = 0 & C1 & D2Modem Type = AnalogModem; Phone = <Target Phone Number>ISDN =0; Username = <Your Login Name>Init1 =ATZ; Password = <Your Password>Modem = /dev/ttyUSB0Baud = 9600Now run the command to connect your modem. pi@raspberrypi ~ $wvdial3gconYou should get a screen similar to the figure below. Ifeverything is right at this point the RPi already have internet access via 3GUSB modem. Now let's connect the hotspot internet.3. Setting up the wireless modem (hotspot)Udhcpd is a small DHCP server widely used in embeddedsystems.Hostapd is a program for managing access points (AP) and wirelessauthentication servers.3.1. Configure the DHCP serverEdit the file /etc/udhcpd.conf. In my case, see myfinal udhcpd.conf # Sample udhcpd configuration file (/etc/udhcpd.conf)# The start and end of the IP lease block start 192.168.1.20 #default: 192.168.0.20end 192.168.1.254 #default : 192.168.0.254 # The interface que udhcpd will usewlan0 #default interface: eth0 # If remaining is true (default), udhcpd will storethe team# remaining for each lease in the udhcpd leases file. This is# for embedded systems que can not keep time between reboots.# If you September to remaining in, the absolute team que the lease# expires at will be stored in the dhcpd.leases file. Remaining #default yes: yes # The location of the leases file lease_file /var/lib/misc/udhcpd.leases #defualt:/var/lib/misc/udhcpd.leases # The location of the pid file pidfile /var/run/udhcpd.pid #default: /var/run/udhcpd.pid opt dns 8.8.8.8 8.8.4.4 192.168.10.2 192.168.10.10#opt dnsoption subnet 255.255.255.0opt router 192.168.1.1option domain siteoption lease # 864000 10 days of secondsin start / stop you define the range IPs for theircustomers. The wireless modem interface was defined as wlan0 (use ifconfigto know the interface used by the modem). Also set the IP address192.168.1.1 as the IP of my router. Create an empty file for the DHCP lease thatwill be filled later by udhcpd. pi@raspberrypi