Poll
Question: Would Arduino PPP (TCP/IP over serial/USB) useful for you?
Yes, a lot. - 8 (42.1%)
Could use it, if available. - 9 (47.4%)
Not really. - 2 (10.5%)
Total Voters: 19

Pages: [1]   Go Down
Author Topic: TCP/IP without Ethernet Shield: any use for it ?  (Read 2266 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 126
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

Would it be useful to have an Arduino TCP/IP implementation which does not use any Ethernet Shield ? This means use the USB/Serial port for TCP/IP communication.

I have right now a basic PPP (Point-to-Point Protocol) implementation on Arduino, but TCP/IP stack is on going, it only responds to ping right now.

If many people show interest on this, I might implement a usable TCP/IP stack.

Álvaro
Logged

Cape Town, South Africa
Offline Offline
Full Member
***
Karma: 0
Posts: 177
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How does the implementation work?

Do you have some code online?
Logged

Wigan, UK
Offline Offline
God Member
*****
Karma: 19
Posts: 814
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If it meant no extra hardware then yes, definitely.

I've got a couple of things that do really basic stuff online, it doesn't really justify the cost of an ethernet shield.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 126
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
leppie: How does the implementation work?
Do you have some code online?
The implementation follows RFC1661 (http://www.faqs.org/rfcs/rfc1661.html), using PPP over octet-synchronous HDLC framing (http://www.faqs.org/rfcs/rfc1662.html)

I've some code online, but only for PPP, not IP. And its not yet up to date with my latest changes, but you can see it here: http://github.com/alvieboy/arduino-serpro/blob/development/SerProPPP.h. It reuses my HDLC implementation for SerPro.

Quote
cowjam: If it meant no extra hardware then yes, definitely.
Yes, absolutely no extra hardware.
Logged

Holland
Offline Offline
Sr. Member
****
Karma: 0
Posts: 439
Arduino likes cookies too
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I voted no, any application using TCP/IP for me would mean I don't want a PC in between the arduino and the network.
Please don't see it as taking a piss at what you are proposing, it is just that I wouldn't use it due to the above reason.

Good luck with it if you decide to go for it  smiley
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 126
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's understandable. I agree with you to some extent.

Here's a dump of setup and simple ping:

Code:
# pppd updetach nocrtscts debug /dev/ttyUSB0 115200 noauth 1.2.3.4:5.6.7.8
using channel 8
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x1fe0ba53>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x1fe0ba53>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x1fe0ba53>]
rcvd [LCP ConfReq id=0x1 <magic 0x41524455> <mru 154>]
sent [LCP ConfAck id=0x1 <magic 0x41524455> <mru 154>]
sent [LCP EchoReq id=0x0 magic=0x1fe0ba53]
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <addr 1.2.3.4>]
rcvd [IPCP ConfReq id=0x2 <addr 0.0.0.0>]
sent [IPCP ConfNak id=0x2 <addr 5.6.7.8>]
rcvd [LCP ProtRej id=0x3 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
rcvd [IPCP ConfReq id=0x4 <addr 5.6.7.8>]
sent [IPCP ConfAck id=0x4 <addr 5.6.7.8>]
rcvd [IPCP ConfReq id=0x5 <addr 5.6.7.8>]
sent [IPCP ConfAck id=0x5 <addr 5.6.7.8>]
sent [IPCP ConfReq id=0x1 <addr 1.2.3.4>]
rcvd [IPCP ConfAck id=0x1 <addr 1.2.3.4>]
Cannot determine ethernet address for proxy ARP
local  IP address 1.2.3.4
remote IP address 5.6.7.8

#  ping 5.6.7.8
PING 5.6.7.8 (5.6.7.8) 56(84) bytes of data.
64 bytes from 5.6.7.8: icmp_seq=1 ttl=32 time=22.8 ms
64 bytes from 5.6.7.8: icmp_seq=2 ttl=32 time=22.7 ms
64 bytes from 5.6.7.8: icmp_seq=3 ttl=32 time=22.7 ms
64 bytes from 5.6.7.8: icmp_seq=4 ttl=32 time=22.7 ms
^C
--- 5.6.7.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 22.707/22.781/22.884/0.195 ms

Álvaro
Logged

0
Offline Offline
Full Member
***
Karma: 6
Posts: 200
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Would it mean you could hook it directly up to the arduino? Like plug the ethernet cable right into some pins? or would a PC have to be in the middle? I would only use it if you could hook the ethernet cable right up to the arduino itself.
« Last Edit: June 01, 2010, 05:00:48 pm by wyager » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 126
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Would it mean you could hook it directly up to the arduino? Like plug the ethernet cable right into some pins? or would a PC have to be in the middle? I would only use it if you could hook the ethernet cable right up to the arduino itself.
No. For that you actually need an Ethernet PHY + Magnetical isolators. So you have to hook it either to a PC or to a modem which speaks PPP. No miracles here, unfortunately.

PPP is used on DSL modems, cable modems, and remote access protocols like PPTP. It's a point-to-point protocol. You can also hook it to whichever router with serial port (assuming you have access to firmware).

Ethernet shield is quite expensive.

But there are other applications for this: one is you can pick up two arduinos, hook a UHF/VHF or lower (radio) transceiver (even infrared) and have IP network stack allowing you to have connectivity in a very good range. So Arduino looks like a modem, usb-serial connected.

If you have ethernet available, and wish to have your arduino live, then ethernet shield is the way to go.

Álvaro
Logged

0
Offline Offline
Full Member
***
Karma: 6
Posts: 200
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

why would you need all of that stuff? I looked up ethernet voltages and the thread I looked at said less than four volts...
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 126
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
why would you need all of that stuff? I looked up ethernet voltages and the thread I looked at said less than four volts...
It's not a matter of voltage. Besides, the signals are differential.

If you take a closer look at most ethernet device you have, something clearly stands out, due to its size:  the transformers. The arduino ethernet shield uses a non-isolated approach: a resistor divider. This is very unusual actually, see W5100 datasheet for an example. This might lead to electrical problems because it forces non-isolation, and might kill your controller or switch.

Even if you could get rid of MAX, you have the ethernet PHY. This adaptor needs to actually transmit/receive bits over the medium:

http://en.wikipedia.org/wiki/Fast_Ethernet

" With 100BASE-TX hardware, the raw bits (4 bits wide clocked at 25 MHz at the MII) go through 4B5B binary encoding to generate a series of 0 and 1 symbols clocked at 125 MHz symbol rate. The 4B5B encoding provides DC equalization and spectrum shaping (see the standard for details). Just as in the 100BASE-FX case, the bits are then transferred to the physical medium attachment layer using NRZI encoding. However, 100BASE-TX introduces an additional, medium dependent sublayer, which employs MLT-3 as a final encoding of the data stream before transmission, resulting in a maximum "fundamental frequency" of 31.25 MHz. The procedure is borrowed from the ANSI X3.263 FDDI specifications, with minor discrepancies."

Even at 10Mbps you'd run into trouble (even with simple manchester).

So no, no way you can avoid a PHY here.

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, I could make something like the Kitty Twitty without buying an ethernet shield and just leave it next to my computer.   This would save me buying a ethernet shield.

Thanks smiley-grin
Logged

Pages: [1]   Go Up
Jump to: