I am trying to build a Zigbee (802.15.4) network simulation in OMNeT++ using INET 3.0 framework (MiXiM was deprecated and replaced by this version ).
The problem is that unlike 802.11, the Zigbee is not fully standardize by its Alliance, so the modules in the framework are not complete nor ready for use.
I searched for an example that uses Zigbee all over the web but found none that uses INET 3.0, I found some that uses the old MiXiM. The INET 3.0 was released a few months ago.
I also tried to build my own Zigbee node but was not very lucky.
Can anyone please guide me to an example of Zigbee simulation in OMNeT++ under the INET 3.0 framework, or at least a node structure?
I forgot to mention that I am a novice to OMNeT++ and to INET.
Within an updated inet 3.x append in the file inet/examples/wireless/nic/omnetpp.ini the following config section:
[Config IEEE802154]
network = TestNic
extends = AbstractAPSKScalarRadio
*.host[*].wlan[*].typename = "Ieee802154NarrowbandNic"
The configured simulation represents a simple narrow-band CSMA/CA based IEEE 802.15.4 network which is related to ZigBee networks.
Then you have to run the configured simulation:
Right-click on the edited omnetpp.ini
Select Run as, then OMNeT++ Simulation
Change to new config IEEE802154
Finally, press ok
Related
I have the Pepper robot running NAOqi 2.9, which is meant to use the QiSDK for its Android tablet. Things have been going well, but the photo capture rate is surprisingly slow (at most 2 fps), so I've got to use the C++ (or Python) SDKs available for NAOqi 2.5 for this particular task.
I've been trying to get it to work for a few days with no success. I have setup both the C++ and Python SDKs up and running, but the problem I'm facing is connection to the robot.
I've run the simple following code (using the robot's IP) found on the official website here
from naoqi import ALProxy
tts = ALProxy("ALTextToSpeech", "<IP of your robot>", 9559)
tts.say("Hello, world!")
and I'm getting the following output stream
after the second line
The connection problem occurs running either C++ on Ubuntu, or Python on Windows.
I can connect to the robot via SSH, FTP, QiSDK in Android Studio, but not in any way through the NAOqi 2.5 SDKs for C++ or Python. Since QiSDK was most probably build on top of the C++ SDK, there surely has to be a way to make this to work.
Any information will help immeasurably.
As far as I know, in NAOqi 2.5, the tablet (JavaScript) and the "brain" (Choregraphe i.e. Python / C++) of the robot were two independent devices and had to communicate and cooperate with each other. In NAOqi 2.9, the "brain" was moved to the tablet and the only way to program Pepper is by using Android Studio.
On the download page for Pepper NAOqi 2.9 (https://www.softbankrobotics.com/emea/en/support/pepper-naoqi-2-9/downloads-softwares), there is a comment regarding the Python SDK:
This is for old NAOqi 2.5.10 and NAOqi 2.5.5.
And the following is stated for NAOqi 2.9 / Pepper SDK Plugin [for Android Studio]:
This is all you need for Pepper NAOqi 2.9.
Therefore, according to Softbank Robotics' documentation, using Python / C++ to program a NAOqi 2.9 Pepper is not possible.
I hope this information answers your question.
Edit
There's another way, you can use the qi Python library inside Pepper's head, in order to use services, such as ALTextToSpeech or ALMotion, with a simple example here. One could also only use SSH to start a Python server, which would give access to these functionalities through endpoints.
import qi
app = qi.Application()
app.start()
session = app.session
tts = session.service("ALTextToSpeech")
tts.say("Hello Word")
If you run the above snippet inside Pepper's head it produces the expected output(saying Hello world). There are almost all the services that are documented here. You can also list them all by calling .services() on the session object
End of Edit
I finally found a way to hack into it. If you connect to the robot via SSH you can use the qicli binary. Its documentation is here
qicli info lists all services available, for example ALVideoDevice or ALMotion
qicli info ALMotion displays the available methods of that service
qicli info ALMotion.setAngles displays info about that method's parameters
qicli call ALMotion.setAngles HeadYaw 0.7 0.3 calls the function in the module with given parameters
So one could write a wrapper to this binary and call it programmatically via SSH, it seems like a lot of work for this kind of task but I haven't found anything else.
I've got Python's Paramiko library to work:
import paramiko
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect(hostname='ip-of-robot', username='nao', password='your-pass')
stdin, stdout, stderr = client.exec_command('pwd')
print(stdout.read())
client.exec_command('qicli call ALMotion.setAngles HeadYaw -0.7 0.2')
client.close()
I've also tried .NET's SSH.NET library, with little to no success.
Note: Why this question is not off-topic
Some people seem to think this question is off-topic, and it would be better suited for Super User. Please give me a chance to explain why that's not the case.
The question is not about "general computing hardware" but about "embedded software". In the topic of "embedded software", there are tons of questions on StackOverflow related to OpenOCD, a popular open-source tool to connect your computer to embedded software development boards. All these questions are considered totally okay for StackOverflow. My question on this page is about PyOCD - an emerging OpenOCD alternative. So if you vote to close this question, then please also vote to close the 565 (!) other questions about OpenOCD too ;-)
I've got a NuMaker-M032SE V1.3 board from Nuvoton that I'm trying to flash/debug with PyOCD. It's my first time I'm experimenting with PyOCD and with Nuvoton chips. Unfortunately, PyOCD cannot find the device. I'll go step-by-step through the whole procedure. Please tell me what I did wrong.
1. My system
I'm running 64-bit Windows 10 on my desktop computer. I've got Python 3.8 and recently installed the latest PyOCD development version from a cloned GitHub repository (see https://github.com/mbedmicro/pyOCD).
2 Install Microcontroller board
Note: this paragraph is simply to show you the background situation, before I move on to explain the actual problem I got with PyOCD
I've got a Nuvoton NuMaker-M032SE V1.3 microcontroller board:
This board has a Nu-Link2-Me V1.0 probe on the right side. The first time I connect my board to my computer nothing really happened. So I figured out I had to install the Nuvoton ICP tool that comes with the Nu-Link USB Driver 1.6:
You can download the Nuvoton ICP tool here: https://www.nuvoton.com/hq/support/tool-and-software/development-tool-hardware/programmer/
When I first start the sofware, I see this:
And I get a request to update the firmware on the Nu-Link2-Me V1.0 probe:
I click OK and wait for the firmware update to complete. I plug out and back in the board. Windows clearly notices the device:
I can also see the device in my Control Panel > Device Manager. It's listed under Universal Serial Bus Controllers as Nuvoton Nu-Link2 USB:
3 Prepare PyOCD
PyOCD has a few built-in targets. But not the Nuvoton chip I got. So I consulted the documentation at https://github.com/mbedmicro/pyOCD/blob/master/docs/target_support.md and learn that I need to download a pack from http://www.keil.com/dd2/pack/ . That's where I download the Nuvoton ARM Cortex-M NuMicro Family Device Support pack:
Because I downloaded the pack manually, I know that I'll have to add the parameter --pack="C:/path/to/pack/Nuvoton.NuMicro_DFP.1.3.5.pack" to every PyOCD command, to ensure that PyOCD can access this pack whenever it needs to.
4. Connect PyOCD with Nuvoton board
I believe my microcontroller board is properly installed to go on to the final step: connect PyOCD to the Nuvoton microcontroller board.
First I want PyOCD to find the board. I issue the following command in a Windows console:
$ pyocd list --pack="C:/path/to/pack/Nuvoton.NuMicro_DFP.1.3.5.pack"
Unfortunately, I get the response:
No available debug probes are connected
I tried a few times, both with and without the --pack parameter. I always get the same error message.
Note:
I had expected to see something like:
# Probe Unique ID
---------------------------------------------------------------------------
0 ARM CMSIS-DAP v1 000000800a0c882800000000000000000000000097969902
That's the output I get when I issue the $ pyocd list command and I have my SWDAP probe connected to my computer. The SWDAP is the official probe from ARM (see https://os.mbed.com/components/SWDAP-LPC11U35/) that runs the DAPLink firmware (see https://github.com/ARMmbed/DAPLink).
I got a reply from Nuvoton. Apparently the NuMaker-M032SE V1.3 board is not yet supported in PyOCD at the time of writing (02 Dec 2019). At the moment, only NuMaker M252/M263 boards are supported.
Nuvoton will make efforts to support these boards in PyOCD too, in the future.
Hello everybody,
I have been working for some time on the implementation of tools for coding an application in Qt5 on a Gumstix Overo platform with a Yocto Rocko kernel.
After some effort I managed to set up the development tools:
- Create a bootable SD card with Yocto Rocko and Qt5.
- Get cross-compilation tools to code Qt5 linux support on Gumstix Overo (ARM).
- Configure QtCreator to develop code and compile it for the Gumstix Overo.
All my research work with explanatory "step by step" are available on this link.
In order to use the I2C part of the Gumstix Overo, I would like to exploit the small OLED SSD1306 display.
I found a project that did it for a Beagle Bone here.
And the library practically ready to use here.
After adapting the project for the Gumstix Overo and compiling the code, I can start the application.
The problem is that after a short time running the program stops and show me these two errors.
- ioctl error: Remote I/O error.
- Chunk writtent to RAM -Failed.
The display of the first error comes from an additionnal part that I have added in the code in line 202 there.
The display of the second error comes from the library in the line 777 there.
My unsuccessful searches on the internet make me to ask you for help.
Small precise, given the I2C communication voltage levels between the Gumstix Overo and the SSD1306 OLED display, an electronic adaptation has be made.
the electrical assembly
I2C waveform
Voltage level adaptation schematic
Thank you all.
Ok I found the solution.
The problem was the logical level converter that not working for 1.8 VDC.
I choose the PCA9306 Breakout from sparkfun there and it's working well.
I hope that will help someone.
So I have a projects implemented on MCU in 2 steps/projects:
Implementation of a bootloader using the mbed RTOS and USBDevice Library: USBHID, USBSerial...
The application layer is implemented in a separate project where it get compiled and the binary and flash it using bootloader.
The question is what is the best approach to set up serial communication over UART to USB from application layer to my laptop for example? Should I be using the RTOS libraries or should the application code have its own USB libraries or even both? If using RTOS libraries how to have them "connected to"application code i.e. how can I call mbed functions in application project that doesn't have mbed?
Thanks
Windows ports recognize the serial implementation of and UART application, so you have to download the mbed sdk/stack library and in your project workspace, create a make file with the linker path from library, compiler options. Next, in this file you must include the links to all OBJS, all of the sources participating in the build, inputs and outputs from these tool invocations to the build variables.
This file will create your hex file for the target, including the serial libraries. After flashing on the target, if you connect through the USB, it must recognize the serial communication.
PS: run the make file with cmd.
mbed itself is an RTOS and is intended to be used on microcontrollers, Arm Cortex-M architecture. It doesn't run on a host PC running Windows or Linux or in other words x86 architecture. When you write an application with mbed, it would communicate over USB to UART by using a Serial class object or you can simply use printf to see messages on the COM Port that is enumerated on your PC. Hope this makes it clear.
I'm working on a debian 6.0 installed on virtualbox 4 hosted by Windows7, and I'm trying to get my STM32VL work using STLINK project that allows programming and debugging STM32 on Linux.
I followed their tutorial and installed all needed dependancies.
But when I run the program ./st-util -1, I get the following error:
tbarry#darkstar:~/stlink$ ./st-util -1
2014-03-20T10:18:48 WARN src/stlink-sg.c: Failed to find an stlink v1 by VID:PID
Error: could not open stlink device
Error: could not open stlink device
I underline that I have already installed Virtualbox extensions, and usb 2.0 is well handled.
Does anyone have an idea of what is blocking me?
I'd same problem. It was driver problem. Windows detected my st-link as mass storage device, so st-util didn't see it. I've used zadig utility in order to change the driver.
Not having found a solution to my problem, I tried with VMware player and it worked nice.
Conclusion: Whatever the problem I had, it was coming from VirtualBox.