Page 1 of 2

Compile for new wifi module: build folder??

Posted: Sat Mar 06, 2021 5:23 pm
by steeve

Recently got a wifi usb D-link REaltek dongle for my Bionicpuppy64 persistent USB boot
Product: RTL88x2B USB Software Package - Linux Driver Version: v5.8.7.1_35809.20191129_COEX20191120-7777
The required driver is not in the Puppy packages so i must compile I guess
I loaded the devx and kernel sources SFS files then when I go to the driver folder

Code: Select all

root# make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.19.23/build M=/root/Downloads/RTL88x2BU_WiFi_linux_v5.8.7.1_35809.20191129_COEX20191120-7777/driver/rtl88x2BU_WiFi_linux_v5.8.7.1_35809.20191129_COEX20191120-7777  modules
make[1]: *** /lib/modules/4.19.23/build: No such file or directory.  Stop.
Makefile:2373: recipe for target 'modules' failed
make: *** [modules] Error 2

if I create a build folder I still get an error

Code: Select all

root# make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.19.23/build M=/root/Downloads/RTL88x2BU_WiFi_linux_v5.8.7.1_35809.20191129_COEX20191120-7777/driver/rtl88x2BU_WiFi_linux_v5.8.7.1_35809.20191129_COEX20191120-7777  modules
make[1]: Entering directory '/lib/modules/4.19.23/build'
make[1]: *** No rule to make target 'modules'.  Stop.
make[1]: Leaving directory '/lib/modules/4.19.23/build'
Makefile:2373: recipe for target 'modules' failed
make: *** [modules] Error 2

It seems the build folder may be a link ? would appreciate guidance on next steps


Re: Compile for new wifi module: build folder??

Posted: Sat Mar 06, 2021 6:44 pm
by rockedge

did you run cmake or configure before make?


Re: Compile for new wifi module: build folder??

Posted: Sat Mar 06, 2021 10:08 pm
by steeve

Code: Select all

configure: command not found

Code: Select all

cmake
Segmentation fault

Re: Compile for new wifi module: build folder??

Posted: Sat Mar 06, 2021 10:19 pm
by s243a
steeve wrote: Sat Mar 06, 2021 10:08 pm

Code: Select all

configure: command not found

Code: Select all

cmake
Segmentation fault

Try doing it on a fresh version of puppy and first load the version of devX that matches the puppy release.


Re: Compile for new wifi module: build folder??

Posted: Sat Mar 06, 2021 10:20 pm
by ThruHammer

Right-clk within the folder where your src is located and "Window / Terminal Here."

When you run configure, prefix it like so: ./configure


Re: Compile for new wifi module: build folder??

Posted: Sat Mar 06, 2021 10:31 pm
by ozsouth

we need to get the right source, so please run the following commands in a terminal & post results:

lsusb | grep etwork

and then

dmesg | grep irmware


Re: Compile for new wifi module: build folder??

Posted: Sat Mar 06, 2021 10:35 pm
by ThruHammer

Not me Oz, the kid.

Kid, run: lsusb -vv in a terminal and dump the output here -- then leave us the link.


Re: Compile for new wifi module: build folder??

Posted: Sat Mar 06, 2021 10:46 pm
by mikewalsh

@ozsouth :-

Oz, isn't that the same one you put together for me to test out in a 'standard' Bionicpup 64? Is it worth me posting it, and steeve having a try with it, d'you think?

(I still can't get my head around the concept, these days, of desktops being equipped with built-in wireless adapters - what IS that all about, huh? - but if it'll do the job, well.... )

EDIT:- On second thoughts, no; mine's an RTL8822BE.....this one's a BU, so very doubtful it would help, TBH.

Mike. ;)


Re: Compile for new wifi module: build folder??

Posted: Sat Mar 06, 2021 11:18 pm
by steeve
ozsouth wrote: Sat Mar 06, 2021 10:31 pm

we need to get the right source, so please run the following commands in a terminal & post results:

lsusb | grep etwork

and then

dmesg | grep irmware

