![]() |
Forum Index : Microcontroller and PC projects : MM on the Internet...
Author | Message | ||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Hi folks. ![]() Can someone here recommend a network module for connecting to the MM? I know that some of you already use a WiFi module, so interested in a link to that, but also interested in any hard-wired(RJ45 socket) modules that anyone has played with. My WizNet107SR modules won't talk to me anymore, and I have been reading lots and lots of people have issues with them self-resetting to factory default. But they are useless to me, if I can't talk to them to configure them anyway. Smoke makes things work. When the smoke gets out, it stops! |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
A Raspberry Pi running ser2net lets you hang as many 'mites as you like of it. VK7JH MMedit |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Tell me more. Can you run ser2net on a Pi Zero? (mainly to take advantage of it's built-in WiFi) I have several spare redundant Pi's, including a Pi A which would probably be idea for this kind of thing. What Linux are you running on your one? Smoke makes things work. When the smoke gets out, it stops! |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
I use Pi2 and Pi3's because they have 4 USB ports as well as ethernet. The Pi3 has WiFi but I haven't use that yet. Pi zero should be OK. Any Linux version should be OK. I use Raspbian. Once you have that running, you install ser2net using apt-get. There are more recent versions of ser2net available but apt-get is the easiest way to start. You then modify ser2net.conf to suit and that's it. THis is the conf file from the Pi with the test mite running on it # # This is the configuration file for ser2net. It has the following format: # <TCP port>:<state>:<timeout>:<device>:<options> # TCP port # Name or number of the TCP/IP port to accept con- # nections from for this device. A port number may # be of the form [host,]port, such as 127.0.0.1,2000 # or localhost,2000. If this is specified, it will # only bind to the IP address specified. Otherwise # it will bind to all the ports on the machine. # # state Either raw or rawlp or telnet or off. off disables # the port from accepting connections. It can be # turned on later from the control port. raw enables # the port and transfers all data as-is between the # port and the long. rawlp enables the port and # transfers all input data to device, device is open # without any termios setting. It allow to use # /dev/lpX devices and printers connected to them. # telnet enables the port and runs the telnet proto- # col on the port to set up telnet parameters. This # is most useful for using telnet. # # timeout # The time (in seconds) before the port will be dis- # connected if there is no activity on it. A zero # value disables this funciton. # # device The name of the device to connect to. This # must be in the form of /dev/<device>. # # options # Sets operational parameters for the serial port. # Options 300, 1200, 2400, 4800, 9600, 19200, 38400, # 57600, 115200 set the various baud rates. EVEN, # ODD, NONE set the parity. 1STOPBIT, 2STOPBITS set # the number of stop bits. 7DATABITS, 8DATABITS set # the number of data bits. [-]XONXOFF turns on (- # off) XON/XOFF support. [-]RTSCTS turns on (- off) # hardware flow control, [-]LOCAL turns off (- on) # monitoring of the modem lines, and # [-]HANGUP_WHEN_DONE turns on (- off) lowering the # modem control lines when the connextion is done. # NOBREAK disables automatic setting of the break # setting of the serial port. # The "remctl" option allow remote control (ala RFC # 2217) of serial-port configuration. A banner name # may also be specified, that banner will be printed # for the line. If no banner is given, then no # banner is printed. # # or... # BANNER:<banner name>:banner # This will create a banner, if the banner name is given in the # options of a line, that banner will be printed. This takes the # standard "C" \x characters (\r is carraige return, \n is newline, # etc.). It also accepts \d, which prints the device name, \p, # which prints the TCP port number, and \s which prints the serial # parameters (eg 9600N81). Banners can span lines if the last # character on a line is '\'. Note that you *must* use \r\n to # start a new line. # # Note that the same device can be listed multiple times under different # ports, this allows the same serial port to have both telnet and raw # protocols. # The original config file shipped with the upstream sources can be # found in /usr/share/doc/ser2net/examples BANNER:banner1:\r\nWelcome to TassyJim's micromite test device\r\nYour IP is logged for security reasons\r\n\r\n BANNER:banner2:\r\nCoffee monster\r\n\r\n #2000:telnet:600:/dev/ttyS0:9600 8DATABITS NONE 1STOPBIT banner #2001:telnet:600:/dev/ttyS1:9600 8DATABITS NONE 1STOPBIT banner 3002:raw:600:/dev/ttyUSB0:38400 8DATABITS NONE 1STOPBIT banner1 3001:raw:600:/dev/ttyUSB1:38400 8DATABITS NONE 1STOPBIT banner2 The last 2 lines are the important ones port 3002 is the mite and port 3001 is another one that's 'private' I always run my Pi's headless and do all the work using TeraTerm. The editor I use is nano but there are a few to choose from. Jim VK7JH MMedit |
||||
mikeb![]() Senior Member ![]() Joined: 10/04/2016 Location: AustraliaPosts: 174 |
Hi Grogs, Check this out. http://www.lantronix.com/products/xport/ There are 10 kinds of people in the world. Those that understand binary and those that don't. |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
@ Jim - I have just had a look, and I have FIVE Pi2 B+ boards, one original A+ and a Zero, so I have plenty of them. I think I should put one to use, don't you?(rhetorical!) ![]() EDIT: Just found another Pi2! I did not think I had ever bought so many of the bloody things! I also use a Pi3 for my mediaplayer, but I really need to use some of these redundant Pi2's.... @ mikeb - cute little modules. They don't mention price, which usually means it is expensive, but I might be wrong. Do you happen to know what they are worth? Smoke makes things work. When the smoke gets out, it stops! |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
@ Jim - do you think something like TinyCore talked about here and here could be used? To use a Pi like this, I really don't want to be waiting around booting into a GUI I don't need, so - gulp - command line Linux is really the best way forward I think, so long as 'apt get install' still works in TinyCore. Thoughts? EDIT: I got TinyCore going, even managed to install the X GUI, but then I found a version of Puppy Linux built for the Pi2/Pi3, so I downloaded that instead. It is MUCH faster even then Tiny Linux to boot directly to a GUI. I am just looking to see if I can now find ser2net in the application manager. EDIT: Okey dokey, found ser2net in the application manager, and installed it. There were no errors reported, more Puppy announced that it installed without problems, and does not need any other dependancies and is ready to use - a nice touch! I have found ser2net.conf in /etc (along with the application file), and am having a read through that now. I expect all I have to do is enter in the network settings I want in the .conf, then run the program file - which will call the .conf file and use those settings, correct? Assuming I get all that done by the end of the day, I MIGHT be able to put a MM on-line using your Pi method, Jim! ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |