communication via raw ethernet packages

Post your RTL8710 based projects and build logs here
fauge
Posts: 2
Joined: Mon Mar 27, 2017 12:24 pm

communication via raw ethernet packages

Postby fauge » Mon Mar 27, 2017 12:31 pm

i am currently working or rather still researching on a discovery method for devices.
currently all methods i saw require mdns, which in return requires you to be connected to an ap. so your firmware needs to have ssid and pw in it...

now with direct mac-address-communication i could exchange or provide all the data needed. yet i don't know if there are libs that will run on the new rtl8710.

basically i want this code to run:
http://aschauf.landshut.org/fh/linux/ud ... 01s03.html

i found somethign similiar for the ESP8266:
github.com/goodwin-europe/raw-esp

anyone any intel on that?

thanks in advance.

kissste
Posts: 48
Joined: Fri Aug 12, 2016 3:43 am
Location: ON, Canada

Re: communication via raw ethernet packages

Postby kissste » Tue Mar 28, 2017 5:07 am

Yes absolutely, sending/receiving raw packets can be done, just dive into the SDK.
wireless.h
wifi_lib.h
wlan_lib.h
rtl8195a_xmit.o
rtw_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe);
rtw_hal_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe);
raw_sendto(struct raw_pcb *pcb, struct pbuf *p, ip_addr_t *ipaddr)
..... etc..

As well as, check out joinlink.c - it receives a raw package.

For example LWIP calls the following functions:
rltk_wlan_recv
rltk_wlan_get_recv_skb
rltk_wlan_send
rltk_wlan_send_skb

All depends on how low/high level you want to go.

fauge
Posts: 2
Joined: Mon Mar 27, 2017 12:24 pm

Re: communication via raw ethernet packages

Postby fauge » Thu Apr 20, 2017 3:36 pm

kissste wrote:Yes absolutely, sending/receiving raw packets can be done, just dive into the SDK.
wireless.h
wifi_lib.h
wlan_lib.h
rtl8195a_xmit.o
rtw_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe);
rtw_hal_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe);
raw_sendto(struct raw_pcb *pcb, struct pbuf *p, ip_addr_t *ipaddr)
..... etc..

As well as, check out joinlink.c - it receives a raw package.

For example LWIP calls the following functions:
rltk_wlan_recv
rltk_wlan_get_recv_skb
rltk_wlan_send
rltk_wlan_send_skb

All depends on how low/high level you want to go.


thank you. it really helped a lot =)

kissste
Posts: 48
Joined: Fri Aug 12, 2016 3:43 am
Location: ON, Canada

Re: communication via raw ethernet packages

Postby kissste » Fri Apr 21, 2017 3:32 am

char wlan0[6] = "wlan0";

u8 packet[128] = { 0x80, 0x00, 0x00, 0x00,
/*4*/ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/*10*/ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
/*16*/ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
/*22*/ 0xc0, 0x6c,
/*24*/ 0x83, 0x51, 0xf7, 0x8f, 0x0f, 0x00, 0x00, 0x00,
/*32*/ 0x64, 0x00,
/*34*/ 0x01, 0x04,
/* SSID */
/*36*/ 0x00, 0x06, 0x72, 0x72, 0x72, 0x72, 0x72, 0x72,
0x01, 0x08, 0x82, 0x84,
0x8b, 0x96, 0x24, 0x30, 0x48, 0x6c, 0x03, 0x01,
/*56*/ 0x04};

u8 channel = 1;

wext_set_channel(wlan0, channel);

wext_send_mgnt(wlan0, &packet, 57, NULL);


Return to “Projects and builds”

Who is online

Users browsing this forum: No registered users and 1 guest