I have a modem and four Esp8266 and a Raspberry Pi. I want to control Esp with Python language via internet. I have read this project.
https://randomnerdtutorials.com/micropython-mqtt-esp32-esp8266/
Instead of ESP2, I implemented the code on Windows. But I got the error ModuleNotFoundError: No module named 'ustruct'.
Is there a way for me to remotely check the Raspberry Pi and ESPs using Windows?
Of course I want to use MQTT.
This photo shows what I have described.
ustruct is a MicroPython Module that is available on all if not most MicroPython firmwares ( including the Win32 version of MicroPython)
If you need to / want to port your code to Cpython (on windows or other) that should not be too much work as the two are quite compatible.
as your project needs network capabilities using the Windows port of MicroPython is not an option as neither the Unix nor the Widows ports come with a network stack you compile/download a windows port of MicroPython
Related
I am attempting to send data from a Python script running on a Raspberry Pi to a Java Micronaut ServerWebSocket running on a Windows machine, but I am getting asyncio.exceptions.TimeoutError errors during the process.
I attempted to use the websockets library in Python on the Raspberry Pi to establish a websocket connection, but encountered a ConnectionRefusedError. Is this issue related to a network problem as mentioned here, and should I ask somewhere else like Superuser or Serverfault? Or is there another solution to this problem?
As #life888888 suggested, it had something to do with Windows firewall.
But instead of the public firewall being the problem, it was the one for the domain network instead.
How could I launch code.py that only exists on a raspberry, from a python command line on a computer connected by an Ethernet cable. Machine A and the raspberry are connected to each other by a simple ethernet cable, and none of those two endpoints are connected to the internet. They only have the latest version of python installed and can't have anything more installed on them.
It looks like subprocess.Popen() could be a way to tackle it. But with the little knowledge I have I can't understand and know for sure if using this method is suitable !
Thank you for your time :)
Working with an Adafruit FTDI 232H Breakout assembly. I've already asked at Adafruit and FTDI and I'm still clueless. Writing in Python using the Adafruit-provided libraries and the FTDI libraries. Very new to Python and the FTDI 232H device...
Using Windows 10 Pro
I am able to successfully install the 'drivers' for the Adafruit based on this tutorial (specifically the Windows portion):
https://learn.adafruit.com/adafruit-ft232h-breakout?view=all
In the end, the interface will work, but what happens is that the device seems to be locked to a physical USB port. If I move the device to another USB port on the same machine, it is not recognized.
Based on some reading I've done, it seems like the driver, although installed in Windows, can only associate with the device on one port. Some say that Windows uses the serial number to keep track of what device uses what driver.
I have observed, using USBDView, that this device is not displaying a S/N. I have other devices that do not display a serial number and they can move from port to port without issue. This leads me to believe that the S/N tracking may not be 100% true in Windows. The Adafruit board does have a S/N in the EEPROM, but for some reason that information is not being provided to Windows / USBDView. I've not been able to successfully access the EEPROM via the FTProg utility.
I suspect that this might have something to to with the libusbK library that is installed via Zadig tool (again in the instructions) but I am not sure. FTDI says that there should not be any issue using the libusbK library.
Can anyone out there give me some pointers on:
Is it accurate that Windows uses the S/N to keep track of what driver goes with what device?
If so, how to get the FTDI device to display the S/N?
Is there some other setting in Windows that needs to be changed to allow this device to be used on other physical ports?
Is there any other utility like FTProg that could be used to work with the EEPROM?
Am I just missing something simple, Noob-style?
Thank you in advance,
I seem to recall a similar case related to COM port enumeration and Windows where the COM port enumeration is a hash of assorted variables including the PCI bus #, device #, etc. We witnessed this through the Microsoft devcon utility which is priceless and is a command line version of Device Manager.
https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/devcon
https://blogs.technet.microsoft.com/deploymentguys/2009/12/16/where-to-find-devcon-exe/
If you google around, you can find the compiled version of this invaluable tool. With confidence, believe this tool will assist you to debug your USB port mystery. Good luck.
I am trying to hook up a xbee on arduino and wish to run some algorithms on my linux machine and based on result of algorithmic output i ahve to communicate the commands to xbee connected to my arduino. I know we have API support to read/write xbee from Arduino platform. Does Xbee have a way to be programmed on host machine running Linux/OSx other than x-ctu software.
I wish to know if there is a way to programmatically communicate Xbee using USB dongle adapter from host machine, may be python api
I found this online http://serdmanczyk.github.io/XBeeAPI-PythonArduino-Tutorial/ and it pretty much addresses my need .
I'm trying to communicate between an iOS app and Raspberry Pi using Bluetooth. The Raspberry Pi is using a Python script for this purpose.
I was originally using the PyBluez library, however this does not support Bluetooth LE and thus can't be used with CoreBluetooth on iOS.
My next solution was to use the private BluetoothManager framework to communicate with the Pi, but this doesn't work on iOS 7.
I've researched a bit more and have seen suggestions for manually sending/receiving LE packets with PyBluez, but this seems incredibly complex and I really have no idea where to start.
So at the moment, I'm stuck. I need either:
A solution to communicate with a non-LE Bluetooth device via iOS, or
A solution for advertising and communicating as a LE device on the Raspberry Pi via Python
One option is to buy a USB dongle with a BLE stack in it already.
We have used the Laird BL620-USB, flashed with BL600 firmware to operate as a BLE peripheral.
Having BLE stack in the dongle means it can be communicated with from the Raspberry Pi like a simple USB serial port, without using any linux Bluetooth stack.
BL600 includes the Nordic / Laird proprietary Virtual Serial Port Profile already, so you can achieve the simplicity similar to the classic Bluetooth SPP, even when communicating to an iOS device.
Laird will provide iOS and Android code to use the VSP on the mobile side.
Other BLE module makers probably do the same.
Have you tried this?
By default, the Wheezy distribution comes without a Bluetooth stack. The bluez package is version 4.99, which has patchy support for Low Energy.
Keep in mind at the time of writing Bluetooth Low Energy (BLE) is not well supported by the standard Raspberry Pi distributions. Some work is required to get it working, as described in the link provided above.
NewAer has built a P2P messaging framework to share 500 Bytes (SDK 5) to 15K with certain devices. That being said, we can send 15K between iOS devices, or iOS and the Raspberry Pi 3. As Android gains further OS and hardware support for BLE, we expect to ad that higher file size as well, but at this time it is limited to 500 bytes between Android and iOS.