How do I use the host's serial port with VxSim? - vxworks

Can I use the hosts serial port through VxSim in VxWorks 5.5?

Short Answer: NO
Long Answer: It depends.
On Solaris, we designed the infrastructure to talk to a simulated backplane, I believe we used the host OS' pipe infrastructure.

Related

How to access virtual machines started with QEMU?

I wish I could connect to virtual machines started with QEMU.
Then I should extract the information about the registers (EIP, EBP, etc.)
In XEN for this, there is the function get_vcpu_context, also there are other functions through which you can connect to each virtual machine separately.
Is there any such support for QEMU, and where can I find QEMU hypercalls documentation?
You have a couple of options:
you can connect to the QEMU gdbstub and use the GDB remote protocol to query CPU state. This is probably the most reliable method.
you can connect to the QEMU monitor and use the "info registers" command. Note that the output format of this might change between QEMU releases, though (it is intended for human consumption, not other programs), so it will be less reliable long-term than using GDB remote protocol.

how to transmit serial data from GPS device to computer through IP?

Well..I have found some third party application regarding sending data from com port to IP. but I have not found any basic tutorial regarding them. so can anyone help me with this? I have a GPS device which I will connect to my laptop through usb to serial adapter.Now I need to send that data from a laptop to another laptop on same network. Can I use putty to view that data in another laptop(receiver)? Is virtual serial port driver meant for this kind of application?
If you do not want to write your own tool for it, you can simply use ncat and set up a daemon that reads piped data from one process and broadcasts it to all connected clients.
If you want something that reads the data from the serial port and then transmits it to clients, you'll need to write a server application that accepts connections and sends data around, but there's entire books on this. It should be easy to do for your purposes as written here, but it depends on the amount of control you need.
Alternatively you can use a virtual serial port application as you had mentioned, which might be the easiest route. The two devices will need to be on the same network unless the application supports TCP based virtualization instead of the common Ethernet based implementation.
This Python script works very well as a free "device server". Just enter the serial port configuration and the IP address and port information.
https://github.com/jaredly/pydbgp/blob/master/symbian/serial_tcp_redirect.py
This can work on both Windows and Linux.
You need pyserial.
You can always try using stand alone hardware such as the SENA LS100 device server.

How to list available ports with boost ASIO?

