WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TC 9.0 an ralink mt7601u no AP Mode?  (Read 5892 times)

Offline HoerMirAuf

  • Newbie
  • *
  • Posts: 10
TC 9.0 an ralink mt7601u no AP Mode?
« on: February 11, 2019, 07:49:15 AM »
Hi Comunity ...

I'm new to TC.

So pleas apolgize my inexperience.

On a small old thin Client i want to run TC with a ralink usb Wifi Device in Access Point Mode.
hostapd couldn't set it to AP Mode. I know from other linux Ditros there are trouble with ralink USB Wifi Devices and AP Mode ...
On Puppy Linux i have to compile a modified driver source to get this device to work. But the goal is TC not Puppy.

I've Looked around on Tinycore Forum, but couldn't found a Kernel-header-Source to compile only the module easily by myself...

Is it neccesary to compile the whole Kernel in this case, to be able to compiling a module?
Or is anybody out there who have made this device already working in AP Mode?
Or can give me anybody some hints?

Regards HoerMirAuf

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14798
Re: TC 9.0 an ralink mt7601u no AP Mode?
« Reply #1 on: February 11, 2019, 08:29:07 AM »
If you load the compiletc meta-extension, it will load the kernel headers extension linux-4.19_api_headers.

You will also need to download the patched kernel, config and module-symvers from:

http://www.tinycorelinux.net/10.x/x86/release/src/kernel/

..and prepare the kernel source.

There is a linux-kernel-sources-env extension, which would do this for you, but I'm not sure that it has been updated for tc-10.x (or if it needs to be udated).

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
TC 9.0 an ralink mt7601u no AP Mode?
« Reply #2 on: February 11, 2019, 11:21:13 AM »
..and prepare the kernel source.

There is a linux-kernel-sources-env extension, which would do this for you, but I'm not sure that it has been updated for tc-10.x (or if it needs to be udated).
linux-kernel-sources-env extension has been updated, it needs an internet connection while it verifies kernel version and downloads kernel sources and dependencies.


Sent from my iPhone using Tapatalk
« Last Edit: February 11, 2019, 11:22:53 AM by coreplayer2 »

Offline HoerMirAuf

  • Newbie
  • *
  • Posts: 10
Re: TC 9.0 an ralink mt7601u no AP Mode?
« Reply #3 on: February 12, 2019, 01:10:19 AM »
Thank you very much for the hints  ...

I tryed it out, but it seem's my knowledge about compiling Modules for Tinycore is too small....
Always get a compile error and i don't know why ...  :-\

Maybe someone with more experience could compile it for TinyCore 9.0 Kernel 4.14.10 x86?

I  have uploaded the Driver Source here:
https://drive.google.com/open?id=1jy2NC76Cy3w75-9SLpBR8sHFrLO6yPgt]mt7601u-ap-master.tar.gz
« Last Edit: February 12, 2019, 01:13:29 AM by HoerMirAuf »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14798
Re: TC 9.0 an ralink mt7601u no AP Mode?
« Reply #4 on: February 12, 2019, 02:44:35 AM »
If you post the compile error here, perhaps other users could help?

Offline HoerMirAuf

  • Newbie
  • *
  • Posts: 10
Re: TC 9.0 an ralink mt7601u no AP Mode?
« Reply #5 on: February 12, 2019, 05:44:28 AM »
EDIT:
Ok got it !!

picked up the latest source from:
https://github.com/tanaka1892/mt7601u-ap

and compiling went well !!

Thank you very much for your support !!  :) ;D

*****************************************

*****************************************

Here is Terminal output if i try to compile.

Installed the Source with the linux-kernel-source-env.sh
(but there was some extract errors first an i have change the script from #!/bin/sh to #!/bin/bash an replace the variable '$tarx' to 'tar -xf' )

Code: [Select]
make[1]: Entering directory '/usr/src/linux-4.14.10'
  CC [M]  /home/tc/mt7601u-ap-master/os/linux/../../os/linux/rt_profile.o
  CC [M]  /home/tc/mt7601u-ap-master/os/linux/../../ap/ap_mbss.o
  CC [M]  /home/tc/mt7601u-ap-master/os/linux/../../ap/ap.o
/home/tc/mt7601u-ap-master/os/linux/../../ap/ap.c: In function 'APStartUp':
/home/tc/mt7601u-ap-master/os/linux/../../ap/ap.c:743:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
 }
 ^
  CC [M]  /home/tc/mt7601u-ap-master/os/linux/../../ap/ap_assoc.o
  CC [M]  /home/tc/mt7601u-ap-master/os/linux/../../ap/ap_auth.o
  CC [M]  /home/tc/mt7601u-ap-master/os/linux/../../ap/ap_connect.o
  CC [M]  /home/tc/mt7601u-ap-master/os/linux/../../ap/ap_mlme.o
  CC [M]  /home/tc/mt7601u-ap-master/os/linux/../../ap/ap_sanity.o
  CC [M]  /home/tc/mt7601u-ap-master/os/linux/../../ap/ap_sync.o
  CC [M]  /home/tc/mt7601u-ap-master/os/linux/../../ap/ap_wpa.o
  CC [M]  /home/tc/mt7601u-ap-master/os/linux/../../ap/ap_data.o
