Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
1,588 Views

Using intel Edison to spoof a GoPro remote with hostapd

As the title suggests, I'm trying to use an intel edison to spoof the wifi network created by a gopro remote so that I can wirelessly control a gopro camera.

The details of how others have done this can be found here: http://goprohero.readthedocs.io/en/latest/Wifi%20Research/ Wifi Research - goprohero

Basically, you set up an access point with a certain SSID and MAC address and when you tell the camera to pair with the remote, it will connect to the access point automatically.

I've set up a simple hostapd.conf file, disabled wpa_supplicant, and the enabled hostapd. I can connect to this access point using my phone and computer. Both devices are promptly assigned IP addresses.

Simple hostapd.conf file I use:

interface=wlan0

ssid=HERO-RC-000000

hw_mode=g

channel=6

auth_algs=1

wmm_enabled=0

Output from "systemctl status hostapd"

● hostapd.service - Hostap daemon service

Loaded: loaded (/lib/systemd/system/hostapd.service; disabled)

Active: active (running) since Thu 2017-05-25 03:57:59 UTC; 1min 31s ago

Process: 661 ExecStartPre=/sbin/modprobe bcm4334x op_mode=2 (code=exited, status=0/SUCCESS)

Process: 656 ExecStartPre=/sbin/modprobe -r bcm4334x (code=exited, status=0/SUCCESS)

Main PID: 669 (hostapd)

CGroup: /system.slice/hostapd.service

└─669 /usr/sbin/hostapd /etc/hostapd/hostapd.conf

May 25 03:57:59 HERO-RC-000000 systemd[1]: Started Hostap daemon service.

May 25 03:58:01 HERO-RC-000000 hostapd[669]: wlan0: STA d4:d9:19:f5:90:7e IEEE 802.11: associated

May 25 03:58:01 HERO-RC-000000 hostapd[669]: wlan0: STA d4:d9:19:f5:90:7e RADIUS: starting accounting session 5926560

May 25 03:58:12 HERO-RC-000000 hostapd[669]: wlan0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: associated

May 25 03:58:12 HERO-RC-000000 hostapd[669]: wlan0: STA xx:xx:xx:xx:xx:xx RADIUS: starting accounting session 5926561

The orange text is the mac address of my phone. The blue is the camera MAC. However, when I look at arp -a, only the phone has been assigned an IP address.

? (192.168.42.22) at xx:xx:xx:xx:xx:xx [ether] on wlan0

Does anybody know how I can go about debugging why the camera isn't being assigned an IP address? Is this a problem with hostapd or with dhcp?

Thank you,

-Viliam

0 Kudos
7 Replies
idata
Community Manager
44 Views

Hello Viliam,

 

 

We are moving your thread to the /community/tech/edison Intel® Edison Support Community as they're better equipped to handle these issues.

 

 

Best regards,

 

Carlos A.

 

 

idata
Community Manager
44 Views

Hello Viliam,

 

 

Thank you for your interest in the Intel® Edison Compute Module (IoT).

 

 

It seems that the Edison part works fine (as well as the hostapd and the DHCP), since you can connect the phone and the computer to the access point.

 

 

It is quite difficult for me to test your setup, considering I don't have access to a GoPro camera or remote. If the source of the issue is the camera or the remote, then it goes beyond of our support scope. The corresponding debugging should be suggested by the manufacturer, since there may be pairing or device recognition settings that I'm not aware of. Anyhow, there is always the chance that other users, that have tried something similar, can share their experience in this thread.

 

 

If you have any other question regarding the Edison module, don't hesitate contact us. We'll be happy to help in any way we can.

 

 

Have a nice day.

 

 

Regards,

 

Andres V.
idata
Community Manager
44 Views

Thanks for the answer. I understand that you will not be able to help with the specifics of the problem. However, can you point me to a way of getting more debugging information out of hostapd? I noticed that there are several levels of logging, but I'm not sure where to look for the output of the log files.

Thanks!

idata
Community Manager
44 Views

Hello Viliam,

 

 

The available information associated with hostapd can be obtained through the following command:

 

 

root@edison:~# hostapd -d hostapd v2.1 User space daemon for IEEE 802.11 AP management, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator Copyright (c) 2002-2014, Jouni Malinen <</span>mailto:j@w1.fi j@w1.fi> and contributors  usage: hostapd [-hdBKtv] [-P ] [-e ] \  [-g ] [-G ] \    options:  -h show this usage  -d show more debug messages (-dd for even more)  -B run daemon in the background  -e entropy file  -g global control interface path  -G group for control interfaces  -P PID file  -K include key data in debug messages  -t include timestamps in some debug messages  -v show hostapd version

 

 

I saw what you mentioned about the logging levels (from http://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf):

 

 

# Levels (minimum value for logged events): # 0 = verbose debugging # 1 = debugging # 2 = informational messages # 3 = notification # 4 = warning

 

 

Even though this is more of a Linux/Yocto-oriented inquiry than an Edison-related issue, I'll investigate more about how to access those logs.

 

 

As soon as I have relevant information I'll post it here.

 

 

If you have any update or question, don't hesitate to contact us.

 

 

Thank you for your patience.

 

 

Have a nice day.

 

 

Regards,

 

Andres V.
idata
Community Manager
44 Views

Hello Viliam,

 

 

The logger levels are changed using one of the 5 options (0 - 4), each one will give you different output messages.

 

 

The debugging messages are displayed using the following command:

 

 

hostapd –d /etc/hostapd/hostapd

 

 

I hope you find this information useful.

 

 

Have a nice day.

 

 

Regards,

 

Andres V.
idata
Community Manager
44 Views

Thanks for your continuing support Andres. I've made a break through and managed to get the camera to connect to hostapd and get an IP address.

For others reading this thread, the important information is the following:

Follow the instructions here to setup the AP. Wifi Research.

My hostapd.conf file is the following:

interface=wlan0

ssid=HERO-RC-000000

ctrl_interface=/var/run/hostapd

logger_syslog=-1

logger_syslog_level=0

logger_stdout=-1

logger_stdout_level=0

hw_mode=g

channel=6

auth_algs=1

wmm_enabled=0

ctrl_interface is important and omitted from many other online resources that describe how to setup hostapd on Edison (for example the sparkfun guides). Adding this line allows you to use hostapd_cli for more debugging information.

I set up the dhcp server using the instructions from the link above, however I used the udhcp package installed on the Edison by default instead of the one recommended by the link.

The key solution came from looking at the /lib/systemd/system/udhcpd-for-hostapd.service file. The default file on the edison sets up wlan0 to use 192.168.42.1 as its IP address which then overrides the settings in your dhcp configuration. This was causing some issue that made the network not work. Just change the ifconfig line in the .service file to match your settings in the dhcp.conf file and the network should work.

idata
Community Manager
44 Views

Hello Viliam,

 

 

I'm glad to hear that you could solve the issue.

 

 

Thank you for sharing your experience with the community, we really appreciate it.

 

 

Have a nice day.

 

 

Regards,

 

Andres V.