I'm trying to use Boost.ASIO Library, And I could not find how to list available ports(with serial port service) or sockets (with the network service) of boost.
Do you know if this is possible ?
Thank you.
Boost.Asio does not provide this functionality. Generally, this information is platform dependent. For example, on Windows, one might use Winsock LSP/SPI for sockets and SerialPort.GetPortNames for serial ports. While on Linux, /proc/net/* directories list sockets and serial ports will be enumerated within /sys/class/tty .

board with webserver, email, snmp

I am looking for board, module, kit for our new project.
requierments:
necessary:
IP interface IPv4/IPv6
DHCP, StaticIp, ICMP(Ping)
SNMP V2, V3
HTTP, Webserver
Email
good to have:
Telnet
SSH
SysLog
There are two ways:
complete controlled modul + master(some 8-bit with rs232, spi, ..)
I've found this http://www.connectone.com/products.asp?did=73&pid=92
But there is probably problem with SMTP, it isnt direct supported. Only UDP.
some board with linux
Thanks for your advices and recommendation.
with such heavy requirements, i would definitely go for an embedded computer running linux or a lighter unix based kernel. it will give you some flexibility over the software package, and you will easily find some support.
(there are plenty of embedded computers on the market, i can't chose one...)
I've found this XPORT PRO from LANTRONIX.
http://www.lantronix.com/device-networking/embedded-device-servers/xport-pro.html
There is Linux, so all 'net' stuffs should be supported.
8MB SDRAM/16MB Flash
small, cheap
Do you have some experience with that?
The second tip is http://www.rabbit.com/
Very powerfull modules with C libraries.

Virtual Network of Virtual Machines [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am developing software that is designed to run on a LAN. When multiple instances of the software are run on the network, they interfere with each other.
I want multiple team members to be able to test the program simultaneously. How would I do so (without altering the program).
My first thought would be to create a bunch of virtual machines running on a local box, with those machines networked together. The important thing is that I cannot generate network traffic outside of my real machine.
Which virtualization software would be the best choice to accomplish this task? How would I configure the software to behave in this manner?
Personally, I like VMWare Server... It pretty much works out of the box, and it handles the vm network cards very well, allowing them to be treated as physical devices (in terms of DHCP etc).
As for configuring the software, well as far as the machines are concerned, they are real. If you assign them static IPs, they may as well be real machines - although you'll find it easier to administer them by remote desktop rather than use the vmware console interface.
EDIT: I actually use VMWare Server in a production environment, running a virtual webserver, virtual DB server and a virtual app server on the same physical box.
VMWare also comes with a great converter tool that can virtualize a physical machine. This made it much simpler for me to consolidate and maintain my servers from three physical machines down to one.
EDIT 2: It's free too ;)
I would suggest VirtualBox. I think virtual network cards it sets up can be connected to a virtual network identified by name, where they can see each other.
The user manual has detailed networking instructions for various scenarios. From the Manual:
6.6. Internal networking
Internal Networking is similar to host
interface networking in that the VM
can directly communicate with the
outside world. However, the "outside
world" is limited to other VMs which
connect to the same internal network.
It runs on several platforms: windows linux osx solaris.
I use Sun xVM.... it does the networking by default to be on a 10.x network, nat'd behind your actual ip. So I'm not sure if that'd interfere with other instances running out on the network or not. But it's free and runs fairly well, and supports hyper-v to boot if you're on a 64bit os and have the processor to support it.
Almost any peice of Virtualization software will enable you to configure various types of networking.
VMware for example offers the following network types:
Bridged - machine appears as a host on the physical lan (not what you want)
NAT - shares your PC's IP (if you want to permit your application to access the physical LAN/internet)
Host-only - private network only visible to the VMs and your PC. If you want to permit internet/LAN access you'll need to run additional software on the host PC.
Custom - if you need to run multiple virtual networks to test things like firewall/webserver/vpn combo configurations and the like
In terms of simplicity and least configuration, VMWare Workstation is probably the ideal choice. It's very easy to use and setup is a breeze. Licensing costs are very reasonable ($190 for a single license, or $900 for 5 licenses) and then to cover yourself for licensing I'd suggest a Microsoft Technet subscription for each team member (Tho if they're all developers and you have MSDN then you're already covered)
There are cheaper alternatives that I'd recommend for hobby use, but if you're in a commercial environment where time is money then VMware will pay for itself in productivity gains very, very quickly.
Lastly, if cost is an issue then you might be able to get away with a single VMware license for configuring the machines and then using the free VMware player to run them, however I'm not sure if it has all the same sandboxed networking features present in VMware Workstation.
Recently there's been a lot of people talking about linux network namespaces, which is a way of creating lightweight virtual hosts. I believe this is also a way to solve your problem.
Mininet (http://mininet.org/) uses this to create emulated networks and it works really well. I have just begun using network namespaces for testing purposes and the performance is quite good with very low memory usage.
Refer also to http://www.opencloudblog.com/?p=66.
I took a sequence of commands from this last link and created a test setup:
#!/bin/bash
# add the namespaces
ip netns add ns1
ip netns add ns2
# create the switch
BRIDGE=ovs-test
ovs-vsctl add-br $BRIDGE
#
#### PORT 1
# create an internal ovs port
ovs-vsctl add-port $BRIDGE tap1 -- set Interface tap1 type=internal
# attach it to namespace
ip link set tap1 netns ns1
# set the ports to up
ip netns exec ns1 ip link set dev tap1 up
#
#### PORT 2
# create an internal ovs port
ovs-vsctl add-port $BRIDGE tap2 -- set Interface tap2 type=internal
# attach it to namespace
ip link set tap2 netns ns2
# set the ports to up
ip netns exec ns2 ip link set dev tap2 up
# add external port eth11
ovs-vsctl add-port $BRIDGE eth11
# configure ip addresses
ip netns exec ns1 ifconfig tap1 192.168.201.1/24
ip netns exec ns2 ifconfig tap2 192.168.201.2/24
The commands above basically create two hosts connected to an Open vSwitch bridge. Both hosts are connected to each other and also connected to the outside world through my eth11 ethernet adapter. Bridging to the outside world is completely optional.
I can run ping and iperf between the virtual hosts like this (the output is a bit messy, but I think it is possible to get the idea):
# ip netns exec ns1 iperf -s &
[1] 22158
# ------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
# ip netns exec ns2 iperf -c 192.168.201.1
------------------------------------------------------------
Client connecting to 192.168.201.1, TCP port 5001
[ 4] local 192.168.201.1 port 5001 connected with 192.168.201.2 port 43469
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.201.2 port 43469 connected with 192.168.201.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 17.3 GBytes 14.9 Gbits/sec
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 17.3 GBytes 14.9 Gbits/sec
#
If you're running on Windows or Linux, VMWare Server (mentioned by another poster) and VirtualBox should both do what you want, and they're both free. VirtualBox also runs on Mac OS X and Solaris, if you're so inclined.
In my previous project the guys from the hosting company tell me that they were using VMWare to configure the webfarm, but I don't have any clue of how to do this, though.