Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: Detecting an incoming connection on: February 06, 2013, 04:48:35 pm

That method works and does the job.  Thank you very much.  I took the opportunity to look at the EthernetServer.cpp source and the approach seems sound.

Kat, thanks for the answer also.
2  Using Arduino / Networking, Protocols, and Devices / Detecting an incoming connection on: February 05, 2013, 09:40:46 pm
Hi all,

I'm having an issue with the Arduino Ethernet library and I'm hoping I can get some pointers.

Essentially it boils down to this: I want to detect an incoming connection WITHOUT having to have the server send something followed by a carriage return.

Instead of posting my code, I'll just reference the tutorial here as it illustrates my issue:

To test, I load this code in the Arduino, then on my Mac, I type:

telnet 80

In the Arduino serial monitor, I do not see the "new client" message until I press return.

What I would like is for the Arduino to print a message to the serial monitor as soon as the telnet connects, without having to press return.

Folks, is this possible?
3  Using Arduino / Networking, Protocols, and Devices / Re: EthernetClient.connect() blocking issue on: January 31, 2013, 09:16:18 am
Thanks for the tip, SurferTim. Good stuff.  I looked and indeed there are C++ methods for setting those registers. Although I would still like the flexibility of longer timeouts, I can live with this for now. I'll delve into the source a bit more to see if there is anyway to make the connect work in an asynchronous fashion.

Thanks again for the info.
4  Using Arduino / Networking, Protocols, and Devices / EthernetClient.connect() blocking issue on: January 30, 2013, 01:25:27 pm
Hello everyone,

I have an Ethernet Shield for my Arduino Mega 2560 and am using the EthernetClient class to connect to a client.

The issue that I am experiencing is that the connect() method can block for seconds at a time, interfering with a requirement that I service a response from another computer connected to my Arduino within a very fast period of time.

What happens currently is that if a connect() call is being made, the loop() method is blocked for the time it takes to connect, and this is exacerbated if I use an IP address that is not assigned to anything. The blocking could go on for 10 or more seconds.

Is there some way to dig deeper into the EthernetClient class to allow for some sort of callback that would be called on either success or failure of a connect, allowing my loop() function to not block?

5  Development / Other Hardware Development / Re: Arduino 1.0.1 causes Mac OS X to crash regularly. Ideas? on: January 29, 2013, 08:11:10 am
Forget Arduino 1.0.1.  This kernel panic is happening to me with my 24" iMac running 10.8.2 and Arduino 1.0.3. I even upgraded to the latest 10.8.3 beta (I'm a registered developer) and am still getting the panic. Here are the details:

In the Arduino Editor, all that I have to do is click the checkmark button to compile the code in the window. *IF* there are no compile errors, then about 1 out of every 8 times when I click this, the mouse stops moving, and 1 second later the screen goes black and I get the grey panic screen.

This is so frustrating. It makes development a crapshoot because I don't know when the panic will occur. It appears more likely to occur if I do a number of successive compiles in short order (after fixing bugs or adding small features), but it could also happen if I wait minutes or hours to do a compile.

Here is my panic report. Granted, the stack has little information to go on.

Interval Since Last Panic Report:  142025 sec
Panics Since Last Report:          1
Anonymous UUID:                    C9D979AD-BC62-8A09-D830-6AE020D91210

Tue Jan 29 06:53:45 2013
panic(cpu 1 caller 0xffffff80080b7e95): Kernel trap at 0xffffff80083665c3, type 14=page fault, registers:
CR0: 0x000000008001003b, CR2: 0x0000000000000154, CR3: 0x00000000527dc000, CR4: 0x0000000000000660
RAX: 0x0000000000000000, RBX: 0xffffff8019da2660, RCX: 0xffffff80b91150b8, RDX: 0xffffff8017a67070
RSP: 0xffffff8012ccbd90, RBP: 0xffffff8012ccbe50, RSI: 0x000000000000001f, RDI: 0xffffff8019ddb550
R8:  0x000000000000003c, R9:  0x00000000000003ff, R10: 0xffffffffffffffff, R11: 0x00000000ffffffff
R12: 0x0000000000000000, R13: 0x0000000000000004, R14: 0xffffff8017a67020, R15: 0x0000000000080000
RFL: 0x0000000000010246, RIP: 0xffffff80083665c3, CS:  0x0000000000000008, SS:  0x0000000000000010
Fault CR2: 0x0000000000000154, Error code: 0x0000000000000000, Fault CPU: 0x1

Backtrace (CPU 1), Frame : Return Address
0xffffff8012ccba30 : 0xffffff800801d626
0xffffff8012ccbaa0 : 0xffffff80080b7e95
0xffffff8012ccbc70 : 0xffffff80080cd4dd
0xffffff8012ccbc90 : 0xffffff80083665c3
0xffffff8012ccbe50 : 0xffffff8008356082
0xffffff8012ccbec0 : 0xffffff8008039ce9
0xffffff8012ccbef0 : 0xffffff800803c7e8
0xffffff8012ccbf20 : 0xffffff800803c65e
0xffffff8012ccbf50 : 0xffffff800801b70d
0xffffff8012ccbf90 : 0xffffff80080b84a3
0xffffff8012ccbfb0 : 0xffffff80080cd4ac

BSD process name corresponding to current thread: Unknown

Mac OS version:

Kernel version:
Darwin Kernel Version 12.3.0: Sun Jan  6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64
Kernel UUID: 3EB7D8A7-C2D3-32EC-80F4-AB37D61492C6
Kernel slide:     0x0000000007e00000
Kernel text base: 0xffffff8008000000
System model name: iMac7,1 (Mac-F42386C8)

System uptime in nanoseconds: 146999748730101
last loaded kext at 143699045128632: 2.9.0f6 (addr 0xffffff7f8a254000, size 262144)
last unloaded kext at 144811937227386: com.silabs.driver.CP210xVCPDriver64 3.1.0d1 (addr 0xffffff7f8a20d000, size 28672)
loaded kexts:
com.vmware.kext.vmioplug.10.1.24 10.1.24
com.vmware.kext.vmx86 0090.04.91
com.vmware.kext.vmnet 0090.04.91
com.vmware.kext.vsockets 90.4.22
com.vmware.kext.vmci 90.4.18
com.FTDI.driver.FTDIUSBSerialDriver 2.2.18
tc.tctechnologies.driver.AlesisFirewire 3.5.6 11675 1.8 75.19 3.0 1.60 4.1.3f3 1.9.5d0 2.3.7fc4 4.1.23 4.1.3f3 1.0.0 1.6.0 170.2.5 4.1.23 3.5.10 1.1.11 8.1.0 8.1.0 1.0.0d1 4.1.3f3 7.0.0 3.3.0 3.1.7 320.15 3.5.5 1.0.0d1 1.0.0d1 34 404 2.3.1 1.5 5.5.5 3.2.3b1 600.36.17 4.9.6 2.5.1 2.5.1 5.5.0 5.2.5 1.7 1.8 1.7 1.9 1.7 1.6 196.0.0 4.0.39 2 196.0.0 4.1.3f3 235.29 1.0 2.3.7fc4 2.2.5 4.1.3f3 4.1.23 2.3.7fc4 2.3.7fc4 1.0.0 5.3.0d51 1.0.4 1.0.11d0 8.1.0 8.1.0 86.0.4 10.0.6 4.1.3f3 3.1.4d2 1.8.9fc11 1.6 3.3.0 2.3.7 2.3.7 170.2 170.2 3.5.5 3.5.1 5.2.5 5.5.5 5.2.5 3.5.5 1.7 1.7.1 1.7.1 3.5.0 3.5.5 5.5.5 522.4 3.0 4.5.5 2.3.1 2.5.1 5.5.5 1.7 1.8.1 1.1 220.2 1.0.0d1 7 345 1.8 28.21 1.7 2.7.3 1.4 1.0

Moderator edit: [code] [/code] tags added.
Pages: [1]