Hacking How to use drc-sim?

didix16

Well-Known Member
Newcomer
Joined
Jan 23, 2015
Messages
82
Trophies
0
Age
31
XP
224
Country
Yes, I have kernel 4.3.0. What are the required steps for downgrading the driver?

You don't have to downgroad it, you must update it.

So the steps are:

1.) Download your linux sources. Mine was from raspberry pi2 but at the same time they pick up from https://github.com/torvalds/linux.git
So do this:
cd /usr/src
wget -O linux-4.x-source.zip https://github.com/torvalds/linux/archive/master.zip
unzip linux-4.x-source.zip
cd ./linux-master/net/mac80211

2.) Once you have the source copy the /usr/src/linux-headers-4.3.0-kali1-common content to /usr/src/linux-headers-4.3.0-kali1-amd64:
cp -rf /usr/src/linux-headers-4.3.0-kali1-common/* /usr/src/linux-headers-4.3.0-kali1-amd64

3.) Then you can build the module. I suggest to you that copy the dirver files into a new directory. Do this:

make -p /new/path/to_module
cp /usr/src/linux/net/mac80211/* /new/path/to_module
cd /usr/src/linux-headers-4.3.0-kali1-amd64
make M=/new/path/to_module

4.)Wait till compilation ends.

5.)Be happy :D

6.)Report your experience :hrth:
 
Last edited by didix16,
  • Like
Reactions: I pwned U!

I pwned U!

I am pleased to beat you!
Member
Joined
Jun 14, 2013
Messages
927
Trophies
3
Age
28
Website
gbatemp.net
XP
672
Country
United States
You don't have to downgroad it, you must update it.

So the steps are:

1.) Download your linux sources. Mine was from raspberry pi2 but at the same time they pick up from https://github.com/torvalds/linux.git
So do this:
cd /usr/src
wget -O linux-4.x-source.zip https://github.com/torvalds/linux/archive/master.zip
unzip linux-4.x-source.zip
cd ./linux-master/net/mac80211

2.) Once you have the source copy the /usr/src/linux-headers-4.3.0-kali1-common content to /usr/src/linux-headers-4.3.0-kali1-amd64:
cp -rf /usr/src/linux-headers-4.3.0-kali1-common/* /usr/src/linux-headers-4.3.0-kali1-amd64

3.) Then you can build the module. I suggest to you that copy the dirver files into a new directory. Do this:

make -p /new/path/to_module
cp /usr/src/linux/net/mac80211/* /new/path/to_module
cd /usr/src/linux-headers-4.3.0-kali1-amd64
make M=/new/path/to_module

4.)Wait till compilation ends.

5.)Be happy :D

6.)Report your experience :hrth:
All of the hunks have now succeeded, but I am now having some new build errors:
Code:
root@kali:/usr/src/linux-headers-4.3.0-kali1-amd64# cd /usr/src/linux-master/net/mac80211
root@kali:/usr/src/linux-master/net/mac80211# wget -O tsf.patch "https://bitbucket.org/memahaxx/drc-mac80211/commits/4a9823cf2a6733bc15a05cffaebd8850d07451a7/raw/"
--2016-06-16 02:02:58--  https://bitbucket.org/memahaxx/drc-mac80211/commits/4a9823cf2a6733bc15a05cffaebd8850d07451a7/raw/
Resolving bitbucket.org (bitbucket.org)... 104.192.143.2, 104.192.143.1, 104.192.143.3
Connecting to bitbucket.org (bitbucket.org)|104.192.143.2|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3093 (3.0K) [text/plain]
Saving to: ‘tsf.patch’

tsf.patch           100%[==================>]   3.02K  --.-KB/s    in 0s      

2016-06-16 02:02:59 (13.9 MB/s) - ‘tsf.patch’ saved [3093/3093]

root@kali:/usr/src/linux-master/net/mac80211# patch -p1 < tsf.patch
patching file README.DRC
patching file iface.c
Hunk #1 succeeded at 1699 with fuzz 2 (offset 119 lines).
Hunk #2 succeeded at 1888 with fuzz 1 (offset 154 lines).
Hunk #3 succeeded at 1917 (offset 154 lines).
Hunk #4 succeeded at 1962 with fuzz 2 (offset 157 lines).
root@kali:/usr/src/linux-master/net/mac80211# cd /usr/src/linux-headers-4.3.0-kali1-amd64
root@kali:/usr/src/linux-headers-4.3.0-kali1-amd64# make -C /usr/src/linux-headers-4.3.0-kali1-amd64 M=/usr/src/linux-master/net/mac80211make: Entering directory '/usr/src/linux-headers-4.3.0-kali1-amd64'
  LD      /usr/src/linux-master/net/mac80211/built-in.o
  CC [M]  /usr/src/linux-master/net/mac80211/main.o
In file included from /usr/src/linux-master/net/mac80211/main.c:12:0:
include/net/mac80211.h: In function ‘ieee80211_iftype_p2p’:
include/net/mac80211.h:5278:3: error: ‘ret’ undeclared (first use in this function)
   ret = device_create_file(&ndev->dev, &dev_attr_tsf);
   ^
include/net/mac80211.h:5278:3: note: each undeclared identifier is reported only once for each function it appears in
include/net/mac80211.h:5278:29: error: ‘ndev’ undeclared (first use in this function)
   ret = device_create_file(&ndev->dev, &dev_attr_tsf);
                             ^
include/net/mac80211.h:5278:41: error: ‘dev_attr_tsf’ undeclared (first use in this function)
   ret = device_create_file(&ndev->dev, &dev_attr_tsf);
                                         ^
In file included from /usr/src/linux-master/net/mac80211/main.c:28:0:
/usr/src/linux-master/net/mac80211/ieee80211_i.h: At top level:
/usr/src/linux-master/net/mac80211/ieee80211_i.h:899:22: error: ‘NUM_NL80211_BANDS’ undeclared here (not in a function)
  u32 rc_rateidx_mask[NUM_NL80211_BANDS];
                      ^
/usr/src/linux-master/net/mac80211/ieee80211_i.h: In function ‘ieee80211_have_rx_timestamp’:
/usr/src/linux-master/net/mac80211/ieee80211_i.h:1477:21: error: ‘RX_FLAG_MACTIME_PLCP_START’ undeclared (first use in this function)
  if (status->flag & RX_FLAG_MACTIME_PLCP_START &&
                     ^
In file included from /usr/src/linux-master/net/mac80211/trace.h:9:0,
                 from /usr/src/linux-master/net/mac80211/driver-ops.h:11,
                 from /usr/src/linux-master/net/mac80211/main.c:29:
/usr/src/linux-master/net/mac80211/trace.h: At top level:
/usr/src/linux-master/net/mac80211/trace.h:1001:11: warning: ‘struct ieee80211_ampdu_params’ declared inside parameter list
    struct ieee80211_ampdu_params *params),
           ^
include/linux/tracepoint.h:177:34: note: in definition of macro ‘__DECLARE_TRACE’
  static inline void trace_##name(proto)    \
                                  ^
include/linux/tracepoint.h:333:25: note: in expansion of macro ‘PARAMS’
   __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), 1, \
                         ^
include/linux/tracepoint.h:467:2: note: in expansion of macro ‘DECLARE_TRACE’
  DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
  ^
include/linux/tracepoint.h:467:22: note: in expansion of macro ‘PARAMS’
  DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                      ^
/usr/src/linux-master/net/mac80211/trace.h:998:1: note: in expansion of macro ‘TRACE_EVENT’
 TRACE_EVENT(drv_ampdu_action,
 ^
/usr/src/linux-master/net/mac80211/trace.h:999:2: note: in expansion of macro ‘TP_PROTO’
  TP_PROTO(struct ieee80211_local *local,
  ^
/usr/src/linux-master/net/mac80211/trace.h:1001:11: warning: its scope is only this definition or declaration, which is probably not what you want
    struct ieee80211_ampdu_params *params),
           ^
include/linux/tracepoint.h:177:34: note: in definition of macro ‘__DECLARE_TRACE’
  static inline void trace_##name(proto)    \
                                  ^
include/linux/tracepoint.h:333:25: note: in expansion of macro ‘PARAMS’
   __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), 1, \
                         ^
include/linux/tracepoint.h:467:2: note: in expansion of macro ‘DECLARE_TRACE’
  DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
  ^
include/linux/tracepoint.h:467:22: note: in expansion of macro ‘PARAMS’
  DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                      ^
/usr/src/linux-master/net/mac80211/trace.h:998:1: note: in expansion of macro ‘TRACE_EVENT’
 TRACE_EVENT(drv_ampdu_action,
 ^
/usr/src/linux-master/net/mac80211/trace.h:999:2: note: in expansion of macro ‘TP_PROTO’
  TP_PROTO(struct ieee80211_local *local,
  ^
/usr/src/linux-master/net/mac80211/trace.h:1001:11: warning: ‘struct ieee80211_ampdu_params’ declared inside parameter list
    struct ieee80211_ampdu_params *params),
           ^
include/linux/tracepoint.h:193:38: note: in definition of macro ‘__DECLARE_TRACE’
  register_trace_##name(void (*probe)(data_proto), void *data) \
                                      ^
include/linux/tracepoint.h:334:5: note: in expansion of macro ‘PARAMS’
     PARAMS(void *__data, proto),  \
     ^
include/linux/tracepoint.h:467:2: note: in expansion of macro ‘DECLARE_TRACE’
  DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
  ^
include/linux/tracepoint.h:467:22: note: in expansion of macro ‘PARAMS’
  DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                      ^
/usr/src/linux-master/net/mac80211/trace.h:998:1: note: in expansion of macro ‘TRACE_EVENT’
 TRACE_EVENT(drv_ampdu_action,
 ^
/usr/src/linux-master/net/mac80211/trace.h:999:2: note: in expansion of macro ‘TP_PROTO’
  TP_PROTO(struct ieee80211_local *local,
  ^
/usr/src/linux-master/net/mac80211/trace.h:1001:11: warning: ‘struct ieee80211_ampdu_params’ declared inside parameter list
    struct ieee80211_ampdu_params *params),
           ^
include/linux/tracepoint.h:199:40: note: in definition of macro ‘__DECLARE_TRACE’
  unregister_trace_##name(void (*probe)(data_proto), void *data) \
                                        ^
include/linux/tracepoint.h:334:5: note: in expansion of macro ‘PARAMS’
     PARAMS(void *__data, proto),  \
     ^
include/linux/tracepoint.h:467:2: note: in expansion of macro ‘DECLARE_TRACE’
  DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
  ^
include/linux/tracepoint.h:467:22: note: in expansion of macro ‘PARAMS’
  DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                      ^
/usr/src/linux-master/net/mac80211/trace.h:998:1: note: in expansion of macro ‘TRACE_EVENT’
 TRACE_EVENT(drv_ampdu_action,
 ^
/usr/src/linux-master/net/mac80211/trace.h:999:2: note: in expansion of macro ‘TP_PROTO’
  TP_PROTO(struct ieee80211_local *local,
  ^
/usr/src/linux-master/net/mac80211/trace.h:1001:11: warning: ‘struct ieee80211_ampdu_params’ declared inside parameter list
    struct ieee80211_ampdu_params *params),
           ^
include/linux/tracepoint.h:205:46: note: in definition of macro ‘__DECLARE_TRACE’
  check_trace_callback_type_##name(void (*cb)(data_proto)) \
                                              ^
include/linux/tracepoint.h:334:5: note: in expansion of macro ‘PARAMS’
     PARAMS(void *__data, proto),  \
     ^
include/linux/tracepoint.h:467:2: note: in expansion of macro ‘DECLARE_TRACE’
  DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
  ^
include/linux/tracepoint.h:467:22: note: in expansion of macro ‘PARAMS’
  DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                      ^
/usr/src/linux-master/net/mac80211/trace.h:998:1: note: in expansion of macro ‘TRACE_EVENT’
 TRACE_EVENT(drv_ampdu_action,
 ^
/usr/src/linux-master/net/mac80211/trace.h:999:2: note: in expansion of macro ‘TP_PROTO’
  TP_PROTO(struct ieee80211_local *local,
  ^
In file included from /usr/src/linux-master/net/mac80211/main.c:29:0:
/usr/src/linux-master/net/mac80211/driver-ops.h: In function ‘drv_sync_rx_queues’:
/usr/src/linux-master/net/mac80211/driver-ops.h:40:16: error: ‘const struct ieee80211_ops’ has no member named ‘sync_rx_queues’
  if (local->ops->sync_rx_queues) {
                ^
/usr/src/linux-master/net/mac80211/driver-ops.h:42:13: error: ‘const struct ieee80211_ops’ has no member named ‘sync_rx_queues’
   local->ops->sync_rx_queues(&local->hw);
             ^
/usr/src/linux-master/net/mac80211/driver-ops.h: In function ‘drv_config_iface_filter’:
/usr/src/linux-master/net/mac80211/driver-ops.h:215:16: error: ‘const struct ieee80211_ops’ has no member named ‘config_iface_filter’
  if (local->ops->config_iface_filter)
                ^
/usr/src/linux-master/net/mac80211/driver-ops.h:216:13: error: ‘const struct ieee80211_ops’ has no member named ‘config_iface_filter’
   local->ops->config_iface_filter(&local->hw, &sdata->vif,
             ^
/usr/src/linux-master/net/mac80211/driver-ops.h: At top level:
/usr/src/linux-master/net/mac80211/driver-ops.h:603:15: warning: ‘struct ieee80211_ampdu_params’ declared inside parameter list
        struct ieee80211_ampdu_params *params);
               ^
/usr/src/linux-master/net/mac80211/main.c: In function ‘ieee80211_alloc_hw_nm’:
/usr/src/linux-master/net/mac80211/main.c:561:31: error: ‘NL80211_EXT_FEATURE_RRM’ undeclared (first use in this function)
  wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_RRM);
                               ^
scripts/Makefile.build:263: recipe for target '/usr/src/linux-master/net/mac80211/main.o' failed
make[1]: *** [/usr/src/linux-master/net/mac80211/main.o] Error 1
Makefile:1395: recipe for target '_module_/usr/src/linux-master/net/mac80211' failed
make: *** [_module_/usr/src/linux-master/net/mac80211] Error 2
make: Leaving directory '/usr/src/linux-headers-4.3.0-kali1-amd64'
 
  • Like
Reactions: The Cringe

didix16

Well-Known Member
Newcomer
Joined
Jan 23, 2015
Messages
82
Trophies
0
Age
31
XP
224
Country
Did you join the common headers with the kernel version headers?
Note that
root@kali:/usr/src/linux-headers-4.3.0-kali1-amd64# make -C /usr/src/linux-headers-4.3.0-kali1-amd64 M=/usr/src/linux-master/net/mac80211
the bold part of command is unnecessary because you are currently in that path. Try to avoid it if you are in the working directory
 

TexHD

Member
Newcomer
Joined
Nov 23, 2016
Messages
5
Trophies
0
Age
24
XP
41
Country
Norway
Code:
Traceback (most recent call last):
  File "drc-sim.py", line 379, in <module>
    VID_S : ServiceVSTRM(),
  File "drc-sim.py", line 172, in __init__
    construct.Nibble('magic'),
TypeError: 'BitsInteger' object is not callable

Please help, thanks.
 

padder123

Member
Newcomer
Joined
Jan 21, 2017
Messages
16
Trophies
0
Age
51
XP
60
Country
United States
Code:
Traceback (most recent call last):
  File "drc-sim.py", line 379, in <module>
    VID_S : ServiceVSTRM(),
  File "drc-sim.py", line 172, in __init__
    construct.Nibble('magic'),
TypeError: 'BitsInteger' object is not callable

Please help, thanks.

This is fixed by downgrading construct,
pip install construct==2.5
I assume you have the more recent 2.8 version installed.

However I am stuck trying to use drc-sim because my Wii U just repeatedly tries to update the firmware and fails, and I dont have a working real gamepad to get the correct data to fake version replies from.
Would be grateful for any workaround here.
 
  • Like
Reactions: I pwned U!

I pwned U!

I am pleased to beat you!
Member
Joined
Jun 14, 2013
Messages
927
Trophies
3
Age
28
Website
gbatemp.net
XP
672
Country
United States
This is fixed by downgrading construct,
pip install construct==2.5
I assume you have the more recent 2.8 version installed.

However I am stuck trying to use drc-sim because my Wii U just repeatedly tries to update the firmware and fails, and I dont have a working real gamepad to get the correct data to fake version replies from.
Would be grateful for any workaround here.
This is farther than anyone else seems to have come!

Could you please provide a step-by-step tutorial for compiling it without errors? I spent hours trying to compile it last year for my Kali VM, but I eventually gave up (see my posts from the past few pages of this thread).
 

cheddar

Member
Newcomer
Joined
Mar 8, 2017
Messages
5
Trophies
0
Age
35
XP
62
Country
United States
Wait, so the touchscreen works now? Nice!
did for me. The keyboard was also working. It just wasn't corresponding to the exact keys "a" wasn't "a" it was like the space bar or something.
I wouldn't game on it though... it was pretty laggy and the audio was clipping badly... but for people without a gamepad that just need access to settings this is a lifesaver.
 
  • Like
Reactions: AboodXD

GizmoTheGreen

Well-Known Member
Member
Joined
Oct 8, 2009
Messages
813
Trophies
1
XP
904
Country
This is fixed by downgrading construct,
pip install construct==2.5
I assume you have the more recent 2.8 version installed.

However I am stuck trying to use drc-sim because my Wii U just repeatedly tries to update the firmware and fails, and I dont have a working real gamepad to get the correct data to fake version replies from.
Would be grateful for any workaround here.

at the gamepad sync screen let the wii-u timeout back to the home menu by itself before you connect to the wii u and then run drc-sim. this way you bypass the update check
 

fvig2001

Well-Known Member
Member
Joined
Aug 21, 2006
Messages
920
Trophies
1
XP
2,876
Country
Philippines
So I tried this out on Ubuntu 20.04.06 and the window is super small and the application does not allow resize.

Any way to fix it?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Sicklyboy @ Sicklyboy:
    maaaaan that's so awesome but I also don't want to fork over a hundo for it
  • Veho @ Veho:
    The fuuuuu---
  • Veho @ Veho:
    I thought it was an actual xBox at that price.
  • Sicklyboy @ Sicklyboy:
    I wanna grab a 360 Slim and a 360 E one of these days. Missed the boat of getting them at their lowest though, once they were discontinued. Could've got them for cheap back when I was a broke 20 something working at Target, but then again, I was a broke 20 something working at Target
  • Veho @ Veho:
    Being broke is no fun.
  • K3Nv2 @ K3Nv2:
    @Sicklyboy, $150 isn't that bad for a jtag slim on ebay
  • Veho @ Veho:
    I only wish it was actually playable.
  • Veho @ Veho:
    There's a guy on the Tube of You that makes playable mechanical arcade games out of Lego. This could work on the same principle.
  • Veho @ Veho:
    Just a couple of guys taking their manatee out for some fresh air, why you have to molest them?
  • Veho @ Veho:
    Stupid Chinese shop switched their shipping company and this one is slooooooow.
  • LeoTCK @ LeoTCK:
    STOP BUYING CHINESE CRAP THEN
  • LeoTCK @ LeoTCK:
    SUPPORT LOCAL PRODUCTS, MAKE REVOLUTION
  • LeoTCK @ LeoTCK:
    THEY KEEP REMOVING LOCAL SHIt AND REPLACING WItH INFERIOR CHINESE CRAP
  • LeoTCK @ LeoTCK:
    THATS WHY MY PARTNER CANT GET A GOOTWEAR HIS SIZE ANYMORE
  • LeoTCK @ LeoTCK:
    HE HAS BIG FOOT AND BIG DUCK
  • LeoTCK @ LeoTCK:
    d*ck i mean*
  • LeoTCK @ LeoTCK:
    lol
  • Veho @ Veho:
    Mkay.
  • Veho @ Veho:
    I just ordered another package from China just to spite you.
  • SylverReZ @ SylverReZ:
    Leo could not withstand communism.
  • SylverReZ @ SylverReZ:
    Its OUR products to begin with lol.
    SylverReZ @ SylverReZ: Its OUR products to begin with lol.