---
title: "IPRAW/MACRAW"
url: "https://maker.wiznet.io/forum/15144"
markdown_url: "https://maker.wiznet.io/forum/15144/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "Sides55"
created: "2024-02-08T11:41:45+09:00"
last_activity: "2024-03-19T07:44:27+09:00"
language: "en"
views: 152
replies: 7
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# IPRAW/MACRAW

## Question

Asked by Sides55 on 2024-02-08 in Ethernet Chips.

Hello, i would like to ask is there way how to implement IPRAW/MACRAW on micropython with WIZNET5500 ?

## Replies

### Reply 1 by Kees1948, 2024-03-16

Hello, I am not sure it is related. I did some experiments with a W5500 and MACRAW. Contrarily to the documents to claim that MACRAW is possible on all W5500 sockets, I found that the datasheet is correct that MACRAW is *only* possible on socket #0.

It could be that there are different chip versions out there, but I have not found any indication on that.
best regards.

### Reply 2 by Eugeny, 2024-03-17 (in reply to reply 1)

![](https://avatars.discourse-cdn.com/v4/letter/k/c5a1d2/48.png) Kees1948:

> Contrarily to the documents to claim that MACRAW is possible on all W5500 sockets

What documents and show it in those documents.

### Reply 3 by Kees1948, 2024-03-18

<https://docs.wiznet.io/img/products/w5500/w5500_ap_ipraw_v100e.pdf>

### Reply 4 by Kees1948, 2024-03-18

Hello All,

Maybe I confused MACRAW with IPRAW, sorry for that. Do I get it correctly that IPRAW is initialized by:

- set the protocol register 0x0014

- open the socket , status 0x32 is not mentioned in the datasheet I could find.

What is the setting in register Sn_MR upfront?

Thank you very much

### Reply 5 by Eugeny, 2024-03-18

Seems like datasheet has really no information on IPRAW. And no value for Sn_MR_IPRAW. The best comes to mind to look into the libraries having IPRAW implemented.

### Reply 6 by Kees1948, 2024-03-19

Hi Eugeny,

I did that and found some info.

When playing with UDP with a larger packet i had to modify my code to get it working properly:

- open the socket in UDP mode

- take the socket write pointer and write the first part of the packet i.e. 512 bytes, save the updated pointer

- take the (updated) pointer and write the other part i.e. also 512 bytes into the socket memory, save the again updated pointer

- issue the SEND command

Only the last part (last write) is arriving, the first part is lost. I now keep the updated write pointer in RAM and after the second
write I write the pointer in the socket register, Now all my data arrives…

I had expected that I can update the socket buffer with one or more store actions, updating the write pointer accordingly and
then with SEND everything that has been written goes out.

best regards

Kees

### Reply 7 by Eugeny, 2024-03-19

![](https://avatars.discourse-cdn.com/v4/letter/k/c5a1d2/48.png) Kees1948:

> Only the last part (last write) is arriving

You can’t use W5500 registers as storage. In this case when you write new value, you read back old value. It will read new value only after issuing SEND command - exactly what you see and what you have done.

![](https://avatars.discourse-cdn.com/v4/letter/k/c5a1d2/48.png) Kees1948:

> updating the write pointer accordingly

No, it is incorrect assumption. Read and write registers are different physical locations.

---

Source: https://maker.wiznet.io/forum/15144