/home/tc/mt7601u-ap-master/os/linux/../../ap/ap_data.c: In function 'APHandleRxDataFrame_Hdr_Trns':
/home/tc/mt7601u-ap-master/os/linux/../../ap/ap_data.c:5208:31: error: passing argument 2 of 'hex_dump' from incompatible pointer type [-Werror=incompatible-pointer-types]
   hex_dump("DataFrameHeader", pHeader, 36);
                               ^~~~~~~
In file included from /home/tc/mt7601u-ap-master/include/rt_config.h:70:0,
                 from /home/tc/mt7601u-ap-master/os/linux/../../ap/ap_data.c:33:
/home/tc/mt7601u-ap-master/include/rt_os_util.h:600:6: note: expected 'unsigned char *' but argument is of type 'HEADER_802_11 * {aka struct _HEADER_802_11 *}'
 void hex_dump(char *str, PUCHAR pSrcBufVA, UINT SrcBufLen);
      ^~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:315: /home/tc/mt7601u-ap-master/os/linux/../../ap/ap_data.o] Error 1
make[1]: *** [Makefile:1504: _module_/home/tc/mt7601u-ap-master/os/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-4.14.10'
make: *** [Makefile:76: LINUX] Error 2
« Last Edit: February 12, 2019, 05:53:09 AM by HoerMirAuf »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: TC 9.0 an ralink mt7601u no AP Mode?
« Reply #6 on: February 12, 2019, 07:11:03 AM »
Hello HoerMirAuf
Let me get this right,    you had some compiling error but downloaded the latest source and compiling went well??

Did you have some issue with the linux-kernel-source-env extension??   simply loading the extension should run the script, download dependencies and kernel sources and prepare those sources for compiling.      Maybe the latest module sources resolved the confusion?
 

If your module works as expected then you could simply add it to your backup but it's recommended to make an extension and add that to onboot.lst to be loaded on each boot, see:
http://wiki.tinycorelinux.net/wiki:creating_extensions

And it would be appreciated if you submitted the extension to the repository, thanks.
use "submitqc" extension  to prepare for submission

thanks

Offline HoerMirAuf

  • Newbie
  • *
  • Posts: 10
Re: TC 9.0 an ralink mt7601u no AP Mode?
« Reply #7 on: February 12, 2019, 08:55:14 AM »
Hallo coreplayer2
Quote
you had some compiling error but downloaded the latest source and compiling went well??

Yes , this is right. The First time i installed the Kernel Source manually so, i thought i have made some mistake there ...
The next step was to install the Kernel Source by using the  linux-kernel-source-env.sh script.
But the Script was allways running in a unexpected ")" in the lines 210-235.

After changing the Script from sh to bash the unexpected ")" error was gone but no unpacking from the kernel-Source-txz file. Don't know why, my workaround was replace the $tarx in line 219 to tar -xvf

After install the Source successful with the the modified linux-kernel-source-env.sh, i got the same compile error the first time. Because the used Source was not the current release (downloaded it for a longer time for a Puppy Linux) i grabbed the current one and the compilling was successful.

The Modul is working and i've already made a extension and added to the onboot.lst

I will submit it the next time ...

Thank you !


Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: TC 9.0 an ralink mt7601u no AP Mode?
« Reply #8 on: February 12, 2019, 10:56:59 AM »
Hello HoerMirAuf

I'm a little confused here, are you using TC-9 or TC-10?

Offline HoerMirAuf

  • Newbie
  • *
  • Posts: 10
Re: TC 9.0 an ralink mt7601u no AP Mode?
« Reply #9 on: February 13, 2019, 12:56:38 AM »
TC 9 (take a look to to the Subject Line)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: TC 9.0 an ralink mt7601u no AP Mode?
« Reply #10 on: February 13, 2019, 06:21:55 AM »
Hello HoerMirAuf
Indeed and that is exactly the statement that led to the confusion, because TTC-9 is no longer supported as such all our replies have referenced TC-10.

 :-\

Offline HoerMirAuf

  • Newbie
  • *
  • Posts: 10
Re: TC 9.0 an ralink mt7601u no AP Mode?
« Reply #11 on: February 14, 2019, 09:45:07 AM »
Oh, i am sorry. I didn't know that.

But your hints were very usefull and helped me to sucessfully solve my problem.

Please apologize if i made some confusion... that wasn't intended.   :(


Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: TC 9.0 an ralink mt7601u no AP Mode?
« Reply #12 on: February 14, 2019, 10:20:30 AM »
No worries, am just glad you were able to resolve your issue despite the confusion
Regards


Sent from my iPhone using Tapatalk