Im on my phone (since by laptop isn't connecting) so I typed in the results

Code: Select all

Bluetooth : hci0: Minimum firmware build 1 week 10 2014
bluetooth hci0: Direct firmware load for intel/ibt-19-0-4.sfi failed with error -2
Bluetooth: hci0: Failed to load Intel firmware fike (-2)
psmouse serio1: elantech: assuming hardware version 4 (with firmware version 0x0f5002)

Edit: the Bluetooth errors, yeah Puppy doesn't pair my bt mouse or keyboard..


Re: Compile for new wifi module: build folder??

Posted: Sun Mar 07, 2021 12:02 am
by ozsouth

@steeve - you are missing a bluetooth firmware file, but for your network adaptor, we need its ID code.

With the usb wireless adaptor plugged in, need to run (in a terminal): lsusb

The Realtek wireless network device will have an ID code, something similar to this: 0bda:8179

That code will tell me what driver to make, so please post that.


Re: Compile for new wifi module: build folder??

Posted: Sun Mar 07, 2021 2:15 am
by steeve
ozsouth wrote: Sun Mar 07, 2021 12:02 am

@steeve - you are missing a bluetooth firmware file, but for your network adaptor, we need its ID code.

With the usb wireless adaptor plugged in, need to run (in a terminal): lsusb

The Realtek wireless network device will have an ID code, something similar to this: 0bda:8179

That code will tell me what driver to make, so please post that.

Code: Select all

Bus 001 Device 008: ID 2001:331e D-Link Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x2001 D-Link Corp.
  idProduct          0x331e 
  bcdDevice            2.10
  iManufacturer           1 Realtek
  iProduct                2 802.11ac NIC
  iSerial                 3 123457
  

I have the driver download: rtl88x2BU_WiFi_linux_v5.8.7.1_35809
I untared and unzipped: folder ready with Makefile


Re: Compile for new wifi module: build folder??

Posted: Sun Mar 07, 2021 6:07 am
by ozsouth

@steeve - when I compile, once I've loaded the devx & kernel sources, I cd / , then unzip source, then cd into that new source folder, then run make clean, then run make. That may help you.
I've made drivers for rtl8822bu & rtl88x2bu for bionicpup64 kernel 4.19.23 .pets for you to try. Use at own risk.
To install, download .pet & with the usb adaptor plugged in, click on .pet in ROXFiler. Will need to save on shutdown to retain. You may need firmware. If driver doesn't work immediately, run in terminal: dmesg | grep irmware & note any missing firmware filenames. Firmware files would go in /lib/firmware/rtlwifi.
Is here: withdrawn - failed

If previous driver doesn't work, uninstall it (via puppy package manager in setup menu), then you could try driver I made from later source of rtl88x2bu. May also require firmware.
Is here: link expired


Re: Compile for new wifi module: build folder??

Posted: Sun Mar 07, 2021 3:26 pm
by steeve

The second one loaded but connection config errors ..wlan is down
Disclosure: in the device data I provided you I modified the device serial number and connection details (out of privacy concerns on public network)
At this point I think it's a connection issue with the router/modem because I see wlan0 interface in the Network Wizard. Here are the diagnostics:

Code: Select all


Frisbee Network Wizard
Wpa_supplicant Status:
-------------------------------------------------
wpa_state=DISCONNECTED
p2p_device_address=bla:bla:.....
address=bla:bla:.....
uuid=xxxxxxxxxxxx9
-------------------------------------------------

wlan0     unassociated  ESSID:""  Nickname:"WIFI@RTL88X2BU"
          Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated   
          Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key: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

wlan0     Link encap:Ethernet  HWaddr bla:bla:D2:bla:57:bla  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
.


[code]


Frisbee connection log: 

[code]
** puppypc15912 daemon.info dhcpcd[16137]: version 6.6.2 starting
** puppypc15912 daemon.warn dhcpcd[16137]: all: IPv6 kernel autoconf disabled
** puppypc15912 daemon.debug dhcpcd[16137]: wlan0: if_disable_autolinklocal: Address family not supported by protocol
** puppypc15912 daemon.debug dhcpcd[16137]: /proc/sys/net/ipv6/conf/wlan0/accept_ra: No such file or directory
** puppypc15912 daemon.info dhcpcd[16137]: wlan0: adding address bla:bla:bla:.......
** puppypc15912 daemon.err dhcpcd[16137]: if_addaddress6: Operation not supported
** puppypc15912 daemon.debug dhcpcd[16137]: wlan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
** puppypc15912 daemon.debug dhcpcd[16137]: wlan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' NOCARRIER
** puppypc15912 daemon.err dhcpcd[16137]: script_runreason: /lib/dhcpcd/dhcpcd-run-hooks: WEXITSTATUS 1
** puppypc15912 daemon.info dhcpcd[16137]: wlan0: carrier acquired
** puppypc15912 daemon.warn dhcpcd[16137]: all: IPv6 kernel autoconf disabled
** puppypc15912 daemon.debug dhcpcd[16137]: wlan0: if_disable_autolinklocal: Address family not supported by protocol
** puppypc15912 daemon.debug dhcpcd[16137]: /proc/sys/net/ipv6/conf/wlan0/accept_ra: No such file or directory
** puppypc15912 daemon.debug dhcpcd[16137]: wlan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
** puppypc15912 daemon.err dhcpcd[16137]: script_runreason: /lib/dhcpcd/dhcpcd-run-hooks: WEXITSTATUS 1
** puppypc15912 daemon.info dhcpcd[16137]: DUID bla:bla:bla:.......
** puppypc15912 daemon.info dhcpcd[16137]: wlan0: IAID dbla:bla:bla:.......
** puppypc15912 daemon.debug dhcpcd[16137]: wlan0: delaying IPv4 for 0.7 seconds
** puppypc15912 daemon.info dhcpcd[16137]: wlan0: IAID dbla:bla:bla:.......
** puppypc15912 daemon.debug dhcpcd[16137]: wlan0: delaying IPv4 for 0.1 seconds
** puppypc15912 daemon.info dhcpcd[16137]: wlan0: carrier lost
** puppypc15912 daemon.debug dhcpcd[16137]: wlan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' NOCARRIER
** puppypc15912 daemon.err dhcpcd[16137]: script_runreason: /lib/dhcpcd/dhcpcd-run-hooks: WEXITSTATUS 1
** puppypc15912 daemon.err dhcpcd[16137]: timed out


Re: Compile for new wifi module: build folder??

Posted: Sun Mar 07, 2021 5:58 pm
by bigpup

Try doing the connection this way.
I know it is a lot of steps, but if it does not work at a specific step.
That is a big clue as to what your problem is.

menu->Setup->Internet Connection Wizard->Wired or wireless LAN->Network Wizard

Network Wizard wireless connection steps.

1. Select Network Wizard
2. Select wlan0 (your network card may have a different description)
3. Select Wireless in the Configure wireless network box.
4. Select Scan and your routers WIFI signal should come up as one of them found.
5. Select your WIFI router signal and OK
6. Give a name to your profile. It should already be what you selected in step 5.
7. Encryption. Most people use WPA/TKIP - select it or WPA2.
8. A box will open for you to write the WPA password. It is called a Shared Key. Enter the password.
9. Leave the other boxes as they are. Rarely do these need adjustment.
9. Select Save
10. Select Use This Profile
11. A box will appear showing Puppy trying to connect
12. A box will come up “REPORT ON TEST 0f wlan0CONNECTION”
13. Select Auto DHCP in the Configure interface box and it will go through a handshake routine. and declare itself successful
14. Select done

If something does not work.
What step?
You do what?
You see what?

Also make sure your system's time zone setting is correct - if not, many website's certificates then act as if they are expired, and the webpage won't display.


Re: Compile for new wifi module: build folder??

Posted: Sun Mar 07, 2021 8:25 pm
by steeve

Everything 1 to 14 :

EDIT: step 12. A box will come up “REPORT ON TEST 0f wlan0CONNECTION” --> failed
unsuccessful
Pop-up says

Code: Select all

Connection Info:
  Access Point: not associated
  Link quality : zero

wpa_state=SCANNING
address=fbla:bla:....
uuid=454354blabla

Went back selected Auto DHCP unsuccessful

Will try static IP of my device
xxx.xxx.0.xxx

Same thing (with static ip of device and also tried putting in the router (gateway) ip address:

Code: Select all

Connection Info:
  Access Point: not associated
  Link quality : zero

wpa_state=SCANNING
address=fbla:bla:....
uuid=454354blabla

I switched back to eth0 Auto DHCP works fine
So it's not the Auto DHCP, it obviously works fine without putting in static IP address.

I tried the same wifi USB device with Windows 10 on the same laptop and it works. So device is ok.

I am wondering if the compilation has to be done on my machine?


Re: Compile for new wifi module: build folder??

Posted: Sun Mar 07, 2021 9:56 pm
by ThruHammer

On your machine, no. The important part is that they're compiled under the same kernel.

Say Oz, is this the src you compiled from cilynx, RinCat (both GitHub) or Realtek's site?


Re: Compile for new wifi module: build folder??

Posted: Mon Mar 08, 2021 12:25 am
by bigpup

step 12. A box will come up “REPORT ON TEST 0f wlan0CONNECTION” --> failed
unsuccessful

That is the first time the WIFI adapter tries to connect to your WIFI router.
Are you positive, you are entering the correct type (WPA or WPA2) and password, to connect to router?
Linux is case sensitive for letters.
So, you do need to enter, the correct lower case or upper case, for any letters in the password.


Re: Compile for new wifi module: build folder??

Posted: Mon Mar 08, 2021 12:25 am
by ozsouth

@steeve - I assume the first .pet didn't work at all. Did you check both for missing firmware?
(by running in a terminal, with dongle plugged in & .pet loaded: dmesg | grep irmware).
Getting the right source can be a battle. I've made more .pets for you to try (see a few posts down).

@ThruHammer - my source came from github - by googling rtl88x2bu I found https://github.com/morrownr/88x2bu which I used in first 88x2bu .pet I made several posts back, as well as the 2 options you mentioned & others. My next step, if firmware & the .pet in this post not the answer, is to compile some of those.


Re: Compile for new wifi module: build folder??

Posted: Mon Mar 08, 2021 12:52 am
by ThruHammer

PS - I'm not sure why Oz's post aren't coming through, but, the correct command, the one he intended you run is: dmesg | grep firmware


Re: Compile for new wifi module: build folder??

Posted: Mon Mar 08, 2021 12:59 am
by ozsouth

@ThruHammer - is not a typo - is my shortcut way of running it - instead of grep -i Network, I run grep etwork. Similar for firmware.


Re: Compile for new wifi module: build folder??

Posted: Mon Mar 08, 2021 1:03 am
by ThruHammer

To me, odd -- but OK so long as you're steering the ship. Haha...


Re: Compile for new wifi module: build folder??

Posted: Mon Mar 08, 2021 2:10 am
by ozsouth

@steeve - Finding the right source is hard. After loading .pets, if not working, missing firmware can be an issue - need to check, with dongle inserted, by running: dmesg | grep irmware
I've made 2 more .pets to try. Use at own risk & uninstall failed ones first.
Failed, so withdrawn.


Re: Compile for new wifi module: build folder??

Posted: Mon Mar 08, 2021 2:14 am
by ThruHammer

steeve, to elaborate, "uname -r" will tell you which kernel you're running.

You grab the package that corresponds to your specific kernel.


Re: Compile for new wifi module: build folder??

Posted: Mon Mar 08, 2021 12:31 pm
by steeve

I am running bionicpup64 kernel 4.19.23
Yes I had done
dmesg | grep irmware
Nothing about the usb WiFi dongle

Code: Select all

Bluetooth : hci0: Minimum firmware build 1 week 10 2014
bluetooth hci0: Direct firmware load for intel/ibt-19-0-4.sfi failed with error -2
Bluetooth: hci0: Failed to load Intel firmware fike (-2)
psmouse serio1: elantech: assuming hardware version 4 (with firmware version 0x0f5002)


Re: Compile for new wifi module: build folder??

Posted: Mon Mar 08, 2021 11:27 pm
by ozsouth

@steeve - I guess none of the .pets worked? Sometimes, although I haven't seen it recently, modules need to be blacklisted as they interfere with other drivers. The output of lsmod, with the dongle plugged in
would be interesting.


Re: Compile for new wifi module: build folder??

Posted: Tue Mar 09, 2021 12:19 am
by ThruHammer

DWA-182? On its packaging, which revision is listed -- C or D?


Re: Compile for new wifi module: build folder??

Posted: Tue Mar 09, 2021 8:14 pm
by steeve
ThruHammer wrote: Tue Mar 09, 2021 12:19 am

DWA-182? On its packaging, which revision is listed -- C or D?

Model is DWA-181. /CA
H/w version A1
F/w version 1.01


Re: Compile for new wifi module: build folder??

Posted: Tue Mar 09, 2021 8:15 pm
by steeve
ozsouth wrote: Mon Mar 08, 2021 11:27 pm

@steeve - I guess none of the .pets worked? Sometimes, although I haven't seen it recently, modules need to be blacklisted as they interfere with other drivers. The output of lsmod, with the dongle plugged in
would be interesting.

Thank you very much for your help. MS only wished they had that level of community service.
Im away from the keyboard, I'll give it a go after my work schedule.

..


Re: Compile for new wifi module: build folder??

Posted: Wed Mar 10, 2021 4:21 pm
by ThruHammer

Hey Oz, based on steeve's feedback, I think this page has the intended driver including a WPA3 enhancement.

Maybe when you get a moment to can build it for Bionicpup64 / kernel v4.19.23.

Edit: I didn't realize the unpacked driver is the same as the one listed by steeve in his opening post.

Then again, I've compiled a package if you're interested.


Re: Compile for new wifi module: build folder??

Posted: Thu Mar 11, 2021 5:09 am
by ozsouth

@ThruHammer - I've made & uploaded a .pet from your source. The source file was under the driver subfolder. Is quite different from my previous efforts & seems specific to steeve's adaptor.
@steeve - .pet apparently matching your adaptor's source is here (use at own risk): link expired