R/C Tech Forums

R/C Tech Forums (https://www.rctech.net/forum/)
-   Radio and Electronics (https://www.rctech.net/forum/radio-electronics-137/)
-   -   Transponder Hack (https://www.rctech.net/forum/radio-electronics/1119211-transponder-hack.html)

LowDrag 12-21-2023 05:38 PM

Transponder Hack
 
Mylaps transponders and lexan bodies are probably the biggest price gouging rip offs in the RC industry… has anyone reverse engineered the current mylaps transponders to offer a reasonably priced alternative? I’m thinking of digging into this. Any fellow EE’s or SE’s can message me to collaborate.

revo_race 12-21-2023 06:01 PM

It’s a very simple RF transmitter. Unfortunately, I’m not a EE so I wouldn’t know what I’m looking at. I have a feeling it’s not the physical hardware that is the difficult part of replicating, though.

LowDrag 12-21-2023 06:40 PM


Originally Posted by revo_race (Post 16060189)
It’s a very simple RF transmitter. Unfortunately, I’m not a EE so I wouldn’t know what I’m looking at. I have a feeling it’s not the physical hardware that is the difficult part of replicating, though.

In the few minutes I’ve spent researching this, it appears a couple of guys on here have already done this. We need an updated hack for the current version mylaps.

gigaplex 12-21-2023 06:42 PM


Originally Posted by LowDrag (Post 16060181)
Mylaps transponders and lexan bodies are probably the biggest price gouging rip offs in the RC industry… has anyone reverse engineered the current mylaps transponders to offer a reasonably priced alternative? I’m thinking of digging into this. Any fellow EE’s or SE’s can message me to collaborate.

MRT, but MyLaps actively tries to block their usage. If the MyLaps decoder firmware is up to date, it'll reject an MRT transponder.

LowDrag 12-21-2023 07:37 PM


Originally Posted by gigaplex (Post 16060199)
MRT, but MyLaps actively tries to block their usage. If the MyLaps decoder firmware is up to date, it'll reject an MRT transponder.

We use the Orange Lap Rc transponders at our track and they’re only $25 a pop. Which seems realistic given what they are and how many you could get made on a panel. Mylaps just pots the same thing in a 2cent plastic case and marks it up $100. Given how much we want more people to enter the hobby, shouldn’t the RC community be pushing for the Orange Lap version instead?

DirkW 12-22-2023 03:40 AM

Sure, who would not like lower prices for everything in this hobby? But Mylaps has after all designed and developed the whole timing system, not just the transponder. Plus I don't think it's a very high volume business, and after all they need to keep their workers and developers paid. For others then to go and say "oh thanks guys for creating all that. Now we will just steal your design for the easy part and take away your profits from your design and invention" is kinda shady. It's what people criticize about China all the time...

Even more funny, considering what racers are ready and willing to pay for servos, ESCs or especially tires, but a transponder (that will usually last for years, if not decades and can be easily swapped between cars) is waaaay toooo expensive? Remember, you only really need one to race (any more than that is just convenience, if you have more than one car.) I do own several - for my convenience - and yes, they were quite expensive, but it was my own choice after the first one, so I cannot really blame anyone but myself.

revo_race 12-22-2023 03:49 AM

But they don’t last decades. Many of them “go bad” before too long without any sort of warning. In the middle of your race the announcer will let you know you’re skipping laps, and by the next heat it doesn’t pick up laps at all. I hear it all the time at races, maybe not every race weekend, but it’s quite common to hear people having transponder issues. It might not be a faulty transponder every time but my point is you shouldn’t assume they last a decade.

DirkW 12-22-2023 04:12 AM

My first one has reached a decade now - still runs perfect. Haven't had a defect on any of mine yet, either. But my servos, ESCs and motors also seem to work much longer than some of the doom-sayers here on RCtech claim possible ("you have to change ESC every x months!"). Still. let's say it'll run only... 5? or only 3? years. You still only ever really need a single one that you can use in any car and swapping takes only a few seconds. How much money do you spend on other electronics or tires in the same time period?

gigaplex 12-22-2023 04:32 AM


Originally Posted by revo_race (Post 16060272)
But they don’t last decades. Many of them “go bad” before too long without any sort of warning. In the middle of your race the announcer will let you know you’re skipping laps, and by the next heat it doesn’t pick up laps at all. I hear it all the time at races, maybe not every race weekend, but it’s quite common to hear people having transponder issues. It might not be a faulty transponder every time but my point is you shouldn’t assume they last a decade.

The only ones I've had go bad were fixed by replacing the plug. It's almost never the transponder itself, it's either the plug or the lead.

As someone who ran race control myself, most of the time when people were having transponder issues it was almost always because they were mounting them sideways (MyLaps says they must my mounted flat) and on top of the receiver antenna (MyLaps says keep away from antennas). Moving the mounting location generally solved the issue. The only other noteworthy cause for missed transponder laps was the decoder loop itself being damaged. We race outdoors and the elements can get to it despite being buried in the track.

BuggyFan21 12-22-2023 05:14 AM

MRT transponders are a decent alternative to MyLaps - but they only work on decoders that still support RC3 and haven't had the firmware update to make them RC4 only.

MRT are allegedly working on their own decoder (according to a Facebook comment I saw - not the most reliable source I know!)

Nuno 12-22-2023 05:34 AM

https://www.rctech.net/forum/radio-e...o-revised.html

LowDrag 12-22-2023 07:31 AM


Originally Posted by DirkW (Post 16060271)
Sure, who would not like lower prices for everything in this hobby? But Mylaps has after all designed and developed the whole timing system, not just the transponder. Plus I don't think it's a very high volume business, and after all they need to keep their workers and developers paid. For others then to go and say "oh thanks guys for creating all that. Now we will just steal your design for the easy part and take away your profits from your design and invention" is kinda shady. It's what people criticize about China all the time...

Even more funny, considering what racers are ready and willing to pay for servos, ESCs or especially tires, but a transponder (that will usually last for years, if not decades and can be easily swapped between cars) is waaaay toooo expensive? Remember, you only really need one to race (any more than that is just convenience, if you have more than one car.) I do own several - for my convenience - and yes, they were quite expensive, but it was my own choice after the first one, so I cannot really blame anyone but myself.

Bless your heart. There’s a reason why a few guys on here have designed there own “Orange Laps RC”. Transponder technology is not that fancy in the engineering world. Competition is a good thing. I’m curious why you’re so supportive of Mylaps? Do you work for them or have a vested interest?

Sabin 12-22-2023 07:58 AM

Funny thing about MyLaps - they didn't bring anything original to the table. An RF tranponder is about 70 years old, and miniaturized versions are decades old. There are open-source programs out there that do timing and their receiver box/pc interface isn't exactly new or unique. It's a radio receiver that has a loop antenna (You AM/Shortwave/HAM guys might know this) that transmits information packets to the PC by a serial protocol over either USB, a serial port, or a 10BaseT connection. Hardly anything groundbreaking and certainly not worth the extravagant cost.

LowDrag 12-22-2023 08:23 AM


Originally Posted by Sabin (Post 16060315)
Funny thing about MyLaps - they didn't bring anything original to the table. An RF tranponder is about 70 years old, and miniaturized versions are decades old. There are open-source programs out there that do timing and their receiver box/pc interface isn't exactly new or unique. It's a radio receiver that has a loop antenna (You AM/Shortwave/HAM guys might know this) that transmits information packets to the PC by a serial protocol over either USB, a serial port, or a 10BaseT connection. Hardly anything groundbreaking and certainly not worth the extravagant cost.

Amen!

bmwjoon 12-22-2023 09:01 AM

We use Mylaps in almost all forms of motorsports. Race car guys still hoard old non-subscription transponders, because they still work. Just be glad AMB hasn't started doing that with RC transponders. There is an aftermarket for old non-sub AMBs and a racecar wired version fetches $500-850 now. I bought 2 around 2000 for $250 bucks.

Most RC racers are actively using up to a half dozen transponders at a time. Racer's investing $100-600 in equipment that last many years is probably marketed correctly.

I've worked on many open source projects (drone projects) and they rarely cost justify. Yes in the end maybe a few dozen guys will benefit without investing any time, but the few guys that did all the work rarely will reap any benefit.

glennhl 12-22-2023 09:43 AM


Originally Posted by LowDrag (Post 16060306)
Bless your heart. There’s a reason why a few guys on here have designed there own “Orange Laps RC”. Transponder technology is not that fancy in the engineering world. Competition is a good thing. I’m curious why you’re so supportive of Mylaps? Do you work for them or have a vested interest?

I can't speak for Dirk, however, I support them because they support our hobby. They provide a reliable and extremely state of the art timing system. And $110 for a transponder is not a big deal. I have bought 4 of them over the last 10 years and have yet to have a failure. And by the way, they have a great resale value. You can get 80% of the cost back when you sell them and they are very easy to sell.

DirkW 12-22-2023 10:29 AM


Originally Posted by LowDrag (Post 16060306)
Bless your heart. There’s a reason why a few guys on here have designed there own “Orange Laps RC”. Transponder technology is not that fancy in the engineering world. Competition is a good thing. I’m curious why you’re so supportive of Mylaps? Do you work for them or have a vested interest?

Sorry, no conspiracy to be found here :lol:. I have zero connections with them, I'm not even a very happy customer. But I can look beyond just my own horizons and think about more than just "me, me, me!" Mylaps are a company and for them (like any other company) this is a business, not a hobby - and they are in it to make money (they have employees that need to eat, pay rent, feed their families, etc.). That's how our western capitalist system works - for good and for bad. It's not exactly their fault that they don't have competition on the market, is it? Plus, I'm not a hypocrite, so when it pisses me off (and it does!) when e.g. Chinese companies produce cheap (and mostly crappy) blatant copies of what western companies have invented and designed, regardless of copyrights and patents, I cannot turn around and say "Oh but it's different with Mylaps - there I support such a thing, because it makes my otherwise very expensive hobby slightly cheaper!" Sorry, no can do. Do I wish their products were cheaper? Of course! But I cannot dictate it to them.

And again, even at current prices, these transponders are IMHO only a rather minor cost compared to the rest of the equipment you need to race (and to keep racing!) that I don't see what the big problem is. Please think honestly about what you are ready and willing to pay for other electronics, the stock class motor of the month, all the tires, the bodies (depending on class)... and how much of these perish so quickly or can only be used in one class or one type of vehicle, while the single transponder you actually need is universal and will usually outlive them all. Yes, we all wish this hobby was cheaper, but that goes for every single component and all companies, not just Mylaps and their transponders!

Yes, of course competition is a good thing. So let other companies do their own complete products (without patent or copyright infringement) and then it'll be a fair competition. Because when the tech is apparently so simple, old and proven, how come no other company has ever done a serious effort to produce such a (complete!) system of their own (i.e. incl. a decoder!) in all these years? Should be a gold mine, right? With all those unhappy people that want to spend less money... There should be enough engineers out there that could do it, too - it's only tech, not magic. But for some reason, all that has happened so far, was to rip off the cheap and simple part, the transponders. Apparently it's much harder to build a decoder, right? Or is it too expensive to do? For whatever reason, to my knowledge nobody else has successfully built and properly marketed a complete working decoder / timing system so far. If MRT really is finally working on a decoder as well, that's great news! And it's about time someone does, after all these years, no, decades - it's almost 2024 now. Problem is, it might be too late by now. Almost all current race tracks have a very expensive Mylaps system and are not likely to buy a new one, unless they'd need to replace a defective unit, or the new system was much better (no idea what improvement that might be - after all, the Mylaps system does a good job) - but would a better system be necessarily cheaper?


NZDave 12-22-2023 12:52 PM

I raced, both RC and full size before we had transponders. The present system is great compared to what we used to have. Where I race RC the club has some transponders that racers can borrow for the night so people can race without owning a transponder. With my full size racing I don't own a transponder (I only do one or two meetings a year) but I can hire one at the circuits I race at.
If we had a competitor to AMB they would be using a different system and this would make it more expensive as you would have to have different transponders depending on which system the track was using. The transponders look expensive but they are probably the cheapest part of RC car racing. You can use them in several cars and they are very reliable as mentioned above. I have been back racing RC for 6 years and the only transponder problem I have had is when wire managed to get itself tangled in the spur gear. Cant blame the transponder for that.

gigaplex 12-22-2023 01:15 PM


Originally Posted by bmwjoon (Post 16060332)
We use Mylaps in almost all forms of motorsports. Race car guys still hoard old non-subscription transponders, because they still work. Just be glad AMB hasn't started doing that with RC transponders. There is an aftermarket for old non-sub AMBs and a racecar wired version fetches $500-850 now. I bought 2 around 2000 for $250 bucks.

Most RC racers are actively using up to a half dozen transponders at a time. Racer's investing $100-600 in equipment that last many years is probably marketed correctly.

I've worked on many open source projects (drone projects) and they rarely cost justify. Yes in the end maybe a few dozen guys will benefit without investing any time, but the few guys that did all the work rarely will reap any benefit.

MyLaps is AMB. The older AMB battery powered transponders don't work anymore if you update the decoder firmware to the latest.

gigaplex 12-22-2023 01:28 PM


Originally Posted by DirkW (Post 16060355)
And again, even at current prices, these transponders are IMHO only a rather minor cost compared to the rest of the equipment you need to race (and to keep racing!)

Agreed, a transponder will easily outlast 3 sets of tyres.


Originally Posted by DirkW (Post 16060355)
But for some reason, all that has happened so far, was to rip off the cheap and simple part, the transponders. Apparently it's much harder to build a decoder, right? Or is it too expensive to do? For whatever reason, to my knowledge nobody else has successfully built and properly marketed a complete working decoder / timing system so far.

I've seen others come and go but there's several issues that always crop up. First, if they're a legal entity then they're open to lawsuits for patent infringement if their decoder supports RC4, so invariably they're not compatible. That then leads to the majority of racers not attending tracks that use the alternate systems because their existing transponders don't work there. And many of the alternatives use IR line of sight instead of an RF loop which is far more sensitive to mounting location.

If it's a dodgy knock off that does maintain compatibility and flies under the lawsuit radar, there's an issue with target audience. Membership numbers are vastly different all over the place but let's assume an average club has 100 members and 1 decoder. The decoder audience is approximately 2 orders of magnitude smaller. Not as much money to be made. Plus that company probably won't support the product with warranties and firmware updates. A functional decoder is the lifeblood of a track, so they're far less willing to risk it to save a few bucks.

bmwjoon 12-22-2023 01:47 PM


Originally Posted by gigaplex (Post 16060389)
MyLaps is AMB. The older AMB battery powered transponders don't work anymore if you update the decoder firmware to the latest.

I'm using AMB and Mylaps interchangeably.

For people not familiar we use AMB/Mylaps transponders in full sized race cars. Newer transponders require a subscription to work. That means you have to have an account on Mylaps and pay a yearly for your transponder to work. Older transponders didn't require you to even have a Mylaps login.

Sorry if that was confusing.

DirkW 12-22-2023 01:47 PM

gigaplex But what some people obviously dream about is a company that will sell a system of roughly the same quality, where transponders only cost around $20-$25 instead of around a hundred and probably a decoder for a couple hundred instead of several thousand dollars. And I believe such a system would easily sell, even when not directly compatible with RC4, as the cost would be very little for new tracks and/or racers, and also no hindrance for existing racers - what is $25 more to spend in this money-pit of a hobby? Even established tracks might be interested at that price (if the system managed to become popular) and it might be possible to run in parallel with the Mylaps decoder on the same time keeping software (so transponders and decoders stay independent from each other, and only come together on the computer). The question is, would such low prices really work for a company to develop, produce and long-time support such products? Even in large numbers if it proves successful? I kinda doubt it. But it is what Mylaps has successfully done for a very long time, with their prices.

gigaplex 12-22-2023 02:03 PM


Originally Posted by DirkW (Post 16060399)
gigaplex But what some people obviously dream about is a company that will sell a system of roughly the same quality, where transponders only cost around $20-$25 instead of around a hundred and probably a decoder for a couple hundred instead of several thousand dollars. And I believe such a system would easily sell, even when not directly compatible with RC4, as the cost would be very little for new tracks and/or racers, and also no hindrance for existing racers - what is $25 more to spend in this money-pit of a hobby? Even established tracks might be interested at that price (if the system managed to become popular) and it might be possible to run in parallel with the Mylaps decoder on the same time keeping software (so transponders and decoders stay independent from each other, and only come together on the computer). The question is, would such low prices really work for a company to develop, produce and long-time support such products? Even in large numbers if it proves successful? I kinda doubt it. But it is what Mylaps has successfully done for a very long time, with their prices.

In the current market at those prices, such a company wouldn't be profitable if it only catered to RC. Even if we assumed every track on the planet would ditch their existing decoders and bought the competing system.

DirkW 12-22-2023 02:26 PM


Originally Posted by gigaplex (Post 16060405)
In the current market at those prices, such a company wouldn't be profitable if it only catered to RC. Even if we assumed every track on the planet would ditch their existing decoders and bought the competing system.

Obviously the exact numbers were drawn out of thin air, but they were supposed to drive home a point (not to you but others).

fat500 12-22-2023 03:06 PM


Originally Posted by DirkW (Post 16060271)
Sure, who would not like lower prices for everything in this hobby? But Mylaps has after all designed and developed the whole timing system, not just the transponder. Plus I don't think it's a very high volume business, and after all they need to keep their workers and developers paid. For others then to go and say "oh thanks guys for creating all that. Now we will just steal your design for the easy part and take away your profits from your design and invention" is kinda shady. It's what people criticize about China all the time...

Even more funny, considering what racers are ready and willing to pay for servos, ESCs or especially tires, but a transponder (that will usually last for years, if not decades and can be easily swapped between cars) is waaaay toooo expensive? Remember, you only really need one to race (any more than that is just convenience, if you have more than one car.) I do own several - for my convenience - and yes, they were quite expensive, but it was my own choice after the first one, so I cannot really blame anyone but myself.

AGREE 100 percent
100 for a servo or 250 for a speedo that gets changed often compared to a transponder that has a 10 year life or more....common guys think before you type...value for the dollar....oh what about the 150 per motor you change like your socks....AAAAnnndddd you CAN always sell your transponder for 80 after using it for 5 years or more.....Think about it........

LowDrag 12-22-2023 03:39 PM


Originally Posted by fat500 (Post 16060414)
AGREE 100 percent
100 for a servo or 250 for a speedo that gets changed often compared to a transponder that has a 10 year life or more....common guys think before you type...value for the dollar....oh what about the 150 per motor you change like your socks....AAAAnnndddd you CAN always sell your transponder for 80 after using it for 5 years or more.....Think about it........

Thanks for everyone’s feedback. This has been a very interesting market research exercise. I’m happy to see a part of the RC community opposes lower cost alternatives to certain products. Many of the small RC companies out there thank you. Including me.

rhodopsine 12-22-2023 04:19 PM


Originally Posted by LowDrag (Post 16060421)
Thanks for everyone’s feedback. This has been a very interesting market research exercise. I’m happy to see a part of the RC community opposes lower cost alternatives to certain products. Many of the small RC companies out there thank you. Including me.

It's not so much the lower cost alternative as the "universal" standard. AMB/MyLaps has become the standard in the RC world. In the greater scope of things, while transponders are expensive for what they really are, the cost of them is fairly low considering how long they last. I have some 18 yo transponders that still work as new. For a competing system to emerge, there would need to be an industry standard for communications. Then, competing companies would be able to enter the market. That will never happen, our community is way too small. There is no point in having a different brand of transponder if it only works in a few places... They (MyLaps) are in a monopolistic position, for sure, but I definitely wouldn't go back to the time of house transponders, or worse, hand counting!

Martin Paradis

bd007 12-22-2023 04:27 PM

There are cheaper solutions out there. I-Lap is one, and their transponder cost about $25. Is it as good as RC4? You have to put the I-Lap transponder high and closer to the clear windshield area in order to get read.

RC racing by no mean is a low cost hobby. To bash around will be a lot cheaper, and you don't need a transponder.

As I always tell the new comers to get on rctech to buy an used RC4 for $75-$85. It's basically a free rental. That thing doesn't break. Just sell it when you are done or out of the hobby. Help yourself by buying one for each class you race. Moving transponder from one car to another is pain in the bud. Again, it's free rental!!!!

PROMODVETTE 12-22-2023 04:56 PM

Does the I-lap or Orange work for a track with the loop under the track?

gigaplex 12-22-2023 07:26 PM


Originally Posted by PROMODVETTE (Post 16060441)
Does the I-lap or Orange work for a track with the loop under the track?

I-Lap definitely not, it uses infra red line of sight.

Dan the Man 12-23-2023 12:46 PM

https://cimg0.ibsrv.net/gimg/www.rct...eee1491a26.jpg

You could always go buy ten of these, a bit of plywood, coloured electrical tape, some cones with numbers on them, a stop watch and clipboard, and do it 80's style?

syndr0me 12-23-2023 01:55 PM

Nobody that’s written a parser for AMB’s P3 protocol would ever describe them as innovative.

Lonestar 12-24-2023 03:03 AM

Mylaps and Bervoets (yep, the dutch guy who created Serpent with Ron Ton, the Ber in Berton...) deserve their success. Their lapcounting system was breakthrough. I have 4 AMB including one from the very first generation, and once you figure out how to change the leads especially on the transponder side, they last forever

I will admit I also have 2 mrt clones - the reason I bought them is because of absence of retro compatibility of the originals early transponders with the new loops. The newer loops don't see the old transponders... And that p!ssed me off. If I can't trust the original brand, then why would I bother... And the clubs are a set or making it a point to not upgrade the firmware....


​​​​​​I'm grateful to AMB/mylaps, still I think they started acting a bit too greedy at some point.

In a non-niche RC world, anti-trust authorities would step in btw.


mrreet2001 12-24-2023 10:55 AM


Originally Posted by LowDrag (Post 16060214)
We use the Orange Lap Rc transponders at our track and they’re only $25 a pop. Which seems realistic given what they are and how many you could get made on a panel. Mylaps just pots the same thing in a 2cent plastic case and marks it up $100. Given how much we want more people to enter the hobby, shouldn’t the RC community be pushing for the Orange Lap version instead?

This is very much not the case. The Orange Lap system is a cheap IR system vs Mylaps which is a radio transponder system.

bmwjoon 12-26-2023 08:10 AM


Originally Posted by Lonestar (Post 16060676)
Mylaps and Bervoets (yep, the dutch guy who created Serpent with Ron Ton, the Ber in Berton...) deserve their success. Their lapcounting system was breakthrough. I have 4 AMB including one from the very first generation, and once you figure out how to change the leads especially on the transponder side, they last forever

I will admit I also have 2 mrt clones - the reason I bought them is because of absence of retro compatibility of the originals early transponders with the new loops. The newer loops don't see the old transponders... And that p!ssed me off. If I can't trust the original brand, then why would I bother... And the clubs are a set or making it a point to not upgrade the firmware....


​​​​​​I'm grateful to AMB/mylaps, still I think they started acting a bit too greedy at some point.

In a non-niche RC world, anti-trust authorities would step in btw.

Mylaps literally is used to time everything now. 40 years ago we used to manually time and score real race cars. It took teams of people with clip boards and stop watches. Now 1 person can time and score an entire event. All tech from grass roots RC car racing.

We mentioned price a lot but because the system foundation was the hobby industry the systems they offered to the motorsports industry were actually competitively priced. You had $200 transponders and $10K systems for tracks.

metalcrafter 12-26-2023 11:44 AM

Yes, Mylaps is a total rip-off at $110-130 ea. Entry level into this sport is $170for a Euro truck , And to race the newbie has
to shell out another $120 for a chip that goes "beep"

I-laps transponders are $25 ea.
Timing gate & USB interface is another $300 total .
Livetime software is $40-mo subscription to the track/club
We used the system for a year with no issues.

Metalsoft 12-26-2023 11:53 AM

Here you go. Now you can make your own and it should even work with RC4.

def calculate_checksum(data):
checksum = 0
for byte in data:
checksum = (checksum + byte) & 0xFFFFFFFF # Ensure 32-bit overflow
return checksum

# Example data from your message (excluding the 8e and 8f markers)
data = [
0x02, 0x33, 0x00, 0xcf, 0x02, 0x00, 0x00, 0x01,
0x00, 0x01, 0x04, 0xb2, 0x9b, 0x01, 0x00, 0x03,
0x04, 0x27, 0xfc, 0x70, 0x00, 0x04, 0x08, 0xe8,
0x19, 0xe6, 0xbd, 0x8a, 0x75, 0x04, 0x00, 0x05,
0x02, 0x33, 0x00, 0x06, 0x02, 0x10, 0x00, 0x08,
0x02, 0x00, 0x00, 0x81, 0x04, 0xfc, 0x05, 0x04,
0x00, 0x8f
]

# Calculate checksum
checksum_value = calculate_checksum(data)
print(f"Checksum: {checksum_value:X}")

Metalsoft 12-26-2023 11:58 AM

Listener code for the AMBdecoder.
Code:

using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;

namespace AMBListener
{
        class AMBListener
        {
                public static void Connect(String server, Int32 port, String message)
                {
                        Console.WriteLine("nStarting AMBListener...");
                        while (true)
                        {
                                try
                                {
                                        // Create a TcpClient.
                                        // Note, for this client to work you need to have a TcpServer
                                        // connected to the same address as specified by the server, port
                                        // combination.
                                        TcpClient client = new TcpClient(server, port);

                                        // Translate the passed message into ASCII and store it as a Byte array.
                                        Byte[] data = System.Text.Encoding.ASCII.GetBytes(message);

                                        // Get a client stream for reading and writing.
                                        //  Stream stream = client.GetStream();

                                        NetworkStream stream = client.GetStream();
                                        stream.ReadTimeout = 10000;
                                        stream.WriteTimeout = 10000;


                                        // Send the message to the connected TcpServer.
                                        stream.Write(data, 0, data.Length);

                                        // Receive the TcpServer.response.
                                        while (client.Connected)
                                        {
                                                // Buffer to store the response bytes.
                                                data = new Byte[256];

                                                // String to store the response ASCII representation.
                                                String responseData = String.Empty;

                                                // Read the first batch of the TcpServer response bytes.
                                                Int32 bytes = stream.Read(data, 0, data.Length);
                                                responseData = System.Text.Encoding.ASCII.GetString(data, 0, bytes);

                                                // Write hexdump to console for debugging.....
                                                string str = "";
                                                for (int index = 0; index < bytes; index++)
                                                {
                                                        str += String.Format("{0:x2} ", data[index]);
                                                }
                                                Console.WriteLine(str);
                                        }

                                        // Close everything.
                                        client.Close();
                                }
                                catch (ArgumentNullException e)
                                {
                                        Console.WriteLine(String.Format("ArgumentNullException: {0}", e));
                                }
                                catch (SocketException e)
                                {
                                        // This Exception has to be active but content commented out, otherwise it will be many, many errormessages.....
                                        Console.WriteLine(String.Format("SocketException: {0}", e));
                                }
                                catch (IOException e)
                                {
                                        // This Exception has to be active but content commented out, otherwise it will be many, many errormessages.....
                                        Console.WriteLine(String.Format("IOException: {0}", e));
                                }
                                catch (Exception e)
                                {
                                        Console.WriteLine(String.Format("Exception: {0}", e));
                                }

                                //Console.WriteLine(String.Format("n Restarting AMBListener..."));
                                //Console.WriteLine(String.Format("n Press Enter to continue..."));
                                //Console.Read();
                        }
                }

        }
}

Code:
Code:

////////////////////////////////////////////////////////////////////
// File: Program.cs
////////////////////////////////////////////////////////////////////
// When this sample Windows Console Application code in C# is run
// the AMBListener will start a Console Windows
// and start displaying continues messages from AMB Decoder
////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AMBListener
{
        class Program
        {
                static void Main(string[] args)
                {
                        // You will probably need to adjust IPAddress and portnumber for this to work
                        string IPAddressToDecoder = "192.168.0.1";
                        int IPPortForListeingToDecoder = 5403;
                        string MessageToDecoder = "This is a a Hello message sent to AMB Decoder!";
                        AMBListener.Connect(IPAddressToDecoder, IPPortForListeingToDecoder, MessageToDecoder);
                }
        }
}


gigaplex 12-26-2023 01:51 PM

For those that don't know how to read code, the first snippet calculates the most rudimentary of checksums. The second sends a string to an IP address and prints the response to a debug console and then disconnects without doing anything. The third calls the second snippet with a basic "hello world" string sending it to a typical default router address.

None of the above will be sufficient to implement a transponder and decoder system.

Metalsoft 12-26-2023 02:04 PM


Originally Posted by gigaplex (Post 16061153)
For those that don't know how to read code, the first snippet calculates the most rudimentary of checksums. The second sends a string to an IP address and prints the response to a debug console and then disconnects without doing anything. The third calls the second snippet with a basic "hello world" string sending it to a typical default router address.

None of the above will be sufficient to implement a transponder and decoder system.

It's not there for implementation, it is there as a starting point.


All times are GMT -7. It is currently 03:38 AM.

Powered By: vBulletin v3.9.3.9 Patch Level 3
Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.