Stefan Brantschen-3 |
Hi all
I am new to eLua, but have quite some, possibly somewhat rusty, Lua knowledge. I intend to dive into eLua with a LM3S6965 Kit, which I didn't order as of now, so I cannot test things. However, I am doing some upfront thinking :-), and have the following question, which I hope is not too obvious. I think I understand how to flash eLua to the board using Windows, and that I'll then have a serial line emulated via the USB connection to the host computer, both to download the eLua programs to the board and to control the latter via a terminal. As host computer I'd like to use a Mac OS X box in order to program the Lua application on the target board, once I have flashed over eLua. If I understand the on-line docs, I can use the UART eLua generic module to read and write to that serial-over-USB connection from Lua. I hope that's correct. What I don't see yet is how to talk to that connection from Lua on my Mac OS X system in order to implement a system with the remote part running on the target board and the host part on my Mac, to realize some simple communication between these parts. Think of something like a remote debugger, with a remote probe and a console on the host. Is there some Lua module for the host side of the serial? Or should I use the network connection and use the Lua socket module? Thanks for any help and hint! Cheers -- Stefan _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Hi all You're doing great so far :) If I understand the on-line docs, I can use the UART eLua generic module to read and write to that serial-over-USB connection from Lua. I hope that's correct. It is. With one addition: you can use the UART module to communicate with any serial port. One port might not be enough, but you can add another RS232 interface to your LM3S6965 board with a bit of soldering :), plug another USB to serial adapter in your Mac, and use this as a separate line, completely independent of the console UART. We also have a software UART multiplexer in the works, but it's not checked in yet, and I'm not sure how well it works on OS X (it should work just fine though). What I don't see yet is how to talk to that connection from Lua on my Mac OS X system in order to implement a system with the remote part running on the target board and the host part on my Mac, to realize some simple communication between these parts. Think of something like a remote debugger, with a remote probe and a console on the host. Is there some Lua module for the host side of the serial? Or should I use the network connection and use the Lua socket module? It pretty much depends on what you're trying to do. There are more options here: - if you want to have Lua running on OS X and "talk" directly to the Lua instance on the eLua board, the way to go is RPC : http://www.eluaproject.net/en_using.html#rpc - if you just want to use the serial connection of your OS X directly from the Lua interpreter running on OS X, I'm afraid I can't be of much help here. From what I could gather (mostly from some discussions on the Lua list), there isn't any official serial module for desktop Lua, although some implementations exist. We might write a serial module at some point if enough people show interest in this. - you can of course use sockets to exchange data with the eLua board, but I'd recommend you stick with serial, at least at the beginning. The networking core still needs some work in eLua. Best, Bogdan _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
On Tue, Apr 6, 2010 at 5:35 AM, Bogdan Marinescu
<[hidden email]> wrote: > >> Hi all >> >> I am new to eLua, but have quite some, possibly somewhat rusty, Lua >> knowledge. I intend to dive into eLua with a LM3S6965 Kit, which I didn't >> order as of now, so I cannot test things. However, I am doing some upfront >> thinking :-), and have the following question, which I hope is not too >> obvious. >> >> I think I understand how to flash eLua to the board using Windows, and >> that I'll then have a serial line emulated via the USB connection to the >> host computer, both to download the eLua programs to the board and to >> control the latter via a terminal. As host computer I'd like to use a Mac OS >> X box in order to program the Lua application on the target board, once I >> have flashed over eLua. > > You're doing great so far :) > >> >> If I understand the on-line docs, I can use the UART eLua generic module >> to read and write to that serial-over-USB connection from Lua. I hope that's >> correct. > > It is. With one addition: you can use the UART module to communicate with > any serial port. One port might not be enough, but you can add another RS232 > interface to your LM3S6965 board with a bit of soldering :), plug another > USB to serial adapter in your Mac, and use this as a separate line, > completely independent of the console UART. We also have a software UART > multiplexer in the works, but it's not checked in yet, and I'm not sure how > well it works on OS X (it should work just fine though). One additional note here: if the generic console is compiled in (default), the first UART will be dedicated to the console connection for interactive use. As Bogdan notes, you can use the other UARTS for additional serial connections. One thing about LM3S boards and using the USB->serial that's onboard: You will need to download the FTDI VCP drivers from the FTDI site: http://www.ftdichip.com/Drivers/VCP.htm but they won't by default find the LM3S board because Luminary have given it a different device id than the ones that come with the standard VCP (virtual COM port) driver. As such, if you want to use that as a serial port, you will need to add something to the Info.plist in the kext after installing. You might do this something like: sudo <insert-favorite-editor> /System/Library/Extensions/FTDIUSBSerialDriver.kext/Contents/Info.plist Then add what's below to the IOKitPersonalities section: <key>Stellaris Evaluation Board 6965</key> <dict> <key>CFBundleIdentifier</key> <string>com.FTDI.driver.FTDIUSBSerialDriver</string> <key>IOClass</key> <string>FTDIUSBSerialDriver</string> <key>IOProviderClass</key> <string>IOUSBInterface</string> <key>bConfigurationValue</key> <integer>1</integer> <key>bInterfaceNumber</key> <integer>1</integer> <key>idProduct</key> <integer>48345</integer> <key>idVendor</key> <integer>1027</integer> </dict> I don't recall if a reboot is needed after this, if your editor has modified the permissions on Info.plist you might also need to repair permissions. If successful, when you look for an entry in /dev beginning with tty.usbserial you should see a new entry when you plug in the device to your Mac. (I should probably add something about this to the Wiki) > >> >> What I don't see yet is how to talk to that connection from Lua on my Mac >> OS X system in order to implement a system with the remote part running on >> the target board and the host part on my Mac, to realize some simple >> communication between these parts. Think of something like a remote >> debugger, with a remote probe and a console on the host. Is there some Lua >> module for the host side of the serial? Or should I use the network >> connection and use the Lua socket module? > > It pretty much depends on what you're trying to do. There are more options > here: > > - if you want to have Lua running on OS X and "talk" directly to the Lua > instance on the eLua board, the way to go is RPC : > http://www.eluaproject.net/en_using.html#rpc > - if you just want to use the serial connection of your OS X directly from > the Lua interpreter running on OS X, I'm afraid I can't be of much help > here. From what I could gather (mostly from some discussions on the Lua > list), there isn't any official serial module for desktop Lua, although some > implementations exist. We might write a serial module at some point if > enough people show interest in this. > - you can of course use sockets to exchange data with the eLua board, but > I'd recommend you stick with serial, at least at the beginning. The > networking core still needs some work in eLua. > > Best, > Bogdan > > > _______________________________________________ > eLua-dev mailing list > [hidden email] > https://lists.berlios.de/mailman/listinfo/elua-dev > > -- James Snyder Biomedical Engineering Northwestern University [hidden email] PGP: http://fanplastic.org/key.txt Phone: (847) 448-0386 _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Stefan Brantschen-3 |
On 6 Apr 2010, at 20:42, James Snyder wrote: > On Tue, Apr 6, 2010 at 5:35 AM, Bogdan Marinescu wrote: Thanks, guys! _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Free forum by Nabble | Edit this page |