Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: EthernetServer (TCP) for more than one connection? on: January 17, 2013, 07:32:12 am
PaulS, SurferTim,

perhaps it will work without persistant connections. The protocol definition doesn't specifiy something like that, right. But it also says:

Quote
The server MUST differentiate all client sessions internally

The big question is: How does the SRCP client software interprets this (like RocRail, Android SRCP client, ...). Perhaps I will try it with non-persistant connections and see what happens. If it will not work I have to think about it again (perhaps using a Raspberry with multithreaded server and connect the Arduino to the Rapsi with I2C).

The project can be found at https://sourceforge.net/projects/maerklino/. The current state is: The first version of Jan Weller is working (see http://forum.rocrail.net/viewtopic.php?t=4583 but not very comfortable. I have done some changes but hadn't test them until now. Hopefully I can do this on weekend.

Thanks, Holger

 
2  Using Arduino / Networking, Protocols, and Devices / Re: EthernetServer (TCP) for more than one connection? on: January 17, 2013, 06:55:59 am
PaulS,

thanks for the fast answer!

I have a sketch for driving Maerklin-Motorola-II model locomotives. Now I want to add support for SRCP (http://srcpd.sourceforge.net/srcp/srcp-084.pdf), so I can create a SRCP central station. For this I have to allow 1+n clients. Clients can be programs or other Arduinos which can talk SRCP. SRCP is TCP based...

Regards, Holger
3  Using Arduino / Networking, Protocols, and Devices / EthernetServer (TCP) for more than one connection? on: January 17, 2013, 06:48:46 am
Hi all,

is it possible to write a server sketch where I can accept more than one connection via TCP? I have only found many (working) example for just one connection...

Thanks, Holger
4  Using Arduino / Audio / Re: Multiple MIDI I/Os on: November 24, 2012, 02:43:54 pm
Just not tested, but if you check out the code of the Arduino MIDI library from the link mymaestro posted, I think there is already a Multi-MIDI(Serial) class in this library (also it seems there is a software MIDI implemented). If I have more time I will try this.

Regards, Holger
5  Using Arduino / Audio / Re: Multiple MIDI I/Os on: November 15, 2012, 04:03:50 am
Ahhh, great! This would be a solution on a Mega. I think I have to buy one to test ist.

Thanks, Holger
6  Using Arduino / Audio / Multiple MIDI I/Os on: November 12, 2012, 10:30:17 am
Hi all,

I hope this will be the right forum for my question:
I want to build a MIDI-Router (3 MIDI-INs / 3 MIDI-OUTs). Perhaps I can use a Mega, but are the serial ports of the Mega buffered?
Is there another solution, perhaps with other Serial-UARTs which have a SPI-Bus (does anyone know which type can handle MIDI)?
Has anyone done such thing already and can give me some hints?

Thanks, Holger
7  Using Arduino / Programming Questions / Re: Strange class problem on: November 08, 2012, 02:54:30 am
Ok, I understand what my problem was.

Thanks for your help!

Holger
8  Using Arduino / Programming Questions / [SOLVED] Re: Strange class problem on: November 07, 2012, 07:18:24 am
Hi all,

ok, I see, that my Uno is not a memory giant... and my class is not very small. But with MAX_FADE_ELEMENTS set to 10 the storage for one instance should be about 180 Bytes. I tried to use only _one_ instance and the Arduino freezes.

Nick Gammon's hint was the solution (not for everything, but now it works!): The constructor was "too big" - don't ask me why this is a problem. But when rewriting the constructor function to a DMX_RGB.begin() method it works! Also four instances are working! I took a look at http://www.arduino.cc/playground/Code/AvailableMemory and checked my free memory and there were about 300 bytes empty.

If anyone can explain why the constructor was the problem and why I should use a begin()-method for initialization I would be very glad!

Thanks for helping!

Holger
 smiley-cool
9  Using Arduino / Programming Questions / Re: Strange class problem on: November 07, 2012, 03:15:00 am
Hi all!

thanks for your hints. I wonder that one class instance would need so much memory. I will try your suggestions and write the solution to this thread as soon as possible.

Regards, Holger
10  Using Arduino / Programming Questions / Strange class problem on: November 06, 2012, 10:57:42 am
Hi all,

I have a strange problem with my selfmade class. I want to use some DMX spots over WiFi, so I created a simple sketch for a client (Arduino+WiFi) and a sketch for a server  (Arduino+Ethernet). For the server I wrote a class called DMX_RGB (see attached). I need to create some instances (globaly)in DMXNet_Server.ino:

Code:
DMX_RGB Bar1("192.168.1.40",4711,10,11,12,9,8);

When I create such an instance, the sketch stops and nothing happens anymore. Also no debug output on the serial monitor...

If I comment out everything which is relating to the instance Bar1 (and of course the code above) the sketch works (also it is not doing what I want :-( )

I think it is a simple, stupid problem - but I cannot find where. Has anyone an idea?

Thanks a lot, Holger
11  Using Arduino / Networking, Protocols, and Devices / Re: Serial library with non standard bit rates? on: August 15, 2011, 02:05:53 am
Hi all,

thanks for your responses!

@MarkT: I hoped to find a way to avoid writing the interrupt driven code :-) but it seems that I have to write such library (which will take more time for me than I thaught). My problem is that I have no scope, so I have to do trial & error for the signal generation (that's a problem with all other solutions, too).

@Bill_Kerr: Yes, that's also a possibility to avoid the software signal generation code. But I know that there is a working(!) software implementation based on UARTs (http://srcpd.sourceforge.net/srcpd/index.html). I will keep in mind to change to the hardware signal generation when everything will fail.

@skyjumper: I will use the the Arduino UNO (328P). It seems that someone has made a Port from OpenDCC to the Arduino (http://developer.berlios.de/projects/microsrcp/) which is also based on UART output (like srcpd). But I hope to get arround the tricky timings when using the "right" bit rate to communicate with.

It seems that I have to write my own signal generation code with interrupts or I have to use the hardware encoder from Motorola...

Regards, Holger
12  Using Arduino / Networking, Protocols, and Devices / Re: Serial library with non standard bit rates? on: August 12, 2011, 07:09:11 am
Hi skyjumper,

no UART :-)
I need to generate a signal for driving digital modell locomotives (not DCC but Motorola-Märklin). So my other end of the communication is a decoder chip inside the locomotive. I have a rough manual how to generate the frames with a serial line at 19200 bit/s but you have to do some strange timing things to get the right signal. I thaught that it is better to generate the signal without that strange things but for this you "might" have to send the frames with a non-standard bit rate (s. http://modell-zug.com/Support/HowToArticles/DigCtrlSys/DigitalTransmission.htm). I read some documentation where they don't use exactly 4800 bit/s... but I'm not sure.

Regards, Holger
13  Using Arduino / Networking, Protocols, and Devices / Re: Serial library with non standard bit rates? on: August 12, 2011, 01:09:46 am
Hi all,

thanks for your answers!
I think I will try to patch NewSoftSerial or use the SPI library. After testing I will post my results here.

Have a nice weekend,

Holger
14  Using Arduino / Networking, Protocols, and Devices / Serial library with non standard bit rates? on: August 11, 2011, 08:08:30 am
Hi all,

I am searching for a serial library which can use non-standard bit rates, e.g. 19304 bit/s on a digital port. In fact I just only need to send at this speed with no start and stop bits - just one byte after another. I am not new to programing but new to Arduino and microcontrollers, so I hope someone can give me a hint where I can find such a library or how to set up such functions (I think with timers an interrupts, or?)

Thanks, Holger
Pages: [1]